Writing tests for api, setUp, tearDown need changes to take scheduler into account. WIP