@Override
    public Path touch(final Path file, final TransferStatus status) throws BackgroundException {
        return super.touch(file, status.withChecksum(write.checksum(file, status).compute(new NullInputStream(0L), status)));
    }
@Test
    public void testTouchVersioning() throws Exception {
        final Path container = new Path("versioning-test-eu-central-1-cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final Path file = new Path(container, new AsciiRandomStringService().random(), EnumSet.of(Path.Type.file));
        final String version1 = new S3TouchFeature(session, new S3AccessControlListFeature(session)).touch(file, new TransferStatus()).attributes().getVersionId();
        assertNotNull(version1);
        assertEquals(version1, new S3AttributesFinderFeature(session, new S3AccessControlListFeature(session)).find(file).getVersionId());
        final String version2 = new S3TouchFeature(session, new S3AccessControlListFeature(session)).touch(file, new TransferStatus()).attributes().getVersionId();
        assertNotNull(version2);
        assertEquals(version2, new S3AttributesFinderFeature(session, new S3AccessControlListFeature(session)).find(file).getVersionId());
        assertTrue(new S3FindFeature(session, new S3AccessControlListFeature(session)).find(file));
        assertTrue(new DefaultFindFeature(session).find(file));
        assertTrue(new DefaultFindFeature(session).find(new Path(file.getParent(), file.getName(), file.getType(),
                new PathAttributes(file.attributes()).withVersionId(version1))));
        assertTrue(new DefaultFindFeature(session).find(new Path(file.getParent(), file.getName(), file.getType(),
                new PathAttributes(file.attributes()).withVersionId(version2))));
        assertTrue(new S3FindFeature(session, new S3AccessControlListFeature(session)).find(new Path(file.getParent(), file.getName(), file.getType(),
                new PathAttributes(file.attributes()).withVersionId(version1))));
        assertTrue(new S3FindFeature(session, new S3AccessControlListFeature(session)).find(new Path(file.getParent(), file.getName(), file.getType(),
                new PathAttributes(file.attributes()).withVersionId(version2))));
        new S3DefaultDeleteFeature(session).delete(Collections.singletonList(new Path(file).withAttributes(PathAttributes.EMPTY)), new DisabledLoginCallback(), new Delete.DisabledCallback());
        // Versioned files are not deleted but with delete marker added
        assertTrue(new DefaultFindFeature(session).find(new Path(file.getParent(), file.getName(), file.getType(),
            new PathAttributes(file.attributes()).withVersionId(version1))));
        assertTrue(new DefaultFindFeature(session).find(new Path(file.getParent(), file.getName(), file.getType(),
            new PathAttributes(file.attributes()).withVersionId(version2))));
        assertTrue(new S3FindFeature(session, new S3AccessControlListFeature(session)).find(new Path(file.getParent(), file.getName(), file.getType(),
                new PathAttributes(file.attributes()).withVersionId(version1))));
        assertTrue(new S3FindFeature(session, new S3AccessControlListFeature(session)).find(new Path(file.getParent(), file.getName(), file.getType(),
                new PathAttributes(file.attributes()).withVersionId(version2))));
    }