Added unit tests for the sleep worker.