@Test
        void verifyEmailFound() throws Throwable {
            val data = "casuser@example.org";
            try (val webServer = new MockWebServer(9091,
                new ByteArrayResource(data.getBytes(StandardCharsets.UTF_8), "REST Output"),
                MediaType.APPLICATION_JSON_VALUE)) {
                webServer.start();
                val email = this.passwordChangeService.findEmail(PasswordManagementQuery.builder().username("casuser").build());
                webServer.stop();
                assertNotNull(email);
                assertEquals(data, email);
            }

            try (val webServer = new MockWebServer(9091, HttpStatus.NO_CONTENT)) {
                webServer.start();
                assertNull(passwordChangeService.findEmail(PasswordManagementQuery.builder().username("casuser").build()));
                webServer.stop();
            }
        }
This is {@link RestPasswordManagementServiceTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-pm-rest/src/test/java/org/apereo/cas/pm/rest/RestPasswordManagementServiceTests.java