Added unit tests to TaskScheduler.