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 testRelativizeOfAbsolutePath() throws IOException {
        final java.nio.file.Path absolutePath =
                TempDirUtils.newFolder(temporaryFolder).toPath().toAbsolutePath();

        final java.nio.file.Path rootPath = temporaryFolder.getRoot();
        final java.nio.file.Path relativePath = FileUtils.relativizePath(rootPath, absolutePath);
        assertThat(relativePath).isRelative();
        assertThat(absolutePath).isEqualTo(rootPath.resolve(relativePath));
    }