Source:
<code>public void testGetProcessInstanceDiagramSummaryCompletedStatus() { ProcessInstanceKey instanceKey = new ProcessInstanceKey(serverTemplateId, containerId, processInstanceId); String svgContent = "<svg></svg>"; Integer state = org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED; String processName = "process"; <START> when(queryServicesClient.findProcessInstanceById(processInstanceId)).thenReturn(ProcessInstance.builder().id(processInstanceId).processId(processId).containerId(containerId).state(state).parentInstanceId(-1l).processName(processName).build()); <END> when(processImageService.getProcessInstanceDiagram(serverTemplateId, containerId, processInstanceId, "", "", "")).thenReturn(svgContent); when(processServicesClient.getProcessDefinition(containerId, processId)).thenReturn(new ProcessDefinition()); ProcessInstanceDiagramSummary summary = service.getProcessInstanceDiagramSummary(instanceKey, "", "", ""); assertEquals(processInstanceId, summary.getId()); assertEquals(processName, summary.getName()); assertEquals(svgContent, summary.getSvgContent()); assertNotNull(summary.getProcessDefinition()); assertThat(summary.getProcessDefinition().getNodes()).isEmpty(); assertThat(summary.getProcessDefinition().getTimers()).isEmpty(); assertThat(summary.getNodeInstances()).isEmpty(); assertThat(summary.getTimerInstances()).isEmpty(); verify(queryServicesClient, never()).findActiveNodeInstances(any(), any(), any()); verify(queryServicesClient, never()).findCompletedNodeInstances(any(), any(), any()); verify(processAdminServicesClient, never()).getTimerInstances(any(), any()); }</code><technical_language>more 'L'</technical_language>

Target:
public void testGetProcessInstanceDiagramSummaryCompletedStatus() { ProcessInstanceKey instanceKey = new ProcessInstanceKey(serverTemplateId, containerId, processInstanceId); String svgContent = "<svg></svg>"; Integer state = org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED; String processName = "process"; when(queryServicesClient.findProcessInstanceById(processInstanceId)).thenReturn(ProcessInstance.builder().id(processInstanceId).processId(processId).containerId(containerId).state(state).parentInstanceId(-1L).processName(processName).build()); when(processImageService.getProcessInstanceDiagram(serverTemplateId, containerId, processInstanceId, "", "", "")).thenReturn(svgContent); when(processServicesClient.getProcessDefinition(containerId, processId)).thenReturn(new ProcessDefinition()); ProcessInstanceDiagramSummary summary = service.getProcessInstanceDiagramSummary(instanceKey, "", "", ""); assertEquals(processInstanceId, summary.getId()); assertEquals(processName, summary.getName()); assertEquals(svgContent, summary.getSvgContent()); assertNotNull(summary.getProcessDefinition()); assertThat(summary.getProcessDefinition().getNodes()).isEmpty(); assertThat(summary.getProcessDefinition().getTimers()).isEmpty(); assertThat(summary.getNodeInstances()).isEmpty(); assertThat(summary.getTimerInstances()).isEmpty(); verify(queryServicesClient, never()).findActiveNodeInstances(any(), any(), any()); verify(queryServicesClient, never()).findCompletedNodeInstances(any(), any(), any()); verify(processAdminServicesClient, never()).getTimerInstances(any(), any()); }