write testing code for location and product model