@Test(timeout = 5000, expected = IOException.class)
public void testErrorWhenReadingData() throws Exception {

  // Failed iterator
  final InputReader inputReader = generateInputReader(generateCompletableFuture(new FailedIterator()));
  // Fetcher
  final ParentTaskDataFetcher fetcher = createFetcher(inputReader);
  // Should throw an IOException
  fetcher.fetchDataElement(); // checked by 'expected = IOException.class'
}