Path implements Iterable<Path> { @Override public String toString() { if(isRoot()) return "/"; return toString("/"); } Path();  Path(String path); private  Path(String[] pathElements); String[] getPathElements(); String getFirstElement(); String getName(); Path getParent(); Path getNext(); boolean hasNext(); boolean isRoot(); boolean isSelf(); boolean isParent(); boolean isLast(); Path getCanonicalPath(); @Override String toString(); String toString(String pathSep); Path join(Path path); Path join(String path); @Override Iterator<Path> iterator(); String getExtension(); @Override int hashCode(); @Override boolean equals(Object obj); boolean startsWith(Path path); Path leftTrim(Path path);  }
@Test public void testToStringString() { String pathSep = "\\"; Path instance = new Path("/usr/local/bin"); String expResult = "usr\\local\\bin"; String result = instance.toString(pathSep); assertEquals(expResult, result); }
@Test public void testGlob_Remaining() { Path folder = new Path("/usr/dev/projects/superProject/src/main/java/org/bridje"); assertEquals("src/main/java/org/bridje", new GlobExpr("superProject").globRemaining(folder).toString()); assertEquals("src/main/java/org/bridje", new GlobExpr("dev/projects/{s*}t").globRemaining(folder).toString()); assertNotEquals("src/main/java/org/bridje", new GlobExpr("projects/**").globRemaining(folder).toString()); }
@Test public void testToString_0args() { Path instance = new Path("/usr/local"); String expResult = "usr/local"; String result = instance.toString(); assertEquals(expResult, result); }