public static java.nio.file.Path relativizePath(
            java.nio.file.Path basePath, java.nio.file.Path pathToRelativize) {
        if (pathToRelativize.isAbsolute()) {
            return basePath.relativize(pathToRelativize);
        } else {
            return pathToRelativize;
        }
    }
@Test
    void testRelativizeOfRelativePath() {
        final java.nio.file.Path path = Paths.get("foobar");
        assertThat(path).isRelative();

        final java.nio.file.Path relativePath =
                FileUtils.relativizePath(temporaryFolder.getRoot(), path);
        assertThat(path).isEqualTo(relativePath);
    }