test for search method