Scheduler implements IScheduler<T> { public Scheduler() { queue = new IterablePriorityQueue<LObject<T>>(getObjectComparator()); } Scheduler();  Scheduler(Project<T, ?, ?, ?> project, IPriorityCalculator<T> calculator); @Override void update(); @Override void update(LObject<T> object); @Override LObject<T> nextObject(); @Override LObject<T> nextObject(Worker worker); @Override void setUpQueue(IPriorityCalculator<T> calculator); @Override void setSchedulerForWorker(ISchedulerForWorker schedulerForWorker); @Override void registerOnProject(Project<T, ?, V, W> project); @Override IData<T> getData(); @Override IPriorityCalculator<T> getCalculator(); @Override String getId();  }
@Test public void schedulerTest() { final int objectsCount = 5; ContinuousProject cp = populate(objectsCount); IData<ContValue> data = cp.getData(); Scheduler<ContValue> scheduler = new Scheduler(cp, new DummyPriorityCalculator(data)); scheduler.update(); for (int i = 0; i < objectsCount; i++) { assertEquals(data.getObject("object0"), scheduler.nextObject()); } }