@Test
    public void testGuestSingleRoleAssertion() throws Throwable {
        RoleAnnotationHandler handler = new RoleAnnotationHandler();

        Annotation requiresRolesAnnotation = new RequiresRoles() {
            @Override
            public String[] value() {
                return new String[] {"blah"};
            }

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

            @Override
            public Logical logical() {
                return Logical.AND;
            }
        };

        runWithSubject(subject -> {
            assertThrows(UnauthenticatedException.class, () -> handler.assertAuthorized(requiresRolesAnnotation));
        });
    }
Test cases for the {@link RoleAnnotationHandler} class.
core/src/test/java/org/apache/shiro/authz/aop/RoleAnnotationHandlerTest.java