CC-5651: Unit Test the Scheduler

Some fine tuning