public void recordBeginTxn(long duration) {
        beginTxnTimeSensor.record(duration);
    }
@Test
    public void shouldRecordTxBeginTime() {
        // When:
        producerMetrics.recordBeginTxn(METRIC_VALUE);

        // Then:
        assertMetricValue(TXN_BEGIN_TIME_TOTAL);
    }