@Test
        void verifyUpdateSecurityQuestions() {
            val query = PasswordManagementQuery.builder().username("casuser").build();
            query.securityQuestion("Q1", "A1");
            try (val webServer = new MockWebServer(9308, HttpStatus.OK)) {
                webServer.start();

                val props = new CasConfigurationProperties();
                val rest = props.getAuthn().getPm().getRest();
                rest.setEndpointUrlChange("http://localhost:9308");
                rest.setEndpointUrlSecurityQuestions("http://localhost:9308");
                rest.setEndpointUrlEmail("http://localhost:9308");
                rest.getHeaders().put("header1", "value1");
                val passwordService = getRestPasswordManagementService(props);

                assertDoesNotThrow(() -> passwordService.updateSecurityQuestions(query));
            }
        }
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