Advisory advobject = new Advisory(advisory, advisoryType, synopsis);
entityManager.persist(advobject);
int id1 = advobject.getId();
entityManager.flush();
CVE cve = advManager.createCVE(overlord, "CAN-2009:1203");
AdvisoryCVE advisory_cve = advManager.createAdvisoryCVE(overlord, advobject, cve);
PageList<AdvisoryCVE> cvelist = advManager.getAdvisoryCVEByAdvId(overlord, id1, PageControl
.getUnlimitedInstance());
assert cvelist != null;
assert cvelist.size() != 0;
advManager.deleteAdvisoryCVE(overlord, id1);
advManager.deleteCVE(overlord, cve.getId());
advManager.deleteAdvisoryByAdvId(overlord, advobject.getId());
advobject = advManager.getAdvisoryByName(advobject.getAdvisory());
assert advobject == null;
}