@Test(timeout = 10000)
public void testScheduleEverything() throws Exception {

  final PhysicalPlan physicalPlan =
    TestPlanGenerator.generatePhysicalPlan(TestPlanGenerator.PlanType.TwoVerticesJoined, false);
  final int numOfTotalTasks = physicalPlan.getStageDAG().getVertices().size() * ATTEMPTS_PER_STAGE;
  scheduler.schedulePlan(physicalPlan, 1);
  verify(pendingTaskCollectionPointer).setToOverwrite(argThat(tasks -> tasks.size() == numOfTotalTasks));
}