tests for search method