Added unit tests for smart_worker.py