@VisibleForTesting
  void startKsql(final KsqlConfig ksqlConfigWithPort) {
    cleanupOldState();
    initialize(ksqlConfigWithPort);
  }
@Test
  public void shouldRecordStartLatency() {
    // When:
    app.startKsql(ksqlConfig);

    // Then:
    long duration = Duration.between(start, Instant.now()).toMillis();
    final Metric metric = metricCollectors.getMetrics().metric(
        metricCollectors.getMetrics().metricName("startup-time-ms", "ksql-rest-application")
    );
    assertThat(metric, not(nullValue()));
    // compare start time recorded to time around startKsql. add a second for clock jitter
    assertThat((Double) metric.metricValue(), lessThanOrEqualTo((double) (duration + 1000)));
  }