@Override
    public boolean find(final Path file, final ListProgressListener listener) throws BackgroundException {
        final boolean exists = Files.exists(session.toPath(file), LinkOption.NOFOLLOW_LINKS);
        if(exists) {
            if(Files.isSymbolicLink(session.toPath(file))) {
                return true;
            }
            if(!file.isRoot()) {
                try {
                    if(!StringUtils.equals(session.toPath(file).toFile().getCanonicalFile().getName(), file.getName())) {
                        return false;
                    }
                }
                catch(IOException e) {
                    log.warn(String.format("Failure obtaining canonical file reference for %s", file));
                }
            }
        }
        return exists;
    }
@Test
    public void testFindRoot() throws Exception {
        final LocalSession session = new LocalSession(new Host(new LocalProtocol(), new LocalProtocol().getDefaultHostname()));
        session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback());
        session.login(new DisabledLoginCallback(), new DisabledCancelCallback());
        assertTrue(new LocalFindFeature(session).find(new Path("/", EnumSet.of(Path.Type.directory))));
    }