Add Scheduler scenario test. Instantiate SchedulerClient using CreateClient. Fix testcleanup to write session records if not mocked. Bug fixes