### Question:
SSLUtils { private static SSLEngineFactory createSSLEngineFactory( final Configuration config, final boolean clientMode) throws Exception { final SSLContext sslContext = clientMode ? createSSLClientContext(config) : createSSLServerContext(config); checkState(sslContext != null, "%s it not enabled", SecurityOptions.SSL_ENABLED.key()); return new SSLEngineFactory( sslContext, getEnabledProtocols(config), getEnabledCipherSuites(config), clientMode); }  static boolean getSSLEnabled(Configuration sslConfig); static void setSSLVerAndCipherSuites(ServerSocket socket, Configuration config); static SSLEngineFactory createServerSSLEngineFactory(final Configuration config); static SSLEngineFactory createClientSSLEngineFactory(final Configuration config); @Deprecated static void setSSLVerAndCipherSuites(SSLEngine engine, Configuration config); static void setSSLVerifyHostname(Configuration sslConfig, SSLParameters sslParams); @Nullable static SSLContext createSSLClientContext(Configuration sslConfig); @Nullable static SSLContext createSSLServerContext(Configuration sslConfig);  }### Answer:
@Test public void testCreateSSLEngineFactory() throws Exception { Configuration serverConfig = new Configuration(); serverConfig.setBoolean(SecurityOptions.SSL_ENABLED, true); serverConfig.setString(SecurityOptions.SSL_KEYSTORE, "src/test/resources/local127.keystore"); serverConfig.setString(SecurityOptions.SSL_KEYSTORE_PASSWORD, "password"); serverConfig.setString(SecurityOptions.SSL_KEY_PASSWORD, "password"); serverConfig.setString(SecurityOptions.SSL_PROTOCOL, "TLSv1"); serverConfig.setString(SecurityOptions.SSL_ALGORITHMS, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"); final SSLEngineFactory serverSSLEngineFactory = SSLUtils.createServerSSLEngineFactory(serverConfig); final SSLEngine sslEngine = serverSSLEngineFactory.createSSLEngine(); assertThat( Arrays.asList(sslEngine.getEnabledProtocols()), contains("TLSv1")); assertThat( Arrays.asList(sslEngine.getEnabledCipherSuites()), containsInAnyOrder("TLS_DHE_RSA_WITH_AES_128_CBC_SHA", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256")); }