DocumentResult extends JestResult { public String getIndex() { return getAsString(jsonObject.get("_index")); } DocumentResult(Gson gson); String getIndex(); String getType(); String getId(); Long getVersion();  }
@Test public void shouldFetchIndexFromValidResponse() { assertEquals("testIndex", validResult.getIndex()); }
@Test public void shouldReturnNullIndexOnInvalidResponse() { assertNull(invalidResult.getIndex()); }