// add repo and subscribe resource to it; test metadata query
Repo repo = new Repo("testPVCSRepo");
em.persist(repo);
RepoContentSource ccsmapping = repo.addContentSource(cs);
em.persist(ccsmapping);
ResourceRepo subscription = repo.addResource(resource);
em.persist(subscription);
RepoPackageVersion mapping = repo.addPackageVersion(pv);
em.persist(mapping);
em.flush();