protected Optional<Boolean> checkBrokersUp(int numBrokers, BiFunction<Integer, Integer, Boolean> comp) {
        try {
            int numRunning = connect.kafka().runningBrokers().size();
            return Optional.of(comp.apply(numRunning, numBrokers));
        } catch (Exception e) {
            log.error("Could not check running brokers.", e);
            return Optional.empty();
        }
    }
Confirm that the requested number of brokers are up and running.

@param numBrokers the number of online brokers
@return true if at least {@code numBrokers} are up; false otherwise
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/ConnectAssertions.java