@Test
public void testFlowSetupMetrics() throws InterruptedException {

  assertThat(this.testUtil.getTimerCount(ExecMetrics.FLOW_SETUP_TIMER_NAME)).isEqualTo(0);
  Timer.Context context = this.metrics.getFlowSetupTimerContext();
  try {
    Thread.sleep(10);
  }
  finally {
    context.stop();
  }
  assertThat(this.testUtil.getTimerCount(ExecMetrics.FLOW_SETUP_TIMER_NAME)).isEqualTo(1);
  Snapshot snapshot = this.testUtil.getTimerSnapshot(ExecMetrics.FLOW_SETUP_TIMER_NAME);
  double val = snapshot.getMax();
  assertThat(snapshot.getMax()).isGreaterThanOrEqualTo(10);
}