protected void executeEvaluation(final BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes providerMode,
                                     final BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes serviceMode,
                                     final BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes expected) {
        val eval = new DefaultMultifactorAuthenticationFailureModeEvaluator(casProperties);

        val provider = new TestMultifactorAuthenticationProvider();
        provider.setFailureMode(providerMode);
        val service = CoreAuthenticationTestUtils.getRegisteredService();
        val policy = new DefaultRegisteredServiceMultifactorPolicy();
        policy.setFailureMode(serviceMode);
        when(service.getMultifactorAuthenticationPolicy()).thenReturn(policy);

        val result = eval.evaluate(service, provider);
        assertEquals(expected, result);
    }
This is {@link DefaultMultifactorAuthenticationFailureModeEvaluatorTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-mfa/src/test/java/org/apereo/cas/authentication/DefaultMultifactorAuthenticationFailureModeEvaluatorTests.java