Test cases for controller.