@Test
        void verifyCompositeWithCookie() throws Throwable {
            val context = MockRequestContext.create();
            multifactorAuthenticationProviderSelectionCookieGenerator.addCookie(
                context.getHttpServletRequest(),
                context.getHttpServletResponse(), TestMultifactorAuthenticationProvider.ID);
            context.setRequestCookiesFromResponse();

            val provider = new DefaultChainingMultifactorAuthenticationProvider(applicationContext,
                new DefaultMultifactorAuthenticationFailureModeEvaluator(casProperties));

            val mfa = new TestMultifactorAuthenticationProvider();
            val bypass = mock(MultifactorAuthenticationProviderBypassEvaluator.class);
            when(bypass.shouldMultifactorAuthenticationProviderExecute(any(Authentication.class), any(RegisteredService.class),
                any(MultifactorAuthenticationProvider.class), any(HttpServletRequest.class), any(Service.class))).thenReturn(true);
            mfa.setBypassEvaluator(bypass);
            provider.addMultifactorAuthenticationProvider(mfa);

            val event = new EventFactorySupport().event(this,
                ChainingMultifactorAuthenticationProvider.DEFAULT_IDENTIFIER,
                new LocalAttributeMap<>(MultifactorAuthenticationProvider.class.getName(), provider));
            val resolvedEvents = CollectionUtils.wrapHashSet(event);
            val result = assertCompositeProvider(context, resolvedEvents, RegisteredServiceTestUtils.getAuthentication());
            assertEquals(TestMultifactorAuthenticationProvider.ID, result.iterator().next().getId());
        }
This is {@link CompositeProviderSelectionMultifactorWebflowEventResolverTests}.

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