ZKCuratorManager { public String getStringData(final String path) throws Exception { byte[] bytes = getData(path); if (bytes != null) { return new String(bytes, Charset.forName("UTF-8")); } return null; } ZKCuratorManager(Configuration config); CuratorFramework getCurator(); void close(); static List<ACL> getZKAcls(Configuration conf); static List<ZKUtil.ZKAuthInfo> getZKAuths(Configuration conf); void start(); void start(List<AuthInfo> authInfos); List<ACL> getACL(final String path); byte[] getData(final String path); byte[] getData(final String path, Stat stat); String getStringData(final String path); String getStringData(final String path, Stat stat); void setData(String path, byte[] data, int version); void setData(String path, String data, int version); List<String> getChildren(final String path); boolean exists(final String path); boolean create(final String path); boolean create(final String path, List<ACL> zkAcl); void createRootDirRecursively(String path); void createRootDirRecursively(String path, List<ACL> zkAcl); boolean delete(final String path); static String getNodePath(String root, String nodeName); void safeCreate(String path, byte[] data, List<ACL> acl,
      CreateMode mode, List<ACL> fencingACL, String fencingNodePath); void safeDelete(final String path, List<ACL> fencingACL,
      String fencingNodePath); void safeSetData(String path, byte[] data, int version,
      List<ACL> fencingACL, String fencingNodePath); SafeTransaction createTransaction(List<ACL> fencingACL,
      String fencingNodePath);  }
@Test public void testGetStringData() throws Exception { String node1 = "/node1"; String node2 = "/node2"; assertFalse(curator.exists(node1)); curator.create(node1); assertNull(curator.getStringData(node1)); byte[] setData = "setData".getBytes("UTF-8"); curator.setData(node1, setData, -1); assertEquals("setData", curator.getStringData(node1)); Stat stat = new Stat(); assertFalse(curator.exists(node2)); curator.create(node2); assertNull(curator.getStringData(node2, stat)); curator.setData(node2, setData, -1); assertEquals("setData", curator.getStringData(node2, stat)); }