public void testCleanupConfigurations() {
Collection<QName> deployed = _ps.deploy(_testdd);
QName pname = deployed.iterator().next();
assertNotNull(deployed);
assertEquals(1,deployed.size());
ProcessConf pconf = _ps.getProcessConfiguration(pname);
assertNotNull(pconf);
assertEquals(_testdd.getName(),pconf.getPackage());
assertEquals(pname, pconf.getProcessId());
assertEquals(EnumSet.allOf(CLEANUP_CATEGORY.class), pconf.getCleanupCategories(true));
assertEquals(EnumSet.of(CLEANUP_CATEGORY.MESSAGES, CLEANUP_CATEGORY.EVENTS), pconf.getCleanupCategories(false));
assertTrue(pconf.isCleanupCategoryEnabled(true, CLEANUP_CATEGORY.INSTANCE));
assertTrue(pconf.isCleanupCategoryEnabled(true, CLEANUP_CATEGORY.VARIABLES));
assertTrue(pconf.isCleanupCategoryEnabled(true, CLEANUP_CATEGORY.MESSAGES));
assertTrue(pconf.isCleanupCategoryEnabled(true, CLEANUP_CATEGORY.CORRELATIONS));
assertTrue(pconf.isCleanupCategoryEnabled(true, CLEANUP_CATEGORY.EVENTS));
assertFalse(pconf.isCleanupCategoryEnabled(false, CLEANUP_CATEGORY.INSTANCE));
assertFalse(pconf.isCleanupCategoryEnabled(false, CLEANUP_CATEGORY.VARIABLES));
assertTrue(pconf.isCleanupCategoryEnabled(false, CLEANUP_CATEGORY.MESSAGES));
assertFalse(pconf.isCleanupCategoryEnabled(false, CLEANUP_CATEGORY.CORRELATIONS));
assertTrue(pconf.isCleanupCategoryEnabled(false, CLEANUP_CATEGORY.EVENTS));
assertEquals(2, pconf.getCronJobs().size());
assertNotNull(pconf.getCronJobs().get(0).getCronExpression());
assertEquals(3, pconf.getCronJobs().get(0).getRunnableDetailList().size());
}