public synchronized void fenceProducer() {
        verifyNotClosed();
        verifyNotFenced();
        verifyTransactionsInitialized();
        this.producerFenced = true;
    }
@Test
    public void shouldThrowFenceProducerIfTransactionsNotInitialized() {
        buildMockProducer(true);
        assertThrows(IllegalStateException.class, () -> producer.fenceProducer());
    }