add Api service with unit test and dependency injection