private CuratorFramework newCurator() throws IOException {
    CuratorFramework client = CuratorFrameworkFactory.newClient(
        server.getConnectString(), 10000, 10000, new RetryOneTime(1));
    client.start();
    curatorInstances.add(client);
    return client;
  }
See SlotZNode; some tests (and the setup) are c/p-ed or modified from Curator.
llap-client/src/test/org/apache/hadoop/hive/llap/registry/impl/TestSlotZnode.java