@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        final PathAttributes attr = super.find(file, listener);
        if(StringUtils.isNotBlank(file.attributes().getVersionId())) {
            return attr.withVersionId(file.attributes().getVersionId()).withFileId(file.attributes().getFileId());
        }
        return attr;
    }
@Test
    public void testFindFile() throws Exception {
        final Checksum checksum = ChecksumComputeFactory.get(HashAlgorithm.sha1).compute(new NullInputStream(0L), new TransferStatus());
        final Path test = new DAVTouchFeature(new NextcloudWriteFeature(session)).touch(new Path(new DefaultHomeFinderService(session).find(),
                new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus().withChecksum(checksum));
        final NextcloudAttributesFinderFeature f = new NextcloudAttributesFinderFeature(session);
        final PathAttributes attributes = f.find(test);
        assertNotNull(attributes.getFileId());
        assertEquals(0L, attributes.getSize());
        assertNotEquals(-1L, attributes.getModificationDate());
        assertNotEquals(Checksum.NONE, attributes.getChecksum());
        assertEquals(checksum, attributes.getChecksum());
        assertNotNull(attributes.getETag());
        assertNotNull(attributes.getFileId());
        // Test wrong type
        try {
            f.find(new Path(test.getAbsolute(), EnumSet.of(Path.Type.directory)));
            fail();
        }
        catch(NotfoundException e) {
            // Expected
        }
        finally {
            new DAVDeleteFeature(session).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
        }
    }