Description
When you create a Generic value with groovy, you need to initial it with makeValue and after set all fields.
GenericValue product = makeValue('Product')
product.internalName = parameters.internalName
I propose to simplify this dsl with an automatic parameters check so you can call directly like that :
GenericValue product = makeValue('Product', parameters)