@Test
    void verifyOperation() throws Throwable {
        val context = MockRequestContext.create(applicationContext);

        val service = RegisteredServiceTestUtils.getRegisteredService();
        servicesManager.save(service);

        WebUtils.putRegisteredService(context, service);
        WebUtils.putAuthentication(RegisteredServiceTestUtils.getAuthentication(), context);
        WebUtils.putServiceIntoFlowScope(context, RegisteredServiceTestUtils.getService());

        var results = requestHeaderAuthenticationPolicyWebflowEventResolver.resolve(context);
        assertNull(results);

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

        TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        context.addHeader(casProperties.getAuthn().getMfa().getTriggers().getHttp().getRequestHeader(), TestMultifactorAuthenticationProvider.ID);
        results = requestHeaderAuthenticationPolicyWebflowEventResolver.resolve(context);
        assertNotNull(results);
        assertEquals(1, results.size());
        assertEquals(TestMultifactorAuthenticationProvider.ID, results.iterator().next().getId());
    }
This is {@link RequestHeaderMultifactorAuthenticationPolicyEventResolverTests}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/RequestHeaderMultifactorAuthenticationPolicyEventResolverTests.java