em.persist(package1);
// Package 2 - Has list of product versions that contains the resource's version
package2 = new Package("Package2", packageType1);
PackageVersion packageVersion2 = new PackageVersion(package2, "1.0.0", architecture);
ProductVersionPackageVersion pvpv1 = packageVersion2.addProductVersion(productVersion1);
ProductVersionPackageVersion pvpv2 = packageVersion2.addProductVersion(productVersion2);
package2.addVersion(packageVersion2);
em.persist(package2);
em.persist(pvpv1);
em.persist(pvpv2);
// Package 3 - Has list of product versions where the resource version is not included
package3 = new Package("Package3", packageType1);
PackageVersion packageVersion3 = new PackageVersion(package3, "1.0.0", architecture);
ProductVersionPackageVersion pvpv3 = packageVersion3.addProductVersion(productVersion2);
package3.addVersion(packageVersion3);
em.persist(package3);
em.persist(pvpv3);