Add unit tests for legacy search.
Add specs for new search api.
Drop old search api specs and add search integration tests.