### Question:
Paths { public static boolean isParent(String parent, String path) { if (equals(parent, path)) return true; parent = appendParent(parent); return myIsCaseSensitive ? path.startsWith(parent) : StringUtil.startsWithIgnoreCase(path, parent); }  static String getNameOf(String path); static String getParentOf(String path); static String appended(String path, String child); static String renamed(String path, String newName); static String reparented(String path, String newParentPath); static String relativeIfUnder(String path, String root); static Iterable<String> split(String path); static boolean isParent(String parent, String path); static boolean isParentOrChild(String p1, String p2); static boolean equals(String p1, String p2); static void setCaseSensitive(boolean b); static boolean isCaseSensitive(); static void useSystemCaseSensitivity(); static final char DELIM; }### Answer:
@Test public void testIsParentOf() throws Exception { assertTrue(Paths.isParent("foo", "foo")); assertTrue(Paths.isParent("foo", "foo/bar")); assertTrue(Paths.isParent("foo/bar", "foo/bar")); assertTrue(Paths.isParent("foo/bar", "foo/bar/baz")); assertTrue(Paths.isParent("/", "/foo")); assertTrue(Paths.isParent("/foo", "/foo/bar")); assertFalse(Paths.isParent("foo/bar", "foo/baz")); assertFalse(Paths.isParent("foo/bar", "foo/barr")); assertFalse(Paths.isParent("foo/bar", "foo/barr/baz")); assertTrue(Paths.isParent("", "foo")); }