Worker test refactoring