private void verifySslConfigsWithHandshakeFailure(Args args, int pollDelayMs) throws Exception {
        server = createEchoServer(args, SecurityProtocol.SSL);
        createSelector(args.sslClientConfigs);
        InetSocketAddress addr = new InetSocketAddress("localhost", server.port());
        String node = "0";
        selector.connect(node, addr, BUFFER_SIZE, BUFFER_SIZE);
        NetworkTestUtils.waitForChannelClose(selector, node, ChannelState.State.AUTHENTICATION_FAILED, pollDelayMs);
        server.verifyAuthenticationMetrics(0, 1);
    }
Tests invalid ssl.engine.factory plugin class
clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java