@Test
        void verifyOperation() throws Throwable {
            assertFalse(casWebflowExecutionPlan.getWebflowConfigurers().isEmpty());
            val flow = (Flow) flowDefinitionRegistry.getFlowDefinition(CasWebflowConfigurer.FLOW_ID_LOGIN);
            assertNotNull(flow);
            var state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_AUTHENTICATION_BLOCKED);
            assertNotNull(state);
            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_INVALID_WORKSTATION);
            assertNotNull(state);
            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_INVALID_AUTHENTICATION_HOURS);
            assertNotNull(state);
            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_ACCOUNT_LOCKED);
            assertNotNull(state);
            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_ACCOUNT_DISABLED);
            assertNotNull(state);
            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_PASSWORD_UPDATE_SUCCESS);
            assertNotNull(state);

            val webflowAttributeMappings = passwordManagementMultifactorWebflowCustomizer.getWebflowAttributeMappings();
            assertTrue(webflowAttributeMappings.contains(CasWebflowConstants.ATTRIBUTE_PASSWORD_MANAGEMENT_QUERY));
            assertTrue(webflowAttributeMappings.contains(CasWebflowConstants.ATTRIBUTE_PASSWORD_MANAGEMENT_REQUEST));
            assertTrue(webflowAttributeMappings.contains(CasWebflowConstants.ATTRIBUTE_AUTHENTICATION));
            assertTrue(webflowAttributeMappings.contains(CasWebflowConstants.ATTRIBUTE_AUTHENTICATION_RESULT_BUILDER));

            val handler = mock(FlowHandler.class);
            when(handler.getFlowId()).thenReturn(CasWebflowConfigurer.FLOW_ID_PASSWORD_RESET);
            assertTrue(passwordResetHandlerAdapter.supports(handler));

            val startState = (ActionState) flow.getStartState();
            assertEquals(CasWebflowConstants.STATE_ID_PASSWORD_RESET_SUBFLOW,
                startState.getTransition(CasWebflowConstants.TRANSITION_ID_RESUME_RESET_PASSWORD).getTargetStateId());

            val context = MockRequestContext.create(applicationContext);
            assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, verifySecurityQuestionsAction.execute(context).getId());

            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_EXPIRED_PASSWORD);
            assertNotNull(state);
            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_MUST_CHANGE_PASSWORD);
            assertNotNull(state);

            state = (TransitionableState) flow.getState(CasWebflowConstants.STATE_ID_PASSWORD_CHANGE);
            assertNotNull(state);

            val event = StreamSupport.stream(flow.getStartActionList().spliterator(), false)
                .filter(ConsumerExecutionAction.class::isInstance)
                .findFirst()
                .orElseThrow()
                .execute(context);
            assertNull(event);
            assertTrue(WebUtils.isPasswordManagementEnabled(context));
            assertTrue(WebUtils.isForgotUsernameEnabled(context));

            val passwordResetFlow = (Flow) flowDefinitionRegistry.getFlowDefinition(CasWebflowConfigurer.FLOW_ID_PASSWORD_RESET);
            val sendAcct = (TransitionableState) passwordResetFlow.getState(CasWebflowConstants.STATE_ID_INIT_PASSWORD_RESET);
            assertEquals(sendAcct.getTransition(casSimpleMultifactorAuthenticationProvider.getId()).getTargetStateId(),
                casSimpleMultifactorAuthenticationProvider.getId());
        }
This is {@link PasswordManagementWebflowConfigurerTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-pm-webflow/src/test/java/org/apereo/cas/pm/web/flow/PasswordManagementWebflowConfigurerTests.java