@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        try {
            final PathContainerService service = new DefaultPathContainerService();
            if(service.isContainer(file)) {
                for(RootFolder r : session.roots()) {
                    if(StringUtils.equalsIgnoreCase(file.getName(), PathNormalizer.name(r.getPath()))
                            || StringUtils.equalsIgnoreCase(file.getName(), PathNormalizer.name(r.getName()))) {
                        return this.toAttributes(r);
                    }
                }
                throw new NotfoundException(file.getAbsolute());
            }
            final FilesApi files = new FilesApi(session.getClient());
            return this.toAttributes(files.filesGet_0(URIEncoder.encode(fileid.getPrefixedPath(file))));
        }
        catch(ApiException e) {
            throw new StoregateExceptionMappingService(fileid).map("Failure to read attributes of {0}", e, file);
        }
    }
@Test
    public void testFindRoot() throws Exception {
        final StoregateIdProvider nodeid = new StoregateIdProvider(session);
        final StoregateAttributesFinderFeature f = new StoregateAttributesFinderFeature(session, nodeid);
        assertNotNull(f.find(new Path("/", EnumSet.of(Path.Type.directory))));
        assertNotEquals(PathAttributes.EMPTY, f.find(new Path("/", EnumSet.of(Path.Type.directory))));
    }