.setJobExecutorActivate(true).buildProcessEngine();
processEngine.getRepositoryService().createDeployment()
.addClasspathResource("diagrams/empty.bpmn20.xml").deploy();
try {
JavaDelegate delegate = new SpawnProcessForEachMachine(processEngine, EMPTY_PROCESS_KEY, "test", RESULT);
delegate.execute(execution);
@SuppressWarnings("unchecked")
List<String> processInstanceIds = (List<String>) collector.getVariable(RESULT);
assertThat(processInstanceIds).hasSize(2);