added unit tests for scheduler