added test for search query exception