public static Connection fromZookeeper(String zkUrl) {
    return fromZookeeper(zkUrl, getDefault());
  }
@Test
  public void testZkConnection() {
    // Create a dummy Helix structure
    final String givenZkServers = "127.0.0.1:1234";
    final String givenBrokerInfo = "localhost:2345";

    DynamicBrokerSelector dynamicBrokerSelector = Mockito.spy(new DynamicBrokerSelector(givenZkServers) {
      @Override
      protected ZkClient getZkClient(String zkServers) {
        return Mockito.mock(ZkClient.class);
      }

      @Override
      protected ExternalViewReader getEvReader(ZkClient zkClient) {
        return Mockito.mock(ExternalViewReader.class);
      }

      @Override
      public List<String> getBrokers() {
        return ImmutableList.of(givenBrokerInfo);
      }
    });

    PinotClientTransport pinotClientTransport = Mockito.mock(PinotClientTransport.class);

    // Create the connection
    Connection connection = ConnectionFactory.fromZookeeper(
            dynamicBrokerSelector,
            pinotClientTransport);

    // Check that the broker list has the right length and has the same servers
    Assert.assertEquals(connection.getBrokerList(), ImmutableList.of(givenBrokerInfo));
  }