Added tests for search endpoint.