Refactoring the test to include external search engine dependency