Set controller as a service & added unit test