tests for the api service