@Override
    public AuthenticationException authenticationException(Node node) {
        return authenticationErrors.get(node);
    }
A mock network client for use testing code
clients/src/test/java/org/apache/kafka/clients/MockClient.java