@Override
    public void preflight(final Path source, final Path target) throws BackgroundException {
        if(!CteraTouchFeature.validate(target.getName())) {
            throw new InvalidFilenameException(MessageFormat.format(LocaleFactory.localizedString("Cannot rename {0}", "Error"), source.getName())).withFile(source);
        }
        assumeRole(source, DELETEPERMISSION);
        // defaults to Acl.EMPTY (disabling role checking) if target does not exist
        assumeRole(target, WRITEPERMISSION);
        // no createfilespermission required for now
        if(source.isDirectory()) {
            assumeRole(target.getParent(), target.getName(), CREATEDIRECTORIESPERMISSION);
        }
    }
@Test
    public void testPreflightFileMissingCustomProps() throws Exception {
        final Path source = new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
        source.setAttributes(source.attributes().withAcl(Acl.EMPTY));
        final Path target = new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
        target.setAttributes(target.attributes().withAcl(Acl.EMPTY));
        new CteraMoveFeature(session).preflight(source, target);
    }