@Test
public void testGetHitsWhenOperationFails() {

    SearchResult searchResult = new SearchResult(new Gson());
    searchResult.setSucceeded(false);
    List hits = searchResult.getHits(Object.class);
    assertNotNull(hits);
    assertTrue(hits.isEmpty());
    hits = searchResult.getHits(Object.class, Object.class);
    assertNotNull(hits);
    assertTrue(hits.isEmpty());
}