@Override
    public void setTimestamp(final Path file, final TransferStatus status) throws BackgroundException {
        if(file.isVolume()) {
            log.warn(String.format("Skip setting timestamp for %s", file));
            return;
        }
        try {
            if(null != status.getModified()) {
                final String fileid = this.fileid.getFileId(file);
                final File properties = new File();
                properties.setModifiedTime(status.getModified() != null ? new DateTime(status.getModified()) : null);
                final File latest = session.getClient().files().update(fileid, properties).setFields(DriveAttributesFinderFeature.DEFAULT_FIELDS).
                        setSupportsAllDrives(new HostPreferences(session.getHost()).getBoolean("googledrive.teamdrive.enable")).execute();
                status.setResponse(new DriveAttributesFinderFeature(session, this.fileid).toAttributes(latest));
            }
        }
        catch(IOException e) {
            throw new DriveExceptionMappingService(fileid).map("Failure to write attributes of {0}", e, file);
        }
    }
@Test
    public void testSetTimestamp() throws Exception {
        final DriveFileIdProvider fileid = new DriveFileIdProvider(session);
        final Path home = DriveHomeFinderService.MYDRIVE_FOLDER;
        final Path test = new DriveTouchFeature(session, fileid).touch(new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
        new DriveMetadataFeature(session, fileid).setMetadata(test, Collections.singletonMap("test", "t"));
        final long modified = System.currentTimeMillis();
        final TransferStatus status = new TransferStatus().withModified(modified);
        new DriveTimestampFeature(session, fileid).setTimestamp(test, status);
        assertEquals(modified, new DefaultAttributesFinderFeature(session).find(test).getModificationDate());
        final PathAttributes attr = new DriveAttributesFinderFeature(session, fileid).find(test);
        assertEquals(modified, attr.getModificationDate());
        assertEquals(attr, status.getResponse());
        assertEquals(Collections.singletonMap("test", "t"), new DriveMetadataFeature(session, fileid).getMetadata(test));
        new DriveDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }