@Test
public void createNewElasticSearchResultIsUnsupported() {

    // given
    BufferedIndex bufferedIndex = new BufferedIndex.Builder(mock(ByteBufItemSource.class)).build();
    expectedException.expect(UnsupportedOperationException.class);
    expectedException.expectMessage("BufferedIndex cannot handle String result. Use buffer-based API");
    // when
    bufferedIndex.createNewElasticSearchResult(null, 0, null, null);
}