Refactor: tests of task_controller