@Test
void testClose() {

    ZkBasedTreeNodeResource<Map<String, String>> tree = ZkBasedTreeNodeResource
            .<Map<String, String>> newBuilder()
            .curator(curatorFramework)
            .path("/test")
            .factory(p -> p.entrySet().stream()
                    .collect(toMap(Entry::getKey, e -> new String(e.getValue().getData()))))
            .build();
    System.out.println(tree.get());
    tree.close();
    assertThrows(IllegalStateException.class, tree::get);
}