Writing unit tests for controller and service