ProcessDiagramPresenter { public void onProcessSelectionEvent(@Observes final ProcessDefSelectionEvent event) { view.showBusyIndicator(constants.Loading()); view.disableExpandAnchor(); String containerId = event.getDeploymentId(); String serverTemplateId = event.getServerTemplateId(); String processId = event.getProcessId(); processImageService.call((String svgContent) -> displayImage(svgContent, containerId)).getProcessDiagram(serverTemplateId, containerId, processId); }  @Inject void setProcessImageService(final Caller<ProcessImageService> processImageService); void onProcessSelectionEvent(@Observes final ProcessDefSelectionEvent event); void displayImage(final String svgContent, final String containerId); void expandDiagramContainer(); @WorkbenchPartTitle String getName(); @WorkbenchPartView IsWidget getView();  }
@Test public void testEmptyProcessDiagram() { when(imageService.getProcessDiagram(any(), any(), any())).thenReturn("", null); presenter.onProcessSelectionEvent(new ProcessDefSelectionEvent()); presenter.onProcessSelectionEvent(new ProcessDefSelectionEvent()); verify(view, times(2)).displayMessage(Constants.INSTANCE.Process_Diagram_Not_FoundContainerShouldBeAvailable(anyString())); }