Scheduler tests

Plus some `TestScheduler` improvements.