public static NioEchoServer createEchoServer(ListenerName listenerName, SecurityProtocol securityProtocol,
            AbstractConfig serverConfig, CredentialCache credentialCache,
            int failedAuthenticationDelayMs, Time time, DelegationTokenCache tokenCache) throws Exception {
        NioEchoServer server = new NioEchoServer(listenerName, securityProtocol, serverConfig, "localhost",
                null, credentialCache, failedAuthenticationDelayMs, time, tokenCache);
        server.start();
        return server;
    }
Common utility functions used by transport layer and authenticator tests.
clients/src/test/java/org/apache/kafka/common/network/NetworkTestUtils.java