public void connect(ServerRoutingInstance serverRoutingInstance)
      throws InterruptedException, TimeoutException {
    _serverToChannelMap.computeIfAbsent(serverRoutingInstance, ServerChannel::new).connect();
  }
@Test(dataProvider = "parameters")
  public void testConnect(boolean nativeTransportEnabled)
      throws Exception {
    BrokerMetrics brokerMetrics = mock(BrokerMetrics.class);
    NettyConfig nettyConfig = new NettyConfig();
    nettyConfig.setNativeTransportsEnabled(nativeTransportEnabled);
    QueryRouter queryRouter = mock(QueryRouter.class);

    ServerRoutingInstance serverRoutingInstance =
        new ServerRoutingInstance("localhost", _dummyServer.getAddress().getPort(), TableType.REALTIME);
    ServerChannels serverChannels = new ServerChannels(queryRouter, brokerMetrics, nettyConfig, null);
    serverChannels.connect(serverRoutingInstance);

    final long requestId = System.currentTimeMillis();

    AsyncQueryResponse asyncQueryResponse = mock(AsyncQueryResponse.class);
    BrokerRequest brokerRequest = new BrokerRequest();
    InstanceRequest instanceRequest = new InstanceRequest();
    instanceRequest.setRequestId(requestId);
    instanceRequest.setQuery(brokerRequest);
    serverChannels.sendRequest("dummy_table_name", asyncQueryResponse, serverRoutingInstance, instanceRequest, 1000);
    serverChannels.shutDown();
  }