LocalFileSystemIOProviderImpl extends AbstractFileSystemIOProviderImpl implements IOProvider { @Override public File resolveFileFromUri(final String uri, final Map<String, Object> context) { final String absolutePath; if (uri.startsWith(PROTOCOL1)) { absolutePath = uri.substring(PROTOCOL1.length()); } else if (uri.startsWith(PROTOCOL2)) { absolutePath = uri.substring(PROTOCOL2.length()); } else { absolutePath = uri; } return new File(getOsAwarePath(absolutePath)); }  @Override File resolveFileFromUri(final String uri, final Map<String, Object> context); @Override boolean supports(final String uri);  }
@Test public void testResolveFileFromUri() throws Exception { final LocalFileSystemIOProviderImpl io = new LocalFileSystemIOProviderImpl(); assertOsSpecificPathMatch(io.getOsAwarePath("/some/path/to/a/file"), io.resolveFileFromUri("/some/path/to/a/file", null).getAbsolutePath()); assertOsSpecificPathMatch(io.getOsAwarePath("/some/path/to/a/file"), io.resolveFileFromUri("file: assertOsSpecificPathMatch(io.getOsAwarePath("/some/path/to/a/file"), io.resolveFileFromUri("file:" + File.separator + File.separator + "/some/path/to/a/file", null).getAbsolutePath()); final String current = io.resolveFileFromUri("file: assertOsSpecificPathNoMatch(io.getOsAwarePath("/some/path/to/a/file"), current); assertTrue(current.endsWith(io.getOsAwarePath("/some/path/to/a/file"))); }