added some unit tests for the worker