validation and unit tests for product model