private void withDefaultsTest(boolean induceFailure) throws InterruptedException {
    MetricRegistry metricRegistry = new MetricRegistry();
    RestRequestMetricsTracker.setDefaults(metricRegistry);
    RestRequestMetricsTracker requestMetrics = new RestRequestMetricsTracker();
    TestMetrics testMetrics = new TestMetrics(requestMetrics, induceFailure);
    requestMetrics.recordMetrics();
    String metricPrefix =
        RestRequestMetricsTracker.class.getCanonicalName() + "." + RestRequestMetricsTracker.DEFAULT_REQUEST_TYPE;
    testMetrics.compareMetrics(metricPrefix, metricRegistry, induceFailure);
  }
Tests recording of metrics without setting a custom {@link RestRequestMetrics}.
@param induceFailure if {@code true}, the request is marked as failed.
ambry-api/src/test/java/com/github/ambry/rest/RestRequestMetricsTrackerTest.java