@Test
    void verifyFailsPrincipal() throws Throwable {
        val factory = (CasSimpleMultifactorAuthenticationTicketFactory) defaultTicketFactory.get(CasSimpleMultifactorAuthenticationTicket.class);
        val ticket = factory.create(RegisteredServiceTestUtils.getService(), Map.of());
        ticketRegistry.addTicket(ticket);
        val credential = new CasSimpleMultifactorTokenCredential(ticket.getId());
        assertThrows(MultifactorAuthenticationFailedException.class, () -> casSimpleMultifactorAuthenticationHandler.authenticate(credential, mock(Service.class)));
        assertFalse(casSimpleMultifactorAuthenticationHandler.supports(new UsernamePasswordCredential()));
        assertFalse(casSimpleMultifactorAuthenticationHandler.supports(UsernamePasswordCredential.class));
    }
This is {@link CasSimpleMultifactorAuthenticationHandlerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-simple-mfa/src/test/java/org/apereo/cas/mfa/simple/CasSimpleMultifactorAuthenticationHandlerTests.java