Added unit test for controller