@Override
            protected TestSslTransportLayer newTransportLayer(String id, SelectionKey key, SSLEngine sslEngine) throws IOException {
                SSLParameters sslParams = sslEngine.getSSLParameters();
                sslParams.setEndpointIdentificationAlgorithm("HTTPS");
                sslEngine.setSSLParameters(sslParams);
                return super.newTransportLayer(id, key, sslEngine);
            }
According to RFC 2818:
<blockquote>Typically, the server has no external knowledge of what the client's
identity ought to be and so checks (other than that the client has a
certificate chain rooted in an appropriate CA) are not possible. If a
server has such knowledge (typically from some source external to
HTTP or TLS) it SHOULD check the identity as described above.</blockquote>

However, Java SSL engine does not perform any endpoint validation for client IP address.
Hence it is safe to avoid reverse DNS lookup while creating the SSL engine. This test checks
that client validation does not fail even if the client certificate has an invalid hostname.
This test is to ensure that if client endpoint validation is added to Java in future, we can detect
and update Kafka SSL code to enable validation on the server-side and provide hostname if required.
clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java