@Override
    public boolean ready(Node node, long now) {
        if (readyCallback != null) {
            readyCallback.accept(node);
        }
        return connectionState(node.idString()).ready(now);
    }
A mock network client for use testing code
clients/src/test/java/org/apache/kafka/clients/MockClient.java