@Test
public void testVersion() throws Exception {
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"transient-engine-application-context.xml", "SimpleTransientEngineTest-application-context.xml"});
TransientScottyEngine _engine = (TransientScottyEngine) context.getBean("transientEngine");
assertEquals(EngineState.STARTED,_engine.getEngineState());
ProcessingEngine engine = _engine;
try {
final BlockingResponseReceiver<String> brr = new BlockingResponseReceiver<String>();
final WorkflowInstanceDescr<BlockingResponseReceiver<String>> descr = new WorkflowInstanceDescr<BlockingResponseReceiver<String>>(VersionTestWorkflowDef.NAME);
descr.setVersion(new WorkflowVersion(1, 0, 1));
descr.setData(brr);
engine.run(descr);
brr.wait4response(5000);
final String workflowClassname = brr.getResponse();
assertEquals("de.scoopgmbh.copper.test.versioning.VersionTestWorkflow_1_0_1", workflowClassname);
}
finally {
context.close();
}
assertEquals(EngineState.STOPPED,engine.getEngineState());
}