@Test
    void verifyValidity() throws Throwable {
        val request = new PasswordChangeRequest("casuser", "current-psw".toCharArray(), "123456".toCharArray(), "123456".toCharArray());
        assertFalse(passwordHistoryService.exists(request));
        assertTrue(passwordHistoryService.store(request));
        assertTrue(passwordHistoryService.fetchAll().isEmpty());
        assertTrue(passwordHistoryService.fetch("casuser").isEmpty());
        assertDoesNotThrow(() -> {
            passwordHistoryService.remove("casuser");
            passwordHistoryService.removeAll();
        });
    }
This is {@link GroovyPasswordHistoryServiceTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-pm/src/test/java/org/apereo/cas/pm/history/GroovyPasswordHistoryServiceTests.java