### Question:
JestHttpFailedItemOps implements FailedItemOps<AbstractDocumentTargetedAction<DocumentResult>> { @Override public FailedItemSource createItem(AbstractDocumentTargetedAction<DocumentResult> failedItem) { FailedItemInfo failedItemInfo = createInfo(failedItem); return new FailedItemSource<>( new StringItemSource((String) itemIntrospector.getPayload(failedItem)), failedItemInfo ); }  @Override FailedItemSource createItem(AbstractDocumentTargetedAction<DocumentResult> failedItem); @Override FailedItemInfo createInfo(AbstractDocumentTargetedAction<DocumentResult> failed);  }### Answer:
@Test public void createsFailedItemSourceFromGivenRequest() { 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); FailedItemSource result = failedItemOps.createItem(request); assertEquals(expectedSource, result.getSource()); assertEquals(expectedIndex, result.getInfo().getTargetName()); }