Improve tests for controller