public void recordInit(long duration) {
        initTimeSensor.record(duration);
    }
@Test
    public void shouldRecordInitTime() {
        // When:
        producerMetrics.recordInit(METRIC_VALUE);

        // Then:
        assertMetricValue(TXN_INIT_TIME_TOTAL);
    }