    @Test
    public void testRelativePath() {

        File parent = new File("/");
        File child = new File("/");

        Assert.assertEquals(PathUtils.relativePath(parent, child), "/");

        parent = new File("/");
        child = new File("/opt");
        Assert.assertEquals(PathUtils.relativePath(parent, child), "/opt");

        parent = new File("/");
        child = new File("/opt/");
        Assert.assertEquals(PathUtils.relativePath(parent, child), "/opt");

        parent = new File("/opt/");
        child = new File("/opt");
        Assert.assertEquals(PathUtils.relativePath(parent, child), "/");

        parent = new File("/opt/");
        child = new File("/opt/web");
        Assert.assertEquals(PathUtils.relativePath(parent, child), "/web");

        parent = new File("/opt/");
        child = new File("/opt/web/");
        Assert.assertEquals(PathUtils.relativePath(parent, child), "/web");


        parent = new File("/opt/");
        child = new File("/");
        Throwable throwable = testRelativePathException(parent, child);
        Assert.assertNotNull(throwable);

        parent = new File("/opt/");
        child = new File("/op1");
        throwable = testRelativePathException(parent, child);
        Assert.assertNotNull(throwable);

        parent = new File("/opt/");
        child = new File("/op1/");
        throwable = testRelativePathException(parent, child);
        Assert.assertNotNull(throwable);
    }