@Override
    public void setTimestamp(final Path file, final TransferStatus status) throws BackgroundException {
        try {
            final FilesApi files = new FilesApi(session.getClient());
            status.setResponse(new StoregateAttributesFinderFeature(session, fileid).toAttributes(files.filesUpdateFile(fileid.getFileId(file),
                                    new UpdateFilePropertiesRequest()
                                            .created(null != status.getCreated() ? new DateTime(status.getCreated()) : null)
                                            .modified(null != status.getModified() ? new DateTime(status.getModified()) : null)
                            )
                    )
            );
        }
        catch(ApiException e) {
            throw new StoregateExceptionMappingService(fileid).map("Failure to write attributes of {0}", e, file);
        }
    }
@Test
    public void testSetTimestamp() throws Exception {
        final StoregateIdProvider nodeid = new StoregateIdProvider(session);
        final Path room = new StoregateDirectoryFeature(session, nodeid).mkdir(new Path(
            String.format("/My files/%s", new AlphanumericRandomStringService().random()), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
        final Path file = new Path(room, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
        new StoregateTouchFeature(session, nodeid).touch(file, new TransferStatus().withMime("x-application/cyberduck"));
        assertNotNull(new StoregateAttributesFinderFeature(session, nodeid).find(file));
        final long created = 1695161463630L;
        final long modified = Instant.now().minusSeconds(5 * 24 * 60 * 60).getEpochSecond() * 1000;
        final TransferStatus status = new TransferStatus()
                .withCreated(created)
                .withModified(modified);
        new StoregateTimestampFeature(session, nodeid).setTimestamp(file, status);
        final PathAttributes attr = new StoregateAttributesFinderFeature(session, nodeid).find(file);
        assertEquals(created, attr.getCreationDate());
        assertEquals(modified, attr.getModificationDate());
        assertEquals(created, new DefaultAttributesFinderFeature(session).find(file).getCreationDate());
        assertEquals(modified, new DefaultAttributesFinderFeature(session).find(file).getModificationDate());
        assertEquals(attr, status.getResponse());
        new StoregateDeleteFeature(session, nodeid).delete(Arrays.asList(file, room), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }