@Override
    public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
        try {
            final AttributedList<Path> children = new AttributedList<>();
            ListFoldersResult listFoldersResult;
            this.parse(directory, listener, children, listFoldersResult = new DbxUserSharingRequests(session.getClient()).listFolders());
            while(listFoldersResult.getCursor() != null) {
                this.parse(directory, listener, children, listFoldersResult = new DbxUserSharingRequests(session.getClient())
                    .listMountableFoldersContinue(listFoldersResult.getCursor()));
            }
            return children;
        }
        catch(DbxException e) {
            throw new DropboxExceptionMappingService().map("Listing directory {0} failed", e, directory);
        }
    }
@Test
    public void testList() throws Exception {
        final AttributedList<Path> list = new DropboxSharedFoldersListService(session).list(
            new Path("/", EnumSet.of(Path.Type.directory, Path.Type.volume)), new DisabledListProgressListener());
        assertNotSame(AttributedList.emptyList(), list);
    }