@Test
public void test_authenticateLdap_successfully() {

    UserLogin userLogin = new UserLogin("safeadmin", "safeadmin");
    Response response = getMockResponse(HttpStatus.OK, true, "{\"messages\":[\"Authentication Successful\"]}");
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"Authentication Successful\"]}");
    String jsonStr = "{  \"username\": \"safeadmin\", \"password\": \"safeadmin\"}";
    when(JSONUtil.getJSON(userLogin)).thenReturn(jsonStr);
    when(reqProcessor.process("/auth/ldap/login",jsonStr,"")).thenReturn(response);
    ResponseEntity<String> responseEntity = ldapAuthService.authenticateLdap(userLogin);
    assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}