@Test
    void verifyHandlerDoesNotSupportCredential() throws Throwable {
        val map = new HashMap<AuthenticationHandler, PrincipalResolver>();
        val handler = newMockHandler(true);
        when(handler.supports(any(Credential.class))).thenReturn(Boolean.FALSE);
        map.put(handler, null);
        val authenticationExecutionPlan = getAuthenticationExecutionPlan(map);
        val manager = getAuthenticationManager(authenticationExecutionPlan);
        assertThrows(AuthenticationException.class, () -> manager.authenticate(transaction));
    }
Unit test for {@link DefaultAuthenticationManager}.

@author Marvin S. Addison
@since 4.0.0
core/cas-server-core-authentication/src/test/java/org/apereo/cas/authentication/DefaultAuthenticationManagerTests.java