@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 = accountProfilePasswordChangeRequestAction.execute(context);
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, result.getId());
        assertNotNull(WebUtils.getServiceRedirectUrl(context));
        assertThrows(InvalidTicketException.class, () -> ticketRegistry.getTicket(tgt.getId(), TicketGrantingTicket.class));
    }
This is {@link AccountProfilePasswordChangeRequestActionTests}.

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