### Question:
PathUtils { static Path equivalentSubpath(final Path a, final Path b, final Path path) { return b.resolve(a.relativize(path)); } private  PathUtils(); static HashCode sha256(final Path file); static void syncRecursive(final Path source, final Path target); static void removeRecursive(final Path path);  }### Answer:
@Test public void testEquivalentSubpath() throws Exception { final Path a = fs.getPath("/", "a", "b"); final Path b = fs.getPath("/", "a", "d"); final Path path = fs.getPath("/", "a", "b", "c"); final Path expectedOutput = fs.getPath("/", "a", "d", "c"); final Path actualOutput = PathUtils.equivalentSubpath(a, b, path); assertThat(actualOutput, is(expectedOutput)); }