@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        try {
            if(file.isDirectory()) {
                return this.toAttributes(new FoldersApi(new BoxApiClient(session.getClient())).getFoldersId(fileid.getFileId(file),
                        DEFAULT_FIELDS, null, null));
            }
            return this.toAttributes(new FilesApi(new BoxApiClient(session.getClient())).getFilesId(fileid.getFileId(file),
                    StringUtils.EMPTY, DEFAULT_FIELDS, null, null));
        }
        catch(ApiException e) {
            throw new BoxExceptionMappingService(fileid).map("Failure to read attributes of {0}", e, file);
        }
    }
@Test
    public void testFindRoot() throws Exception {
        final BoxFileidProvider fileid = new BoxFileidProvider(session);
        final BoxAttributesFinderFeature f = new BoxAttributesFinderFeature(session, fileid);
        final PathAttributes attributes = f.find(new Path("/", EnumSet.of(Path.Type.volume, Path.Type.directory)));
        assertNotEquals(PathAttributes.EMPTY, attributes);
    }