unit tests for endpoint service