added tests for search api