@Test public void testGetRelativePath() throws Exception { assertEquals(Path.EMPTY.toString(), GitUtils.getRelativePath(new Path("/file/a/"), Path.EMPTY)); assertEquals( Path.EMPTY.toString(), GitUtils.getRelativePath(new Path("/file/a/b/"), Path.EMPTY)); assertEquals("b/", GitUtils.getRelativePath(new Path("/file/a/b/"), new Path("../"))); assertEquals("b/c/", GitUtils.getRelativePath(new Path("/file/a/b/c/"), new Path("../../"))); assertEquals("c/", GitUtils.getRelativePath(new Path("/file/a/b/c/"), new Path("../"))); assertEquals("b/c", GitUtils.getRelativePath(new Path("/file/a/b/c"), new Path("../"))); }