@Test
public void createsFailedItemMetadata() {

    // given
    JestHttpFailedItemOps failedItemOps = new JestHttpFailedItemOps();
    StringItemSource itemSource = mock(StringItemSource.class);
    String expectedSource = UUID.randomUUID().toString();
    when(itemSource.getSource()).thenReturn(expectedSource);
    String expectedIndex = UUID.randomUUID().toString();
    AbstractDocumentTargetedAction request = createDefaultTestIndexRequest(itemSource, expectedIndex);
    // when
    FailedItemInfo result = failedItemOps.createInfo(request);
    // then
    assertEquals(expectedIndex, result.getTargetName());
}