public void verifyAuthenticationMetrics(int successfulAuthentications, final int failedAuthentications)
            throws InterruptedException {
        waitForMetrics("successful-authentication", successfulAuthentications,
                EnumSet.of(MetricType.TOTAL, MetricType.RATE));
        waitForMetrics("failed-authentication", failedAuthentications, EnumSet.of(MetricType.TOTAL, MetricType.RATE));
    }
Non-blocking EchoServer implementation that uses ChannelBuilder to create channels
with the configured security protocol.
clients/src/test/java/org/apache/kafka/common/network/NioEchoServer.java