@Test
    void verifySuccessfulAuthenticationWithTokenWithoutPrefix() throws Throwable {
        val principal = RegisteredServiceTestUtils.getPrincipal();

        val factory = (CasSimpleMultifactorAuthenticationTicketFactory) defaultTicketFactory.get(CasSimpleMultifactorAuthenticationTicket.class);
        val ticket = factory.create(RegisteredServiceTestUtils.getService(),
            Map.of(CasSimpleMultifactorAuthenticationConstants.PROPERTY_PRINCIPAL, principal));
        ticketRegistry.addTicket(ticket);
        val ticketIdWithoutPrefix = ticket.getId().substring(CasSimpleMultifactorAuthenticationTicket.PREFIX.length() + 1);
        val credential = new CasSimpleMultifactorTokenCredential(ticketIdWithoutPrefix);
        assertNotNull(casSimpleMultifactorAuthenticationHandler.authenticate(credential, mock(Service.class)).getPrincipal());
    }
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