Refactor worker's test-case