CC-5651: Unit Test the Scheduler

Added more database tests