Adding test for stopping a task.