public void recordCommitTxn(long duration) {
        commitTxnSensor.record(duration);
    }
@Test
    public void shouldRecordTxCommitTime() {
        // When:
        producerMetrics.recordCommitTxn(METRIC_VALUE);

        // Then:
        assertMetricValue(TXN_COMMIT_TIME_TOTAL);
    }