@Test
    void verifyAuthUnauthz() throws Throwable {
        for (var i = 0; i < 3; i++) {
            val ex = new AuthenticationException(new UnauthorizedAuthenticationException("failure"));
            val event = handler.handle(ex, context);
            assertNotNull(event);
            assertEquals(UnauthorizedAuthenticationException.class.getSimpleName(), event.getId());
        }
        val count = WebUtils.countFailedAuthenticationAttempts(context);
        assertEquals(3, count);
    }
This is {@link DefaultCasWebflowAuthenticationExceptionHandlerTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/authentication/DefaultCasWebflowAuthenticationExceptionHandlerTests.java