Refactor controllers tests