ZookeeperScaler implements AutoCloseable { static List<String> serversMapToList(Map<String, String> servers) { List<String> serversList = new ArrayList<String>(servers.size()); for (Map.Entry entry : servers.entrySet()) { serversList.add(String.format("%s=%s", entry.getKey(), entry.getValue())); } return serversList; } protected  ZookeeperScaler(Vertx vertx, ZooKeeperAdminProvider zooAdminProvider, String zookeeperConnectionString, Function<Integer, String> zkNodeAddress, Secret clusterCaCertSecret, Secret coKeySecret, long operationTimeoutMs); Future<Void> scale(int scaleTo); @Override void close();  }
@Test public void testMapToList() { Map<String, String> servers = new HashMap<>(3); servers.put("server.1", "my-cluster-zookeeper-0.my-cluster-zookeeper-nodes.myproject.svc:2888:3888:participant;127.0.0.1:12181"); servers.put("server.2", "my-cluster-zookeeper-1.my-cluster-zookeeper-nodes.myproject.svc:2888:3888:participant;127.0.0.1:12181"); servers.put("server.3", "my-cluster-zookeeper-2.my-cluster-zookeeper-nodes.myproject.svc:2888:3888:participant;127.0.0.1:12181"); List<String> expected = new ArrayList<>(3); expected.add("server.1=my-cluster-zookeeper-0.my-cluster-zookeeper-nodes.myproject.svc:2888:3888:participant;127.0.0.1:12181"); expected.add("server.2=my-cluster-zookeeper-1.my-cluster-zookeeper-nodes.myproject.svc:2888:3888:participant;127.0.0.1:12181"); expected.add("server.3=my-cluster-zookeeper-2.my-cluster-zookeeper-nodes.myproject.svc:2888:3888:participant;127.0.0.1:12181"); assertThat(ZookeeperScaler.serversMapToList(servers), containsInAnyOrder(expected.toArray())); }