@Test
    void verifyOperation() {
        val props = new MultifactorAuthenticationProviderBypassProperties();
        props.setHttpRequestHeaders("headerbypass");
        val provider = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        provider.setBypassEvaluator(new HttpRequestMultifactorAuthenticationProviderBypassEvaluator(props, provider.getId(), applicationContext));
        val casProperties = new CasConfigurationProperties();
        casProperties.getAuthn().getMfa().getCore().setGlobalFailureMode(BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.OPEN);
        val failureEvaluator = new DefaultMultifactorAuthenticationFailureModeEvaluator(casProperties);
        val chain = new DefaultChainingMultifactorAuthenticationProvider(applicationContext, failureEvaluator);
        chain.addMultifactorAuthenticationProviders(provider);
        assertNotNull(chain.getBypassEvaluator());
        assertNotNull(chain.getId());
        assertNotNull(chain.getFriendlyName());
        assertEquals(BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.NONE, chain.getFailureMode());

        assertFalse(chain.getMultifactorAuthenticationProviders().isEmpty());
        assertEquals("TestMfaProvider", chain.getDeviceManager().getSource().getFirst());
        val service = MultifactorAuthenticationTestUtils.getRegisteredService();
        assertTrue(chain.isAvailable(service));
        assertTrue(chain.matches(provider.getId()));
        val registeredDevices = chain.getDeviceManager().findRegisteredDevices(MultifactorAuthenticationTestUtils.getPrincipal("casuser"));
        assertEquals(1, registeredDevices.size());
    }
This is {@link DefaultChainingMultifactorAuthenticationProviderTests}.

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