@Test
    void verifyAuthnResolvesMfaEvent() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        context.setParameter(casProperties.getAuthn().getMfa().getTriggers().getHttp().getRequestParameter(), TestMultifactorAuthenticationProvider.ID);

        WebUtils.putServiceIntoFlowScope(context, RegisteredServiceTestUtils.getService());
        val service = RegisteredServiceTestUtils.getRegisteredService(Map.of());
        servicesManager.save(service);
        WebUtils.putRegisteredService(context, service);

        val tgt = new MockTicketGrantingTicket("casuser");
        WebUtils.putTicketGrantingTicketInScopes(context, tgt);
        ticketRegistry.addTicket(tgt);

        TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        WebUtils.putCredential(context,
            RegisteredServiceTestUtils.getCredentialsWithDifferentUsernameAndPassword("casuser", "Mellon"));

        val targetResolver = new DefaultTargetStateResolver(TestMultifactorAuthenticationProvider.ID);
        val transition = new Transition(new DefaultTransitionCriteria(
            new LiteralExpression(TestMultifactorAuthenticationProvider.ID)), targetResolver);
        context.getRootFlow().getGlobalTransitionSet().add(transition);
        assertEquals(TestMultifactorAuthenticationProvider.ID, resolver.resolveSingle(context).getId());
    }
This is {@link RankedMultifactorAuthenticationProviderWebflowEventResolverTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/web/flow/resolver/impl/RankedMultifactorAuthenticationProviderWebflowEventResolverTests.java