Added unit test for the controller