@Override
    public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
        return this.list(directory, listener, new HostPreferences(session.getHost()).getInteger("eue.listing.chunksize"));
    }
@Test
    public void testListContainingFolder() throws Exception {
        final EueResourceIdProvider fileid = new EueResourceIdProvider(session);
        final Path folder = new EueDirectoryFeature(session, fileid).mkdir(
                new Path(new AlphanumericRandomStringService().random(), EnumSet.of(directory)), new TransferStatus());
        final AtomicBoolean callback = new AtomicBoolean();
        assertTrue(new EueListService(session, fileid).list(folder, new DisabledListProgressListener() {
            @Override
            public void chunk(final Path parent, final AttributedList<Path> list) {
                assertNotSame(AttributedList.EMPTY, list);
                callback.set(true);
            }
        }).isEmpty());
        assertTrue(callback.get());
        final Path subfolder = new EueDirectoryFeature(session, fileid).mkdir(
                new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(directory)), new TransferStatus());
        assertTrue(new EueListService(session, fileid).list(subfolder, new DisabledListProgressListener()).isEmpty());
        final AttributedList<Path> list = new EueListService(session, fileid).list(folder, new DisabledListProgressListener());
        assertFalse(list.isEmpty());
        assertNotNull(list.find(new SimplePathPredicate(subfolder)));
        assertEquals(subfolder.attributes().getFileId(), list.find(new SimplePathPredicate(subfolder)).attributes().getFileId());
        assertSame(folder, list.find(new SimplePathPredicate(subfolder)).getParent());
        new EueDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
        assertFalse((new EueFindFeature(session, fileid).find(folder, new DisabledListProgressListener())));
        assertFalse((new EueFindFeature(session, fileid).find(subfolder, new DisabledListProgressListener())));
    }