@Test
public void testPublishesDoneStateOnRunning() throws Exception {

  ExecutionDescription executionDescription = ExecutionDescription.builder()
      .dockerImage(DOCKER_IMAGE)
      .commitSha(COMMIT_SHA)
      .build();
  RunState runState = RunState.create(
      WORKFLOW_INSTANCE,
      RunState.State.RUNNING,
      StateData.newBuilder()
          .executionId("exec1")
          .executionDescription(executionDescription)
          .build());
  publisherHandler.accept(sequenceEvent, runState);
  verify(publisher).deployed(WORKFLOW_INSTANCE, executionDescription);
  verify(stats).recordPublishing("deployed", "RUNNING");
}