refactored Product resource and added search resource test cases