PathRelativizer { public static String relativize(File base, File file) { return base.toURI().relativize(file.toURI()).getPath(); } PathRelativizer(File baseDir); static String relativize(File base, File file); Path relativize(File file);  }
@Test public void testFoo() { Assert.assertThat(PathRelativizer.relativize(new File("foo"), new File("foo/bar")), Matchers.is("bar")); }