@Test
public void throwsOnStringSource() {

    // given
    PooledItemSourceFactory bufferedSourceFactory = PooledItemSourceFactoryTest.createDefaultTestSourceFactoryConfig().build();
    BufferedBulkOperations bufferedBulkOperations = new BufferedBulkOperations(bufferedSourceFactory);
    String indexName = UUID.randomUUID().toString();
    String source = UUID.randomUUID().toString();
    expectedException.expect(UnsupportedOperationException.class);
    expectedException.expectMessage("Use ItemSource based API instead");
    // when
    bufferedBulkOperations.createBatchItem(indexName, source);
}