@Test
    void testGuestMultipleRolesAssertion() throws Throwable {
        assertThrows(UnauthenticatedException.class, () -> {
            subject = mock(Subject.class);

            doThrow(new UnauthenticatedException()).when(subject).checkRole("blah");
            when(subject.hasRole("blah")).thenReturn(false);
            when(subject.hasRole("blah2")).thenReturn(false);

            RolesAllowedAnnotationHandler handler = new RolesAllowedAnnotationHandler() {
                @Override
                protected Subject getSubject() {
                    return subject;
                }
            };

            Annotation rolesAllowedAnnotation = new RolesAllowed() {
                @Override
                public String[] value() {
                    return new String[] {"blah", "blah2"};
                }

                @Override
                public Class<? extends Annotation> annotationType() {
                    return RolesAllowed.class;
                }
            };

            handler.assertAuthorized(rolesAllowedAnnotation);
        });
    }
Test cases for the {@link RolesAllowedAnnotationHandler} class.
core/src/test/java/org/apache/shiro/authz/aop/RolesAllowedAnnotationHandlerTest.java