QName qName2 = new QName("http://ode/bpel/unit-test", "HelloWorld2-2");
QName qName3 = new QName("http://ode/bpel/unit-test", "HelloWorld2-3");
@Test public void testRetireOld() throws Throwable {
deploy("/bpel/2.0/TestVersionedRedeploy/HelloWorld-1");
ProcessConf conf = store.getProcessConfiguration(qName1);
Assert.assertEquals(ProcessState.ACTIVE, conf.getState());
deploy("/bpel/2.0/TestVersionedRedeploy/HelloWorld-2");
// Now 1 should be retired and 2 active
conf = store.getProcessConfiguration(qName1);
Assert.assertEquals(ProcessState.RETIRED, conf.getState());
conf = store.getProcessConfiguration(qName2);
Assert.assertEquals(ProcessState.ACTIVE, conf.getState());
deploy("/bpel/2.0/TestVersionedRedeploy/HelloWorld-3");
// 1 and 2 should be retired and 3 active
conf = store.getProcessConfiguration(qName1);
Assert.assertEquals(ProcessState.RETIRED, conf.getState());
conf = store.getProcessConfiguration(qName2);
Assert.assertEquals(ProcessState.RETIRED, conf.getState());
conf = store.getProcessConfiguration(qName3);
Assert.assertEquals(ProcessState.ACTIVE, conf.getState());
}