}
protected void assertProcessCleanup(ProcessDAO process) throws Exception {
if( process != null ) {
initTM();
ProcessProfileDAO profile = daoConn.createProcessProfile(process);
assertTrue("Process should have been deleted.", !profile.doesProcessExist());
assertEquals("Number of instances", 0, profile.findInstancesByProcess().size());
assertEquals("Number of activity recoveries", 0, profile.findActivityRecoveriesByProcess().size());
assertEquals("Number of correlation sets", 0, profile.findCorrelationSetsByProcess().size());
assertEquals("Number of correlators", 0, profile.findCorrelatorsByProcess().size());
assertEquals("Number of faults", 0, profile.findFaultsByProcess().size());
assertEquals("Number of message exchanges", 0, profile.findMessageExchangesByProcess().size());
assertEquals("Number of message routes", 0, profile.findMessageRoutesByProcess().size());
assertEquals("Number of messages", 0, profile.findMessagesByProcess().size());
assertEquals("Number of partner links", 0, profile.findPartnerLinksByProcess().size());
assertEquals("Number of scopes", 0, profile.findScopesByProcess().size());
assertEquals("Number of variables", 0, profile.findXmlDataByProcess().size());
assertEquals("Number of events", 0, profile.countEventsByProcess());
assertEquals("Number of large data", 0, getLargeDataCount(0) - initialLargeDataCount);
}
}