added unit tests for service and controller