add tests for controller.