assertNotNull(asnycBeforeJobDefinition);
assertNotNull(asnycAfterJobDefinition);
// when the process instances are migrated
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
commandExecutor.execute(new SetProcessDefinitionVersionCmd(asyncBeforeInstance.getId(), 2));
commandExecutor.execute(new SetProcessDefinitionVersionCmd(asyncAfterInstance.getId(), 2));
// then the the job's definition reference should also be migrated
Job migratedAsyncBeforeJob = managementService.createJobQuery()
.processInstanceId(asyncBeforeInstance.getId()).singleResult();
assertEquals(asyncBeforeJob.getId(), migratedAsyncBeforeJob.getId());