void recordLatency(long requestLatencyMs) {
        fetchLatency.record(requestLatencyMs);
    }
@Test
    public void testLatency() {
        shareFetchMetricsManager.recordLatency(101);
        time.sleep(metrics.config().timeWindowMs() + 1);
        shareFetchMetricsManager.recordLatency(155);

        assertEquals(155, (double) getMetric(shareFetchMetricsRegistry.fetchLatencyMax).metricValue(), EPSILON);
        assertEquals(128, (double) getMetric(shareFetchMetricsRegistry.fetchLatencyAvg).metricValue(), EPSILON);
    }