@Override
    public void setTimestamp(final Path file, final TransferStatus status) throws BackgroundException {
        if(failure != null) {
            if(log.isDebugEnabled()) {
                log.debug(String.format("Skip setting timestamp for %s due to previous failure %s", file, failure.getMessage()));
            }
            throw new FTPExceptionMappingService().map("Cannot change timestamp of {0}", failure, file);
        }
        try {
            if(null != status.getModified()) {
                final MDTMSecondsDateFormatter formatter = new MDTMSecondsDateFormatter();
                // The utime() function sets the access and modification times of the named
                // file from the structures in the argument array timep.
                // The access time is set to the value of the first element,
                // and the modification time is set to the value of the second element
                // Accessed date, modified date, created date
                if(!session.getClient().sendSiteCommand(String.format("UTIME %s %s %s %s UTC",
                        file.getAbsolute(),
                        formatter.format(new Date(System.currentTimeMillis()), TimeZone.getTimeZone("UTC")),
                        formatter.format(new Date(status.getModified()), TimeZone.getTimeZone("UTC")),
                        formatter.format(new Date(status.getModified()), TimeZone.getTimeZone("UTC"))))) {
                    throw failure = new FTPException(session.getClient().getReplyCode(),
                            session.getClient().getReplyString());
                }
            }
        }
        catch(IOException e) {
            throw new FTPExceptionMappingService().map("Cannot change timestamp of {0}", e, file);
        }
    }
@Test(expected = BackgroundException.class)
    public void testSetTimestamp() throws Exception {
        final FTPWorkdirService workdir = new FTPWorkdirService(session);
        final long modified = System.currentTimeMillis();
        final Path test = new Path(workdir.find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
        new FTPTouchFeature(session).touch(test, new TransferStatus());
        new FTPUTIMETimestampFeature(session).setTimestamp(test, modified);
        new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }