public static ChannelState waitForChannelClose(Selector selector, String node, ChannelState.State channelState) throws IOException {
        return waitForChannelClose(selector, node, channelState, 0);
    }
Common utility functions used by transport layer and authenticator tests.
clients/src/test/java/org/apache/kafka/common/network/NetworkTestUtils.java