validations and testing for product model