@Test public void testSlotAllocatedWithEnoughResource() { SlotSharingResourceTestContext context = createResourceTestContext(new ResourceProfile(16.0, 1600)); for (SlotSharingManager.SingleTaskSlot singleTaskSlot : context.singleTaskSlotsInOrder) { assertThat(singleTaskSlot.getLogicalSlotFuture().isDone(), is(true)); assertThat(singleTaskSlot.getLogicalSlotFuture().isCompletedExceptionally(), is(false)); } assertThat(context.slotSharingManager.getTaskSlot(context.coLocationTaskSlot.getSlotRequestId()), notNullValue()); }
@Nullable TaskSlot getTaskSlot(SlotRequestId slotRequestId) { return allTaskSlots.get(slotRequestId); }
SlotSharingManager { @Nullable TaskSlot getTaskSlot(SlotRequestId slotRequestId) { return allTaskSlots.get(slotRequestId); } }
SlotSharingManager { @Nullable TaskSlot getTaskSlot(SlotRequestId slotRequestId) { return allTaskSlots.get(slotRequestId); } SlotSharingManager(
			SlotSharingGroupId slotSharingGroupId,
			AllocatedSlotActions allocatedSlotActions,
			SlotOwner slotOwner); }
SlotSharingManager { @Nullable TaskSlot getTaskSlot(SlotRequestId slotRequestId) { return allTaskSlots.get(slotRequestId); } SlotSharingManager(
			SlotSharingGroupId slotSharingGroupId,
			AllocatedSlotActions allocatedSlotActions,
			SlotOwner slotOwner); boolean isEmpty(); boolean contains(SlotRequestId slotRequestId); @Nonnull Collection<SlotSelectionStrategy.SlotInfoAndResources> listResolvedRootSlotInfo(@Nullable AbstractID groupId); @Nullable MultiTaskSlot getResolvedRootSlot(@Nonnull SlotInfo slotInfo); @Override String toString(); @VisibleForTesting Collection<MultiTaskSlot> getResolvedRootSlots(); }
SlotSharingManager { @Nullable TaskSlot getTaskSlot(SlotRequestId slotRequestId) { return allTaskSlots.get(slotRequestId); } SlotSharingManager(
			SlotSharingGroupId slotSharingGroupId,
			AllocatedSlotActions allocatedSlotActions,
			SlotOwner slotOwner); boolean isEmpty(); boolean contains(SlotRequestId slotRequestId); @Nonnull Collection<SlotSelectionStrategy.SlotInfoAndResources> listResolvedRootSlotInfo(@Nullable AbstractID groupId); @Nullable MultiTaskSlot getResolvedRootSlot(@Nonnull SlotInfo slotInfo); @Override String toString(); @VisibleForTesting Collection<MultiTaskSlot> getResolvedRootSlots();  }