Refactoring Search service snippets + test cases as per latest patterns.