### Question:
JSONPointer { public TDPath parse(String str) { TDPath path = new TDPath(); if (StringUtil.isEmpty(str)) return path; if (str.endsWith("#")) str = str.substring(0, str.length() - 1); if (str.indexOf('#') < 0) { if (parseParts(str, path, true)) return path; path.setDocPath(str); path.addParts(Part.ofRoot()); } else { String[] strs = str.split("#"); if (!strs[0].isEmpty()) path.setDocPath(strs[0]); parseParts(strs[1], path,false); } return path; }  static JSONPointer get(); TDPath parse(String str); TDNode query(TDNode node, String path); final static InjectableInstance<JSONPointer> it; }### Answer:
@Test public void testParse() { verify(" verify(" verify("1/p1", new TDPath().addParts(Part.ofRelative(1), Part.ofChild("p1"))); verify("#../p1", new TDPath().addParts(Part.ofRelative(1), Part.ofChild("p1"))); verify("1/p1", new TDPath().addParts(Part.ofRelative(1), Part.ofChild("p1"))); verify("#./p1", new TDPath().addParts(Part.ofRelative(0), Part.ofChild("p1"))); }