@Test
public void changePasswordTest() {

    Response response = target().path("users/" + UsernameTestFilter.USERNAME + "/password")
            .queryParam("currentPassword", "ABC")
            .queryParam("newPassword", "XYZ")
            .request().post(Entity.entity("", MediaType.MULTIPART_FORM_DATA));
    assertEquals(response.getStatus(), 200);
    verify(engineManager).checkPassword(ENGINE_NAME, UsernameTestFilter.USERNAME, "ABC");
    verify(engineManager, atLeastOnce()).retrieveUser(ENGINE_NAME, UsernameTestFilter.USERNAME);
    verify(engineManager).updateUser(eq(ENGINE_NAME), any(User.class));
}