Added unit tests for search api's