@Test
public final void testToPath() throws Exception {

    final Path path = IO.toPath("part");
    assertEquals(getFileUri(), path.toUri());
    final URI rootUri = temporaryFolder.getRoot().toURI();
    final URI zipFsUri = new URI("jar:" + rootUri + "x.zip");
    IO.setFileSystemThreadLocal(null);
    final FileSystem zipFileSystem = FileSystems.newFileSystem(zipFsUri, Collections.singletonMap("create", "true"));
    IO.setFileSystem(zipFileSystem);
    final Path zipPath = IO.toPath("part");
    assertEquals("jar:" + rootUri + "x.zip!/part".replaceAll("/+", "/"), zipPath.toUri().toString().replaceAll("/+", "/"));
}