Handle search for invalid id and test case