public void authenticationFailed(Node node, long backoffMs) {
        pendingAuthenticationErrors.remove(node);
        authenticationErrors.put(node, (AuthenticationException) Errors.SASL_AUTHENTICATION_FAILED.exception());
        disconnect(node.idString());
        backoff(node, backoffMs);
    }
A mock network client for use testing code
clients/src/test/java/org/apache/kafka/clients/MockClient.java