@Test
public void testSpeculativeMapFailedFetchFailure() {

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