unit test for the controller