@Test
public void mappingTypeCanBeSet() {

    // given
    String expectedMappingType = UUID.randomUUID().toString();
    BatchOperations<Bulk> bulkOperations = new JestBulkOperations(expectedMappingType);
    String testPayload = "{ \"testfield\": \"testvalue\" }";
    StringItemSource itemSource = spy(new StringItemSource(testPayload));
    Index item = (Index) bulkOperations.createBatchItem("testIndex", itemSource);
    // when
    String type = item.getType();
    // then
    assertEquals(expectedMappingType, type);
}