@Test
public void testRetry() throws ExecutionException, InterruptedException, TimeoutException, IOException {
File dataDir = tmpFolder.newFolder();
InMemoryZKServer zkServer = InMemoryZKServer.builder().setDataDir(dataDir).setTickTime(1000).build();
zkServer.startAndWait();
int port = zkServer.getLocalAddress().getPort();
final CountDownLatch disconnectLatch = new CountDownLatch(1);
ZKClientService client = ZKClientServices.delegate(ZKClients.retryOnFailure(
ZKClientService.Builder.of(zkServer.getConnectionStr()).setConnectionWatcher(new Watcher() {