@Override
    public Path touch(final Path file, final TransferStatus status) throws BackgroundException {
        if(file.isFile()) {
            try {
                Files.createFile(session.toPath(file));
            }
            catch(FileAlreadyExistsException e) {
                //
            }
            catch(IOException e) {
                throw new LocalExceptionMappingService().map("Cannot create {0}", e, file);
            }
        }
        return file;
    }
@Test
    public void testTouch() throws Exception {
        final LocalSession session = new LocalSession(new Host(new LocalProtocol(), new LocalProtocol().getDefaultHostname()));
        assertNotNull(session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback()));
        assertTrue(session.isConnected());
        assertNotNull(session.getClient());
        session.login(new DisabledLoginCallback(), new DisabledCancelCallback());
        final Path workdir = new LocalHomeFinderFeature().find();
        final Path test = new Path(workdir, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
        new LocalTouchFeature(session).touch(test, new TransferStatus());
        // Test override
        new LocalTouchFeature(session).touch(test, new TransferStatus());
        assertTrue(new LocalFindFeature(session).find(test));
        final AttributedList<Path> list = new LocalListService(session).list(workdir, new DisabledListProgressListener());
        assertTrue(list.contains(test));
        new LocalDeleteFeature(session).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
        session.close();
    }