@Test
    public void testAllOfFuturesHandlesZeroFutures() throws Exception {
        KafkaFuture<Void> allFuture = KafkaFuture.allOf();
        assertTrue(allFuture.isDone());
        assertFalse(allFuture.isCancelled());
        assertFalse(allFuture.isCompletedExceptionally());
        allFuture.get();
    }
Asserts that the given future is done, didn't fail and was cancelled.
clients/src/test/java/org/apache/kafka/common/KafkaFutureTest.java