@Test
    void verifyOperation() {
        val principal = RegisteredServiceTestUtils.getPrincipal("casuser", Map.of("phoneNumber", List.of("+13247463546")));
        val authentication = RegisteredServiceTestUtils.getAuthentication(principal);

        val credential = new CasTwilioMultifactorTokenCredential();
        credential.setToken(UUID.randomUUID().toString());
        credential.getCredentialMetadata().putProperty(Authentication.class.getName(), authentication);
        assertTrue(casTwilioMultifactorAuthenticationHandler.supports(credential));
        assertTrue(casTwilioMultifactorAuthenticationHandler.supports(credential.getClass()));
        assertThrows(MultifactorAuthenticationFailedException.class,
            () -> casTwilioMultifactorAuthenticationHandler.authenticate(credential, RegisteredServiceTestUtils.getService()));
    }
This is {@link CasTwilioMultifactorAuthenticationHandlerTests}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-twilio-mfa/src/test/java/org/apereo/cas/mfa/CasTwilioMultifactorAuthenticationHandlerTests.java