@Test
public void test_login_failure_400() {

    String jsonStr = "{  \"username\": \"safeadmin\",  \"password\": \"safeadmin\"}";
    UserLogin userLogin = new UserLogin("safeadmin", "safeadmin");
    String responseJson = "{\"errors\": [\"User Authentication failed\", \"Invalid username or password. Please retry again after correcting username or password.\"]}";
    Response response = getMockResponse(HttpStatus.BAD_REQUEST, true, responseJson);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body(responseJson);
    when(JSONUtil.getJSON(Mockito.any(UserLogin.class))).thenReturn(jsonStr);
    when(reqProcessor.process("/auth/userpass/login",jsonStr,"")).thenReturn(response);
    ResponseEntity<String> responseEntity = vaultAuthService.login(userLogin);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}