@Test
public void testClient() {
ZkClientx zk = ZooKeeperClient.getInstance();
// 强制获取zk中的地址信息
final ZooKeeper zkp = ((ZooKeeperx) zk.getConnection()).getZookeeper();
ClientCnxn cnxn = (ClientCnxn) ReflectionUtils.getField(clientCnxnField, zkp);
HostProvider hostProvider = (HostProvider) ReflectionUtils.getField(hostProviderField, cnxn);
List<InetSocketAddress> serverAddrs = (List<InetSocketAddress>) ReflectionUtils.getField(serverAddressesField,
hostProvider);
want.number(serverAddrs.size()).isEqualTo(3);
String s1 = serverAddrs.get(0).getAddress().getHostAddress() + ":" + serverAddrs.get(0).getPort();