Unit test for controller.