@Test
public void resetPasswordTest() {

    Response response = target().path("users/username/password")
            .queryParam("newPassword", "XYZ")
            .request().put(Entity.entity("user", MediaType.MULTIPART_FORM_DATA));
    assertEquals(response.getStatus(), 200);
    verify(engineManager, atLeastOnce()).retrieveUser(ENGINE_NAME, "username");
    verify(engineManager).updateUser(eq(ENGINE_NAME), any(User.class));
}