@Test
        void verifyResolutionByAuthenticationAttribute() throws Throwable {
            val applicationContext = new StaticApplicationContext();
            applicationContext.refresh();

            val context = MockRequestContext.create(applicationContext);

            val provider = registerProviderInApplicationContext(applicationContext, context, new TestMultifactorAuthenticationProvider());
            val resolver = new DefaultMultifactorAuthenticationProviderResolver(MultifactorAuthenticationPrincipalResolver.identical());

            val authentication = CoreAuthenticationTestUtils.getAuthentication("casuser",
                CollectionUtils.wrap("authlevel", List.of(provider.getId())));
            val results = resolver.resolveEventViaAuthenticationAttribute(authentication,
                List.of("authlevel"), CoreAuthenticationTestUtils.getRegisteredService(),
                CoreAuthenticationTestUtils.getService(),
                Optional.of(context), List.of(provider), (input, __) -> input.equalsIgnoreCase(provider.getId()));
            assertNotNull(results);
            assertEquals(provider.getId(), results.iterator().next().getId());
        }
This is {@link DefaultMultifactorAuthenticationProviderResolverTests}.

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