### Question:
BufferedIndex extends AbstractDocumentTargetedAction<DocumentResult> implements BulkableAction<DocumentResult> { @Override public String getData(Gson gson) { throw new UnsupportedOperationException("BufferedIndex cannot return Strings. Use getSource() instead"); } protected  BufferedIndex(Builder builder); @Override String getData(Gson gson); @Override DocumentResult createNewElasticSearchResult(String responseBody, int statusCode, String reasonPhrase, Gson gson); final ItemSource<ByteBuf> getSource(); @Override final String getRestMethodName(); @Override final String getBulkMethodName(); void release();  }### Answer:
@Test public void getDataIsUnsupported() { BufferedIndex bufferedIndex = new BufferedIndex.Builder(mock(ByteBufItemSource.class)).build(); expectedException.expect(UnsupportedOperationException.class); expectedException.expectMessage("BufferedIndex cannot return Strings. Use getSource() instead"); bufferedIndex.getData(null); }