@Test
public void testGetHits() {

    SearchResult searchResult = new SearchResult(new Gson());
    searchResult.setSucceeded(true);
    searchResult.setJsonString(json);
    searchResult.setJsonObject(new JsonParser().parse(json).getAsJsonObject());
    searchResult.setPathToResult("hits/hits/_source");
    List hits = searchResult.getHits(Object.class);
    assertNotNull(hits);
    assertFalse("should have 1 hit", hits.isEmpty());
    hits = searchResult.getHits(Object.class, Object.class);
    assertNotNull(hits);
    assertFalse("should have 1 hit", hits.isEmpty());
}