public String start(WorkflowInstance instance) {
    return workflowExecutor.startWorkflow(
        translator.translate(instance),
        Collections.singletonMap(
            Constants.WORKFLOW_SUMMARY_FIELD,
            workflowHelper.createWorkflowSummaryFromInstance(instance)),
        null,
        null,
        String.valueOf(System.currentTimeMillis()), // use event field to keep enqueue time
        Collections.emptyMap());
  }
@Test
  public void testStart() {
    WorkflowInstance instance = new WorkflowInstance();
    instance.setWorkflowId("test-workflow");
    instance.setWorkflowVersionId(1);
    instance.setRuntimeWorkflow(mock(Workflow.class));
    instance.setRuntimeDag(Collections.singletonMap("step1", new StepTransition()));
    Map<String, Map<String, ParamDefinition>> stepRunParams =
        Collections.singletonMap(
            "stepid",
            Collections.singletonMap("p1", ParamDefinition.buildParamDefinition("p1", "d1")));
    instance.setStepRunParams(stepRunParams);
    assertEquals("test-uuid", runner.start(instance));
    verify(translator, times(1)).translate(instance);
    verify(workflowExecutor, times(1))
        .startWorkflow(any(), anyMap(), any(), any(), anyString(), anyMap());
  }