Product entity doesn't accept the attributes array
I try to use the getArrayCopy() method in order to merge the product entity values and the attributes values all in one as suggested by rahuldroy