@Test
    void verifyDuplicateSubflowState() {
        val registry = mock(FlowDefinitionRegistry.class);
        val cfg = new AbstractCasWebflowConfigurer(mock(FlowBuilderServices.class),
            registry, new StaticApplicationContext(), new CasConfigurationProperties()) {
        };
        val flow = mock(Flow.class);
        val state = mock(SubflowState.class);
        when(flow.containsState("SubflowState")).thenReturn(Boolean.TRUE);
        when(flow.getTransitionableState("SubflowState")).thenReturn(state);
        val subState = cfg.createSubflowState(flow, "SubflowState", "SubflowState", mock(Action.class));
        assertNotNull(subState);
    }
This is {@link CasWebflowConfigurerTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/configurer/CasWebflowConfigurerTests.java