public java.nio.file.Path toPath(final Path file) throws LocalAccessDeniedException {
        return this.toPath(file.getAbsolute());
    }
@Test
    public void toPath() throws Exception {
        final LocalSession session = new LocalSession(new Host(new LocalProtocol(), new LocalProtocol().getDefaultHostname()));
        session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback());
        assertNotNull(session.toPath("/Users/username"));
        assertNotNull(session.toPath("/C:\\Users\\Administrator"));
        assertEquals("C:\\Users\\Administrator", "/C:\\Users\\Administrator".replaceFirst("^/(.:[/\\\\])", "$1"));
        assertEquals("C:/Users/Administrator", "/C:/Users/Administrator".replaceFirst("^/(.:[/\\\\])", "$1"));
        session.close();
    }