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

        val tgt = new MockTicketGrantingTicket("casuser");
        WebUtils.putTicketGrantingTicketInScopes(context, tgt);
        WebUtils.putTicketGrantingTicket(context, tgt);
        ticketRegistry.addTicket(tgt);
        val result = prepareAccountProfilePasswordMgmtAction.execute(context);
        assertNull(result);
        assertTrue(WebUtils.isPasswordManagementEnabled(context));
        assertFalse(WebUtils.isForgotUsernameEnabled(context));
        assertNotNull(PasswordManagementWebflowUtils.getPasswordResetQuestions(context, Map.class));

        assertEquals(0, accountProfileServiceTicketGeneratorAuthority.getOrder());
        assertFalse(accountProfileServiceTicketGeneratorAuthority.shouldGenerate(
            mock(AuthenticationResult.class), mock(Service.class)));
        val url = StringUtils.appendIfMissing(casProperties.getServer().getPrefix(), "/")
            .concat(CasWebflowConfigurer.FLOW_ID_ACCOUNT);
        val service = RegisteredServiceTestUtils.getService(url);
        assertTrue(accountProfileServiceTicketGeneratorAuthority.supports(
            mock(AuthenticationResult.class), service));
    }
This is {@link AccountProfilePreparePasswordManagementActionTests}.

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