@Test
    void verifyContextPassesValidationWithProvider() {
        val applicationContext = getStaticApplicationContext();
        val v = new DefaultMultifactorAuthenticationContextValidator("authn_method",
            "trusted_authn", applicationContext);
        val authentication = MultifactorAuthenticationTestUtils.getAuthentication(
            MultifactorAuthenticationTestUtils.getPrincipal("casuser"),
            CollectionUtils.wrap("authn_method", List.of("mfa-dummy")));
        val result = v.validate(authentication,
            "mfa-dummy", Optional.of(MultifactorAuthenticationTestUtils.getRegisteredService()));
        assertTrue(result.isSuccess());
    }
This is {@link DefaultMultifactorAuthenticationContextValidatorTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-authentication-mfa-api/src/test/java/org/apereo/cas/authentication/mfa/DefaultMultifactorAuthenticationContextValidatorTests.java