@Test
    public void testBatchExpirationAfterReenqueue() {
        ProducerBatch batch = new ProducerBatch(new TopicPartition("topic", 1), memoryRecordsBuilder, now);
        // Set batch.retry = true
        batch.reenqueued(now);
        // Set `now` to 2ms before the create time.
        assertFalse(batch.hasReachedDeliveryTimeout(10240, now - 2L));
    }
A {@link ProducerBatch} configured using a timestamp preceding its create time is interpreted correctly
* as not expired by {@link ProducerBatch#hasReachedDeliveryTimeout(long, long)}.
clients/src/test/java/org/apache/kafka/clients/producer/internals/ProducerBatchTest.java