public void recordAbortTxn(long duration) {
        abortTxnSensor.record(duration);
    }
@Test
    public void shouldRecordTxAbortTime() {
        // When:
        producerMetrics.recordAbortTxn(METRIC_VALUE);

        // Then:
        assertMetricValue(TXN_ABORT_TIME_TOTAL);
    }