@Override
    public Worker<Transfer> open(final Application application, final ApplicationQuitCallback quit, final FileWatcherListener listener) {
        final Worker<Transfer> worker = new EditOpenWorker(host, this, application, file,
                temporary, progress, quit, listener, notification);
        if(log.isDebugEnabled()) {
            log.debug(String.format("Download file for edit %s", temporary));
        }
        return worker;
    }
@Test
    public void testOpen() throws Exception {
        final AtomicBoolean t = new AtomicBoolean();
        final Host host = new Host(new TestProtocol());
        final NullSession session = new NullTransferSession(host) {
            @Override
            @SuppressWarnings("unchecked")
            public <T> T _getFeature(final Class<T> type) {
                if(type.equals(Read.class)) {
                    return (T) new Read() {
                        @Override
                        public InputStream read(final Path file, final TransferStatus status, final ConnectionCallback callback) {
                            t.set(true);
                            return IOUtils.toInputStream("content", Charset.defaultCharset());
                        }

                        @Override
                        public boolean offset(final Path file) {
                            assertEquals(new Path("/f", EnumSet.of(Path.Type.file)), file);
                            return false;
                        }
                    };
                }
                return super._getFeature(type);
            }
        };
        final AtomicBoolean e = new AtomicBoolean();
        final Path file = new Path("/f", EnumSet.of(Path.Type.file));
        file.attributes().setSize("content".getBytes().length);
        final AbstractEditor editor = new AbstractEditor(host, file, new DisabledProgressListener()) {
            @Override
            public void close() {
                //
            }

            @Override
            protected void edit(final Application editor, final Path file, final Local temporary, final FileWatcherListener listener, final ApplicationQuitCallback quit) {
                e.set(true);
            }

            @Override
            protected void watch(final Application application, final Local temporary, final FileWatcherListener listener, final ApplicationQuitCallback quit) {
                //
            }
        };
        editor.open(new Application("com.editor"), new DisabledApplicationQuitCallback(), new DisabledFileWatcherListener()).run(session);
        assertTrue(t.get());
        assertTrue(e.get());
    }