@Test
    void verifyExecutionIgnoredPerService() throws Throwable {
        val applicationContext = buildApplicationContext();

        val provider = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        val props = MultifactorAuthenticationTestUtils.getAuthenticationBypassProperties();
        val bypass = new AuthenticationMultifactorAuthenticationProviderBypassEvaluator(props, provider.getId(), applicationContext);
        provider.setBypassEvaluator(bypass);
        val servicesManager = mock(ServicesManager.class);
        val validator = MultifactorAuthenticationTestUtils.mockRequestAuthnContextValidator(servicesManager,
            Optional.of(provider), applicationContext,
            BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.UNDEFINED.toString());

        val mfaPolicy = mock(RegisteredServiceMultifactorPolicy.class);
        when(mfaPolicy.isBypassEnabled()).thenReturn(true);
        val service = MultifactorAuthenticationTestUtils.getService(UUID.randomUUID().toString());
        val registeredService = MultifactorAuthenticationTestUtils.getRegisteredService(service.getId(),
            BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.UNDEFINED.toString());
        when(registeredService.getMultifactorAuthenticationPolicy()).thenReturn(mfaPolicy);
        when(servicesManager.findServiceBy(any(Service.class))).thenReturn(registeredService);

        val assertion = mock(Assertion.class);
        when(assertion.getService()).thenReturn(service);
        val principal = MultifactorAuthenticationTestUtils.getPrincipal(CASUSER, CollectionUtils.wrap(CASUSER, AUTH_ATTRIBUTES));
        val auth = MultifactorAuthenticationTestUtils.getAuthentication(principal, AUTH_ATTRIBUTES);
        when(assertion.getPrimaryAuthentication()).thenReturn(auth);
        val result = validator.validateAuthenticationContext(assertion, new MockHttpServletRequest(), new MockHttpServletResponse());
        assertTrue(result.isSuccess());
        assertTrue(result.getContextId().isEmpty());
    }
This is {@link DefaultMultifactorAuthenticationContextValidatorTests}.

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