@Test
public void testClientHostnameVerificationWithIPAddress() throws Exception {

    ZKTrustManager zkTrustManager = new ZKTrustManager(mockX509ExtendedTrustManager, true, true);
    X509Certificate[] certificateChain = createSelfSignedCertifcateChain(IP_ADDRESS, null);
    zkTrustManager.checkClientTrusted(certificateChain, null, mockSocket);
    verify(mockInetAddress, times(1)).getHostAddress();
    verify(mockInetAddress, times(0)).getHostName();
    verify(mockX509ExtendedTrustManager, times(1)).checkClientTrusted(certificateChain, null, mockSocket);
}