public void handleStepStatus(
      MaestroTracingContext tracingContext, StepInstance.Status status, Throwable throwable) {
    if (tracingContext == null || status == null) {
      return;
    }
    if (StepInstance.Status.CREATED.equals(status)) {
      start(tracingContext, status.name());
    } else if (status.isTerminal()) {
      finish(tracingContext, status.name(), throwable);
    } else {
      annotate(tracingContext, status.name());
    }
  }
@Test
  public void testHandleStepStatus() {
    MaestroTracingManager tm = new TestTracingManager(mockTracer);
    int finishCount = 0;
    for (StepInstance.Status s : StepInstance.Status.values()) {
      System.out.println("Testing " + s.name());
      tm.handleStepStatus(defaultContext, s);
      verify(mockSpan, times(1)).annotate(s.name());

      if (s.isTerminal()) {
        verify(mockSpan, times(++finishCount)).finish();
      }
      if (s.equals(StepInstance.Status.CREATED)) {
        verify(mockSpan, times(1)).start();
      }
    }
  }