test added for method stopTask.