@Override
    public String getFileId(final Path file) throws BackgroundException {
        if(StringUtils.isNotBlank(file.attributes().getFileId())) {
            return file.attributes().getFileId();
        }
        final String cached = super.getFileId(file);
        if(cached != null) {
            if(log.isDebugEnabled()) {
                log.debug(String.format("Return cached fileid %s for file %s", cached, file));
            }
            return cached;
        }
        if(file.isRoot()) {
            return ROOT;
        }
        final Path f = new BoxListService(session, this).list(file.getParent(),
                new DisabledListProgressListener()).find(new SimplePathPredicate(file));
        if(null == f) {
            throw new NotfoundException(file.getAbsolute());
        }
        return f.attributes().getFileId();
    }
@Test
    public void getFileIdRoot() throws Exception {
        assertEquals(BoxFileidProvider.ROOT, new BoxFileidProvider(session).getFileId(
                new Path("/", EnumSet.of(Path.Type.directory))));
    }