public void recordMetadataWait(long duration) {
        metadataWaitSensor.record(duration);
    }
@Test
    public void shouldRecordMetadataWaitTime() {
        // When:
        producerMetrics.recordMetadataWait(METRIC_VALUE);

        // Then:
        assertMetricValue(METADATA_WAIT_TIME_TOTAL);
    }