@Override
        public void waitForReadyBrokers() throws InterruptedException {
            org.apache.kafka.test.TestUtils.waitForCondition(() -> {
                int numRegisteredBrokers = clusterReference.get().zkClient().getAllBrokersInCluster().size();
                return numRegisteredBrokers == config.numBrokers();
            }, "Timed out while waiting for brokers to become ready");
        }
Restart brokers with given cluster config.

@param clusterConfig clusterConfig is optional. If left Optional.empty(), brokers will restart without
                     reconfiguring configurations. Otherwise, the restart will reconfigure configurations
                     according to the provided cluster config.
core/src/test/java/kafka/test/junit/ZkClusterInvocationContext.java