Path implements Iterable<Path> { public Path getNext() { if (isLast()) return null; String[] copyOfRange = Arrays.copyOfRange(pathElements, 1, pathElements.length); return new Path(copyOfRange); } 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 testGetNext() { Path instance = new Path("/var/www/html"); Path expResult = new Path("/www/html"); Path result = instance.getNext(); assertEquals(expResult, result); }