public void recordSendOffsets(long duration) {
        sendOffsetsSensor.record(duration);
    }
@Test
    public void shouldRecordSendOffsetsTime() {
        // When:
        producerMetrics.recordSendOffsets(METRIC_VALUE);

        // Then:
        assertMetricValue(TXN_SEND_OFFSETS_TIME_TOTAL);
    }