private NettyServer getNettyServer(Properties properties) throws InstantiationException, IOException {
    if (properties == null) {
      // dud properties. should pick up defaults
      properties = new Properties();
    }
    VerifiableProperties verifiableProperties = new VerifiableProperties(properties);
    final NettyConfig nettyConfig = new NettyConfig(verifiableProperties);
    final PerformanceConfig performanceConfig = new PerformanceConfig(verifiableProperties);

    Map<Integer, ChannelInitializer<SocketChannel>> channelInitializers = new HashMap<>();
    channelInitializers.put(nettyConfig.nettyServerPort,
        new FrontendNettyChannelInitializer(nettyConfig, performanceConfig, NETTY_METRICS, CONNECTION_STATS_HANDLER,
            REQUEST_HANDLER, PUBLIC_ACCESS_LOGGER, REST_SERVER_STATE, null, null));
    channelInitializers.put(nettyConfig.nettyServerSSLPort,
        new FrontendNettyChannelInitializer(nettyConfig, performanceConfig, NETTY_METRICS, CONNECTION_STATS_HANDLER,
            REQUEST_HANDLER, PUBLIC_ACCESS_LOGGER, REST_SERVER_STATE, SSL_FACTORY, null));
    return new NettyServer(nettyConfig, NETTY_METRICS, channelInitializers);
  }
Gets an instance of {@link NettyServer}.
@param properties the in-memory {@link Properties} to use.
@return an instance of {@link NettyServer}.
@throws InstantiationException
@throws IOException
ambry-rest/src/test/java/com/github/ambry/rest/NettyServerTest.java