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

        val ticketId = UUID.randomUUID().toString();
        val sts = mock(TransientSessionTicket.class);
        when(sts.getProperties()).thenReturn(Map.of(PasswordManagementService.PARAMETER_TOKEN, "invalid"));
        when(sts.getId()).thenReturn(ticketId);
        ticketRegistry.addTicket(sts);

        context.setParameter(PasswordManagementService.PARAMETER_PASSWORD_RESET_TOKEN, ticketId);
        assertEquals(CasWebflowConstants.TRANSITION_ID_INVALID_PASSWORD_RESET_TOKEN, validatePasswordResetTokenAction.execute(context).getId());
    }
This is {@link ValidatePasswordResetTokenActionTests}.

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