Add tests for APIClient