@Test
    void verifySelectionOfMfaProvider() throws Throwable {
        val dummy1 = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        dummy1.setOrder(10);
        dummy1.setFailureMode(BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.PHANTOM);
        val dummy2 = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        dummy2.setOrder(5);

        val service = RegisteredServiceTestUtils.getRegisteredService();
        servicesManager.save(service);
        val provider = multifactorAuthenticationProviderSelector.resolve(CollectionUtils.wrapList(dummy1, dummy2),
            service, RegisteredServiceTestUtils.getPrincipal());
        assertNotNull(provider);
        assertEquals(dummy1.getId(), provider.getId());
        assertEquals(dummy1.getOrder(), provider.getOrder());
        assertEquals(BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.PHANTOM, provider.getFailureMode());
    }
This is {@link RankedMultifactorAuthenticationProviderSelectorTests}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/web/flow/authentication/RankedMultifactorAuthenticationProviderSelectorTests.java