@Test
public void testGetMaxScoreWhenMissing() {

    SearchResult searchResult = new SearchResult(new Gson());
    searchResult.setSucceeded(true);
    searchResult.setJsonString(json);
    searchResult.setJsonObject(new JsonParser().parse(json).getAsJsonObject());
    searchResult.setPathToResult("hits/hits/_source");
    Float maxScore = searchResult.getMaxScore();
    assertNull(maxScore);
}