### Question:
X509Util implements Closeable, AutoCloseable { public SSLServerSocket createSSLServerSocket() throws X509Exception, IOException { return getDefaultSSLContextAndOptions().createSSLServerSocket(); } X509Util();  X509Util(ZKConfig zkConfig); String getSslProtocolProperty(); String getSslEnabledProtocolsProperty(); String getCipherSuitesProperty(); String getSslKeystoreLocationProperty(); String getSslCipherSuitesProperty(); String getSslKeystorePasswdProperty(); String getSslKeystoreTypeProperty(); String getSslTruststoreLocationProperty(); String getSslTruststorePasswdProperty(); String getSslTruststoreTypeProperty(); String getSslHostnameVerificationEnabledProperty(); String getSslCrlEnabledProperty(); String getSslOcspEnabledProperty(); String getSslClientAuthProperty(); String getSslHandshakeDetectionTimeoutMillisProperty(); SSLContext getDefaultSSLContext(); SSLContext createSSLContext(ZKConfig config); SSLContextAndOptions getDefaultSSLContextAndOptions(); int getSslHandshakeTimeoutMillis(); SSLContextAndOptions createSSLContextAndOptions(ZKConfig config); static X509KeyManager createKeyManager(
            String keyStoreLocation,
            String keyStorePassword,
            String keyStoreTypeProp); static X509TrustManager createTrustManager(
            String trustStoreLocation,
            String trustStorePassword,
            String trustStoreTypeProp,
            boolean crlEnabled,
            boolean ocspEnabled,
            final boolean serverHostnameVerificationEnabled,
            final boolean clientHostnameVerificationEnabled); SSLSocket createSSLSocket(); SSLSocket createSSLSocket(Socket socket, byte[] pushbackBytes); SSLServerSocket createSSLServerSocket(); SSLServerSocket createSSLServerSocket(int port); void enableCertFileReloading(); @Override void close(); static final int DEFAULT_HANDSHAKE_DETECTION_TIMEOUT_MILLIS; }### Answer:
@Test(timeout = 5000) public void testCreateSSLServerSocketWithoutPort() throws Exception { setCustomCipherSuites(); SSLServerSocket sslServerSocket = x509Util.createSSLServerSocket(); Assert.assertArrayEquals(customCipherSuites, sslServerSocket.getEnabledCipherSuites()); Assert.assertTrue(sslServerSocket.getNeedClientAuth()); }
@Test(timeout = 5000) public void testCreateSSLServerSocketWithPort() throws Exception { setCustomCipherSuites(); int port = PortAssignment.unique(); SSLServerSocket sslServerSocket = x509Util.createSSLServerSocket(port); Assert.assertEquals(sslServerSocket.getLocalPort(), port); Assert.assertArrayEquals(customCipherSuites, sslServerSocket.getEnabledCipherSuites()); Assert.assertTrue(sslServerSocket.getNeedClientAuth()); }