Source:
<code>public void testStartProcessFromNodeIds() { assertNotNull(deploymentService); KModuleDeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION); deploymentService.deploy(deploymentUnit); units.add(deploymentUnit); assertNotNull(processService); Long processInstanceId = processService.startProcess(deploymentUnit.getIdentifier(), "restart.simple", singletonMap("var_a", 3)); assertNotNull(processInstanceId); processService.abortProcessInstance(processInstanceId); Collection<NodeInstanceDesc> logs = runtimeDataService.getProcessInstanceFullHistoryByType(processInstanceId, EntryType.ABORTED, new QueryContext(0, 0)); <START> String[] nodeIds = logs.stream().map(e -> e.getNodeId()).toArray(String[]::new); <END> processInstanceId = processService.startProcessFromNodeIds(deploymentUnit.getIdentifier(), "restart.simple", singletonMap("var_a", 3), nodeIds); runtimeDataService.getTasksByProcessInstanceId(processInstanceId).forEach(e -> { this.userTaskService.start(e, "john"); this.userTaskService.complete(e, "john", emptyMap()); }); processService.abortProcessInstance(processInstanceId); logs = runtimeDataService.getProcessInstanceFullHistoryByType(processInstanceId, EntryType.ABORTED, new QueryContext(0, 0)); nodeIds = logs.stream().map(e -> e.getNodeId()).toArray(String[]::new); processInstanceId = processService.startProcessFromNodeIds(deploymentUnit.getIdentifier(), "restart.simple", singletonMap("var_a", 3), nodeIds); runtimeDataService.getTasksByProcessInstanceId(processInstanceId).forEach(e -> { this.userTaskService.start(e, "john"); this.userTaskService.complete(e, "john", emptyMap()); }); ProcessInstance pi = processService.getProcessInstance(processInstanceId); assertNull(pi); }</code><technical_language>I method reference suggestion String[] nodeIds = logs.stream().map(NodeInstanceDesc::getNodeId).toArray(String[]::new);</technical_language>

Target:
public void testStartProcessFromNodeIds() { assertNotNull(deploymentService); KModuleDeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION); deploymentService.deploy(deploymentUnit); units.add(deploymentUnit); assertNotNull(processService); Long processInstanceId = processService.startProcess(deploymentUnit.getIdentifier(), "restart.simple", singletonMap("var_a", 3)); assertNotNull(processInstanceId); processService.abortProcessInstance(processInstanceId); Collection<NodeInstanceDesc> logs = runtimeDataService.getProcessInstanceFullHistoryByType(processInstanceId, EntryType.ABORTED, new QueryContext(0, 0)); assertThat(logs.size(), is(1)); String[] nodeIds = logs.stream().map(NodeInstanceDesc::getNodeId).toArray(String[]::new); processInstanceId = processService.startProcessFromNodeIds(deploymentUnit.getIdentifier(), "restart.simple", singletonMap("var_a", 3), nodeIds); runtimeDataService.getTasksByProcessInstanceId(processInstanceId).forEach(e -> { this.userTaskService.start(e, "john"); this.userTaskService.complete(e, "john", emptyMap()); }); processService.abortProcessInstance(processInstanceId); logs = runtimeDataService.getProcessInstanceFullHistoryByType(processInstanceId, EntryType.ABORTED, new QueryContext(0, 0)); nodeIds = logs.stream().map(NodeInstanceDesc::getNodeId).toArray(String[]::new); processInstanceId = processService.startProcessFromNodeIds(deploymentUnit.getIdentifier(), "restart.simple", singletonMap("var_a", 3), nodeIds); runtimeDataService.getTasksByProcessInstanceId(processInstanceId).forEach(e -> { this.userTaskService.start(e, "john"); this.userTaskService.complete(e, "john", emptyMap()); }); ProcessInstance pi = processService.getProcessInstance(processInstanceId); assertNull(pi); }