@Test
    public void testBlocking() throws Exception {
        FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, null, 50L),
                relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);
        assertEquals(baseOffset + relOffset, future.get().offset());
    }
Test that an asynchronous request will eventually return the right offset
clients/src/test/java/org/apache/kafka/clients/producer/RecordSendTest.java