Add test for the worker API