@Override
    public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
        try {
            final AttributedList<Path> children = new AttributedList<>();
            String page = null;
            do {
                final TeamDriveList list = session.getClient().teamdrives().list()
                    .setPageToken(page)
                    .setPageSize(pagesize)
                    .execute();
                for(TeamDrive f : list.getTeamDrives()) {
                    final Path child = new Path(directory, f.getName(), EnumSet.of(Path.Type.directory, Path.Type.volume),
                            new PathAttributes().withFileId(f.getId()));
                    children.add(child);
                }
                listener.chunk(directory, children);
                page = list.getNextPageToken();
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Continue with next page token %s", page));
                }
            }
            while(page != null);
            return children;
        }
        catch(IOException e) {
            throw new DriveExceptionMappingService(fileid).map("Listing directory failed", e, directory);
        }
    }
@Test
    public void list() throws Exception {
        final AttributedList<Path> list = new DriveTeamDrivesListService(session, new DriveFileIdProvider(session)).list(
            DriveHomeFinderService.SHARED_DRIVES_NAME, new DisabledListProgressListener());
        assertNotSame(AttributedList.emptyList(), list);
    }