//Make sure calls to searchMessages uses the real implementation
when(searchService.searchMessages(any(Account.class), anyString(), anyMap(), any(JSONObject.class))).thenCallRealMethod();
//Make call to makeRequest so that it returns the elasticSearchPayload
when(searchService.makeRequest(anyString(),any(JSONObject.class),anyMap(),anyString())).thenReturn(elasticSearchPayload);
Account a = new Account.Builder().name("testAccount").build();
a.setId(new ObjectId());