Refactoring some test and adding a new test to validate Search functionality