@Test
public void testSpeculativeMapFetchFailure() {

  // Setup a scenario where speculative task wins, first attempt killed
  mockTask = createMockTask(TaskType.MAP);
  runSpeculativeTaskAttemptSucceeds(TaskEventType.T_ATTEMPT_KILLED);
  assertEquals(2, taskAttempts.size());
  // speculative attempt retroactively fails from fetch failures
  mockTask.handle(new TaskTAttemptFailedEvent(
      taskAttempts.get(1).getAttemptId()));
  assertTaskScheduledState();
  assertEquals(3, taskAttempts.size());
}