@Test
public void test_updatePassword_failure_500() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    UserpassUser user = new UserpassUser("testuser", "testuser", "default");
    String jsonStr = "{  \"username\": \"testuser\",  \"password\": \"testuser\",  \"policies\": \"default\"}";
    Response response = getMockResponse(HttpStatus.INTERNAL_SERVER_ERROR, true, "{\"errors\":[\"Update password failed\"]}");
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("{\"errors\":[\"Update password failed\"]}");
    when(JSONUtil.getJSON(user)).thenReturn(jsonStr);
    when(reqProcessor.process("/auth/userpass/update",jsonStr,token)).thenReturn(response);
    ResponseEntity<String> responseEntity = userPassService.updatePassword(token,user);
    assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}