KieWorkbenchFormsStartProcessDisplayer extends AbstractStartProcessFormDisplayer<KieWorkbenchFormRenderingSettings> { @Override public void startProcessFromDisplayer() { if (formDisplayer.isValid()) { service.call(getStartProcessRemoteCallback()).startProcessFromRenderContext( renderingSettings.getTimestamp(), renderingSettings.getRenderingContext().getModel(), serverTemplateId, deploymentId, processDefId, getCorrelationKey()); } } @Inject  KieWorkbenchFormsStartProcessDisplayer(KieWorkbenchFormDisplayer formDisplayer,
                                                  Caller<KieWorkbenchFormsEntryPoint> service); @Override Class<KieWorkbenchFormRenderingSettings> getSupportedRenderingSettings(); @Override IsWidget getFormWidget(); @Override void startProcessFromDisplayer(); @Override boolean appendFooter();  }
@Test public void testStartProcessFromDisplayer() { when(displayer.isValid()).thenReturn(true); when(formRenderingSettings.getTimestamp()).thenReturn(100000l); MapModelRenderingContext mapModelRenderingContext = mock(MapModelRenderingContext.class); when(formRenderingSettings.getRenderingContext()).thenReturn(mapModelRenderingContext); when(service.call(any())).thenReturn(kieWorkbenchFormsEntryPoint); ProcessDefinitionKey processDefinitionKey = new ProcessDefinitionKey( "test-serverTemplateId", "test-deploymentId", "test-processId", "test-processDefName"); ProcessDisplayerConfig processDisplayerConfig = new ProcessDisplayerConfig(processDefinitionKey, "test", false); processDisplayerConfig.setRenderingSettings(formRenderingSettings); kieWorkbenchFormsStartProcessDisplayer.initConfigs(processDisplayerConfig, null, null); kieWorkbenchFormsStartProcessDisplayer.startProcessFromDisplayer(); verify(service).call(any()); verify(kieWorkbenchFormsEntryPoint).startProcessFromRenderContext(100000l, null, "test-serverTemplateId", "test-deploymentId", "test-processId", ""); }