@Test
    void verifyOperationNeedsMfa() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        context.setRemoteAddr("385.86.151.11");
        context.setLocalAddr("295.88.151.11");
        context.withUserAgent();
        context.setParameter(OAuth20Constants.ACR_VALUES, TestMultifactorAuthenticationProvider.ID);
        context.setClientInfo();

        val targetResolver = new DefaultTargetStateResolver(TestMultifactorAuthenticationProvider.ID);
        val transition = new Transition(new DefaultTransitionCriteria(
            new LiteralExpression(TestMultifactorAuthenticationProvider.ID)), targetResolver);
        context.getRootFlow().getGlobalTransitionSet().add(transition);

        WebUtils.putServiceIntoFlowScope(context, CoreAuthenticationTestUtils.getWebApplicationService());
        TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication(), context);
        
        val event = resolver.resolve(context);
        assertEquals(1, event.size());
        assertEquals(TestMultifactorAuthenticationProvider.ID, event.iterator().next().getId());
    }
This is {@link OidcAuthenticationContextWebflowEventResolverTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/web/flow/OidcAuthenticationContextWebflowEventResolverTests.java