Refactoring tests to use a search background thread.