@Test
public void testFindLatest() throws Exception {
final ConfigurableApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"transient-engine-application-context.xml", "SimpleTransientEngineTest-application-context.xml"});
try {
final WorkflowRepository repo = context.getBean(WorkflowRepository.class);
WorkflowVersion v = repo.findLatestMajorVersion(VersionTestWorkflowDef.NAME, 9);
assertEquals(new WorkflowVersion(9, 3, 1), v);
v = repo.findLatestMinorVersion(VersionTestWorkflowDef.NAME, 9, 1);
assertEquals(new WorkflowVersion(9, 1, 1), v);
}
finally {
context.close();
}