@Test
    void testOneOfTheRolesRequired() throws Throwable {
        assertThrows(UnauthenticatedException.class, () -> {
            subject = createMock(Subject.class);
            expect(subject.hasRole("blah")).andReturn(true);
            replay(subject);
            DenyAllAnnotationHandler handler = new DenyAllAnnotationHandler() {
                @Override
                protected Subject getSubject() {
                    return subject;
                }
            };

            Annotation denyAllAnnotation = new DenyAll() {
                @Override
                public Class<? extends Annotation> annotationType() {
                    return DenyAll.class;
                }
            };
            handler.assertAuthorized(denyAllAnnotation);
        });
    }
Test cases for the {@link DenyAllAnnotationHandler} class.
core/src/test/java/org/apache/shiro/authz/aop/DenyAllAnnotationHandlerTest.java