### Question:
PathUtil { public static String getRelativePath(Path sourceRootPath, Path childPath) { String childPathString = childPath.toUri().getPath(); String sourceRootPathString = sourceRootPath.toUri().getPath(); return "/".equals(sourceRootPathString) ? childPathString : childPathString.substring(sourceRootPathString.length()); } private  PathUtil(); static String getRelativePath(Path sourceRootPath, Path childPath); static String toString(Path path); static String toBucketName(URI uri); static String toBucketKey(URI uri); static boolean isFile(URI path);  }### Answer:
@Test public void getRelativePathRoot() { Path root = new Path("/"); Path child = new Path("/a"); assertThat(PathUtil.getRelativePath(root, child), is("/a")); }
@Test public void relativePath() { Path root = new Path("/tmp/abc"); Path child = new Path("/tmp/abc/xyz/file"); assertThat(PathUtil.getRelativePath(root, child), is("/xyz/file")); }