@Override
        protected SslTransportLayer buildTransportLayer(SslFactory sslFactory, String id, SelectionKey key,
                                                        ChannelMetadataRegistry metadataRegistry) throws IOException {
            SocketChannel socketChannel = (SocketChannel) key.channel();
            SSLEngine sslEngine = sslFactory.createSslEngine(socketChannel.socket());
            return newTransportLayer(id, key, sslEngine);
        }
Tests invalid ssl.engine.factory plugin class
clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java