@Test
    void verifyOperation() {
        val applicationContext = new StaticApplicationContext();
        applicationContext.refresh();
        val plan = mock(CasWebflowExecutionPlan.class);
        when(plan.isInitialized()).thenReturn(false);
        ApplicationContextProvider.registerBeanIntoApplicationContext(applicationContext, plan, CasWebflowExecutionPlan.BEAN_NAME);
        val adapter = new CasFlowHandlerAdapter("login", plan);
        adapter.setApplicationContext(applicationContext);
        val request = new MockHttpServletRequest();
        request.setMethod(HttpMethod.GET.name());
        assertThrows(RuntimeException.class, () -> adapter.handle(request, new MockHttpServletResponse(), mock(FlowHandler.class)));
        assertNotNull(request.getAttribute(CasWebflowExecutionPlan.class.getName()));
    }
This is {@link CasFlowHandlerAdapterTests}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-webflow-api/src/test/java/org/apereo/cas/web/flow/CasFlowHandlerAdapterTests.java