Implement noApplicationSearchTest.
Refactor replace code to a method.