public static URL toURL(java.nio.file.Path path) throws MalformedURLException {
        final String scheme = path.toUri().getScheme();
        return new URL(scheme, null, -1, path.toString());
    }
@Test
    void testRelativePathToURL() throws MalformedURLException {
        final java.nio.file.Path relativePath = Paths.get("foobar");
        assertThat(relativePath).isRelative();

        final URL relativeURL = FileUtils.toURL(relativePath);
        final java.nio.file.Path transformedPath = Paths.get(relativeURL.getPath());

        assertThat(transformedPath).isEqualTo(relativePath);
    }