@After
  public void teardown() throws Exception {
    for (SlotZnode node : createdNodes) {
      node.close();
    }
    for (CuratorFramework curator : curatorInstances) {
      curator.close();
    }
    server.close();
    server = null;
  }
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