Add tests for the scheduler