add tests for client endpoint