Improve the test coverage of services, controllers

Added more tests for services and controllers
`error` in stead of `err`