adding unit test for controller