@Test
public void shouldTransitionIntoSubmittingIfMissingDockerArgs() throws Exception {

  var workflow = Workflow.create("id", workflowConfiguration());
  var workflowState = WorkflowState.builder().enabled(true).build();
  var workflowWithState = WorkflowWithState.create(workflow, workflowState);
  var workflowInstance = WorkflowInstance.create(workflow.id(), "2016-03-14");
  var runState = RunState.create(workflowInstance, PREPARE, NOW, COUNTER);
  when(storage.workflowWithState(workflow.id())).thenReturn(Optional.of(workflowWithState));
  toTest.transitionInto(runState, eventRouter);
  verify(eventRouter).receive(eventCaptor.capture(), eq(COUNTER));
  var event = eventCaptor.getValue();
  event.accept(eventVisitor);
  verify(eventVisitor)
      .submit(workflowInstanceCaptor.capture(), executionDescriptionCaptor.capture(), executionIdCaptor.capture());
  assertThat(executionIdCaptor.getValue(), startsWith("styx-run-"));
  assertThat(executionDescriptionCaptor.getValue().dockerImage().orElseThrow(), is(DOCKER_IMAGE));
  assertThat(executionDescriptionCaptor.getValue().dockerArgs(), hasSize(0));
  assertThat(executionDescriptionCaptor.getValue().commitSha(), isPresentAndIs(COMMIT_SHA));
}