Code review comment: `ScheduledUnit` will just use the `ExecutionVertexID` of the given `Execution`, so that the location preference in this execution param will not take effect. The location preference takes effect in the following slotProfile param(e.g. `slotProfileForLocation(loc1)`)

Code before review:
public void testGetsNonLocalFromSharingGroupFirst() throws Exception {
JobVertexID jid1 = new JobVertexID();
JobVertexID jid2 = new JobVertexID();
JobVertexID jid3 = new JobVertexID();
TaskManagerLocation loc1 = testingSlotProvider.addTaskManager(1);
TaskManagerLocation loc2 = testingSlotProvider.addTaskManager(1);
assertEquals(2, testingSlotProvider.getNumberOfAvailableSlots());
SlotSharingGroup sharingGroup = new SlotSharingGroup();
CoLocationGroup ccg = new CoLocationGroup();
CoLocationConstraint cc1 = new CoLocationConstraint(ccg);
CoLocationConstraint cc2 = new CoLocationConstraint(ccg);
LogicalSlot s1 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s2 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
LogicalSlot s3 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s4 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s5 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
LogicalSlot s6 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
assertEquals(s1.getTaskManagerLocation(), s3.getTaskManagerLocation());
assertEquals(s2.getTaskManagerLocation(), s4.getTaskManagerLocation());
assertEquals(s1.getTaskManagerLocation(), s5.getTaskManagerLocation());
assertEquals(s2.getTaskManagerLocation(), s6.getTaskManagerLocation());
assertEquals(0, testingSlotProvider.getNumberOfAvailableSlots());
assertEquals(5, testingSlotProvider.getNumberOfLocalizedAssignments());
assertTrue(1 == testingSlotProvider.getNumberOfNonLocalizedAssignments() || 1 == testingSlotProvider.getNumberOfHostLocalizedAssignments());
assertEquals(0, testingSlotProvider.getNumberOfUnconstrainedAssignments());
s1.releaseSlot();
s2.releaseSlot();
s3.releaseSlot();
s4.releaseSlot();
s5.releaseSlot();
s6.releaseSlot();
assertEquals(2, testingSlotProvider.getNumberOfAvailableSlots());
}

Line under review: new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();

Code after addressing the review:
public void testGetsNonLocalFromSharingGroupFirst() throws Exception {
JobVertexID jid1 = new JobVertexID();
JobVertexID jid2 = new JobVertexID();
JobVertexID jid3 = new JobVertexID();
TaskManagerLocation loc1 = testingSlotProvider.addTaskManager(1);
TaskManagerLocation loc2 = testingSlotProvider.addTaskManager(1);
assertEquals(2, testingSlotProvider.getNumberOfAvailableSlots());
SlotSharingGroup sharingGroup = new SlotSharingGroup();
CoLocationGroup ccg = new CoLocationGroup();
CoLocationConstraint cc1 = new CoLocationConstraint(ccg);
CoLocationConstraint cc2 = new CoLocationConstraint(ccg);
LogicalSlot s1 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s2 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
LogicalSlot s3 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s4 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s5 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
LogicalSlot s6 = testingSlotProvider.allocateSlot(
new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
assertEquals(s1.getTaskManagerLocation(), s3.getTaskManagerLocation());
assertEquals(s2.getTaskManagerLocation(), s4.getTaskManagerLocation());
assertEquals(s1.getTaskManagerLocation(), s5.getTaskManagerLocation());
assertEquals(s2.getTaskManagerLocation(), s6.getTaskManagerLocation());
assertEquals(0, testingSlotProvider.getNumberOfAvailableSlots());
assertEquals(5, testingSlotProvider.getNumberOfLocalizedAssignments());
assertTrue(1 == testingSlotProvider.getNumberOfNonLocalizedAssignments() || 1 == testingSlotProvider.getNumberOfHostLocalizedAssignments());
assertEquals(0, testingSlotProvider.getNumberOfUnconstrainedAssignments());
s1.releaseSlot();
s2.releaseSlot();
s3.releaseSlot();
s4.releaseSlot();
s5.releaseSlot();
s6.releaseSlot();
assertEquals(2, testingSlotProvider.getNumberOfAvailableSlots());
}