@Test
    public void testOneOfTheRolesRequired() {
        subject = createMock(Subject.class);
        expect(subject.hasRole("blah")).andReturn(true);
        expect(subject.hasRole("blah2")).andReturn(false);
        replay(subject);
        RoleAnnotationHandler handler = new RoleAnnotationHandler() {
            @Override
            protected Subject getSubject() {
                return subject;
            }
        };

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

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

            @Override
            public Logical logical() {
                return Logical.OR;
            }
        };
        handler.assertAuthorized(requiresRolesAnnotation);
    }
Test cases for the {@link RoleAnnotationHandler} class.
core/src/test/java/org/apache/shiro/authz/aop/RoleAnnotationHandlerTest.java