Modify ProductGroup to assign parent in constructor, fixed tests.