add unit test for controller