@Test
public void testIsMap() {

  JobID jobId = new JobID("1234", 0);
  for (TaskType type : TaskType.values()) {
    TaskID taskId = new TaskID(jobId, type, 0);
    if (type == TaskType.MAP) {
      assertTrue("TaskID for map task did not correctly identify itself "
          + "as a map task", taskId.isMap());
    } else {
      assertFalse("TaskID for " + type + " task incorrectly identified "
          + "itself as a map task", taskId.isMap());
    }
  }
  TaskID taskId = new TaskID();
  assertFalse("TaskID of default type incorrectly identified itself as a "
      + "map task", taskId.isMap());
}