@Test
public void testScheduleSkewedTasks() {

  final SchedulingConstraint schedulingConstraint = new AntiAffinitySchedulingConstraint();
  // Create a StageEdge where two out of three are skewed hash ranges.
  final HashSet<Integer> antiAffinityGroup = new HashSet<>(Arrays.asList(0, 1));
  final ExecutionPropertyMap emap = new ExecutionPropertyMap(EXEc_MAP_ID);
  emap.put(ResourceAntiAffinityProperty.of(antiAffinityGroup));
  final Task task0 = mockTask(0, emap);  // anti-affinity task
  final Task task1 = mockTask(1, emap);  // anti-affinity task
  final Task task2 = mockTask(2, emap);  // normal task
  final ExecutorRepresenter e0 = mockExecutorRepresenter(task0);  // schedule task0 to e0
  assertEquals(false, schedulingConstraint.testSchedulability(e0, task1));
  assertEquals(true, schedulingConstraint.testSchedulability(e0, task2));
}