@Override
    public boolean accept(final Path source, final Local local, final TransferStatus parent) {
        return true;
    }
@Test
    public void testAcceptDirectoryExists() throws Exception {
        final HashMap<Path, Path> files = new HashMap<>();
        final Path source = new Path("a", EnumSet.of(Path.Type.directory));
        files.put(source, new Path("a", EnumSet.of(Path.Type.directory)));
        final Find find = new Find() {
            @Override
            public boolean find(final Path file, final ListProgressListener listener) throws BackgroundException {
                return true;
            }
        };
        AbstractCopyFilter f = new OverwriteFilter(new NullTransferSession(new Host(new TestProtocol())), new NullTransferSession(new Host(new TestProtocol())) {
            @Override
            @SuppressWarnings("unchecked")
            public <T> T _getFeature(final Class<T> type) {
                if(type.equals(Find.class)) {
                    return (T) find;
                }
                return super._getFeature(type);
            }
        }, files);
        assertTrue(f.accept(source, null, new TransferStatus().exists(true)));
        final TransferStatus status = f.prepare(source, null, new TransferStatus().exists(true), new DisabledProgressListener());
        assertTrue(status.isExists());
    }