@Override
    public Path find() throws BackgroundException {
        try {
            // "." as referring to the current directory
            final String directory = session.sftp().canonicalize(".");
            return new Path(PathNormalizer.normalize(directory), directory.equals(String.valueOf(Path.DELIMITER)) ?
                EnumSet.of(Path.Type.volume, Path.Type.directory) : EnumSet.of(Path.Type.directory));
        }
        catch(IOException e) {
            throw new SFTPExceptionMappingService().map(e);
        }
    }
@Test
    public void testFind() throws Exception {
        assertEquals(new Path("/", EnumSet.of(Path.Type.directory)), new SFTPHomeDirectoryService(session).find());
    }