unit testing service class