@Test
public void nonStringItemSourceIsNotSupported() {

    // given
    BatchOperations<Bulk> bulkOperations = JestHttpObjectFactoryTest.createTestObjectFactoryBuilder().build().createBatchOperations();
    ItemSource itemSource = Object::new;
    expectedException.expect(ConfigurationException.class);
    expectedException.expectMessage("Non String payloads are not supported");
    // when
    bulkOperations.createBatchItem("testIndex", itemSource);
}