@Test
public void testGetFirstHitWhenOperationFails() {

    SearchResult searchResult = new SearchResult(new Gson());
    searchResult.setSucceeded(false);
    SearchResult.Hit hit = searchResult.getFirstHit(Object.class);
    assertNull(hit);
    hit = searchResult.getFirstHit(Object.class, Object.class);
    assertNull(hit);
}