@Test
public void testGetTotal() {

    SearchResult searchResult = new SearchResult(new Gson());
    searchResult.setSucceeded(true);
    searchResult.setJsonString(json);
    searchResult.setJsonObject(new JsonParser().parse(json).getAsJsonObject());
    searchResult.setPathToResult("hits/hits/_source");
    Long total = searchResult.getTotal();
    assertNotNull(total);
    assertEquals(new Long(1L), total);
}