@Override
    public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException {
        if(super.accept(file, local, parent)) {
            if(local.isFile()) {
                if(parent.isExists()) {
                    if(find.find(file)) {
                        final PathAttributes attributes = attribute.find(file);
                        if(attributes.getSize() == local.attributes().getSize()) {
                            if(Checksum.NONE != attributes.getChecksum()) {
                                final ChecksumCompute compute = ChecksumComputeFactory.get(attributes.getChecksum().algorithm);
                                if(compute.compute(local.getInputStream(), parent).equals(attributes.getChecksum())) {
                                    if(log.isInfoEnabled()) {
                                        log.info(String.format("Skip file %s with checksum %s", file, attributes.getChecksum()));
                                    }
                                    return false;
                                }
                                log.warn(String.format("Checksum mismatch for %s and %s", file, local));
                            }
                            else {
                                if(log.isInfoEnabled()) {
                                    log.info(String.format("Skip file %s with remote size %d", file, attributes.getSize()));
                                }
                                // No need to resume completed transfers
                                return false;
                            }
                        }
                    }
                }
            }
            return true;
        }
        return false;
    }
@Test
    public void testSkip() throws Exception {
        final Path file = new Path("t", EnumSet.of(Path.Type.file));
        final ResumeFilter f = new ResumeFilter(new DisabledUploadSymlinkResolver(), new NullSession(new Host(new TestProtocol())) {
            @Override
            @SuppressWarnings("unchecked")
            public <T> T _getFeature(final Class<T> type) {
                if(type == Find.class) {
                    return (T) new Find() {
                        @Override
                        public boolean find(final Path file, final ListProgressListener listener) {
                            return true;
                        }
                    };
                }
                return super._getFeature(type);
            }

            @Override
            public AttributedList<Path> list(final Path parent, final ListProgressListener listener) {
                return new AttributedList<>(Collections.singletonList(file));
            }
        });
        file.attributes().setSize(1L);
        assertFalse(f.accept(file, new NullLocal("a") {
            @Override
            public boolean exists() {
                return true;
            }

            @Override
            public LocalAttributes attributes() {
                return new LocalAttributes("t") {
                    @Override
                    public long getSize() {
                        return 1L;
                    }
                };
            }

        }, new TransferStatus().exists(true)));
    }