### Question:
CategoryPath implements Comparable<CategoryPath> { public CategoryPath getParent() { return parent; } private  CategoryPath();  CategoryPath(CategoryPath parent, String... subPathElements);  CategoryPath(CategoryPath parent, List<String> subPathElements);  CategoryPath(String path); static String escapeString(String nonEscapedString); static String unescapeString(String escapedString); boolean isRoot(); CategoryPath getParent(); String getName(); String getPath(); @Override boolean equals(Object obj); @Override int hashCode(); boolean isAncestorOrSelf(CategoryPath candidateAncestorPath); String[] getPathElements(); @Override int compareTo(CategoryPath other); @Override String toString(); List<String> asList(); String[] asArray(); static final char DELIMITER_CHAR; static final String DELIMITER_STRING; static final String ESCAPED_DELIMITER_STRING; static final CategoryPath ROOT; }### Answer:
@Test public void testGetParent() { CategoryPath c = CategoryPath.ROOT; assertNull(c.getParent()); c = new CategoryPath("/aaa/bbb/ccc"); c = c.getParent(); assertEquals("/aaa/bbb", c.getPath()); }