@Override
    protected List<DavResource> list(final Path directory) throws IOException {
        return session.getClient().list(new DAVPathEncoder().encode(directory), 1,
                Stream.of(
                                NextcloudAttributesFinderFeature.OC_FILEID_CUSTOM_NAMESPACE,
                                NextcloudAttributesFinderFeature.OC_CHECKSUMS_CUSTOM_NAMESPACE,
                                NextcloudAttributesFinderFeature.OC_SIZE_CUSTOM_NAMESPACE,
                                DAVTimestampFeature.LAST_MODIFIED_CUSTOM_NAMESPACE,
                                DAVTimestampFeature.LAST_MODIFIED_SERVER_CUSTOM_NAMESPACE).
                        collect(Collectors.toSet()));
    }
@Test
    public void testList() throws Exception {
        final Path home = new DefaultHomeFinderService(session).find();
        final Path directory = new DAVDirectoryFeature(session, new NextcloudAttributesFinderFeature(session)).mkdir(new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
        final PathAttributes directoryAttributes = new DAVAttributesFinderFeature(session).find(directory);
        final String folderEtag = directoryAttributes.getETag();
        final long folderTimestamp = directoryAttributes.getModificationDate();
        final Path test = new DAVTouchFeature(new NextcloudWriteFeature(session)).touch(new Path(directory,
                new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
        assertEquals(Protocol.DirectoryTimestamp.implicit, session.getHost().getProtocol().getDirectoryTimestamp());
        assertNotEquals(folderTimestamp, new DAVAttributesFinderFeature(session).find(directory).getModificationDate());
        assertNotEquals(folderEtag, new DAVAttributesFinderFeature(session).find(directory).getETag());
        try {
            final AttributedList<Path> list = new NextcloudListService(session).list(directory,
                    new DisabledListProgressListener());
            assertEquals(1, list.size());
            assertNotNull(list.find(new SimplePathPredicate(test)));
            assertNotNull(list.find(new SimplePathPredicate(test)).attributes().getFileId());
        }
        finally {
            new DAVDeleteFeature(session).delete(Arrays.asList(test, directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
        }
    }