@Test
public void test_login_failure_500() {

    UserLogin user = new UserLogin("testuser", "testuser");
    String jsonStr = "{\"username\":\"testuser\",\"password\":\"testuser\"}";
    String responseJson = "{\"errors\": [\"User Authentication failed\", \"This may be due to vault services are down or vault services are not reachable\"]}";
    Response response = getMockResponse(HttpStatus.INTERNAL_SERVER_ERROR, true, responseJson);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseJson);
    when(JSONUtil.getJSON(user)).thenReturn(jsonStr);
    when(reqProcessor.process("/auth/userpass/login",jsonStr,"")).thenReturn(response);
    ResponseEntity<String> responseEntity = userPassService.login(user);
    assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}