@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 testAppendEqualSize() throws Exception {
        final Host host = new Host(new TestProtocol());
        final NullSession session = new NullSession(host) {
            @Override
            public AttributedList<Path> list(final Path folder, final ListProgressListener listener) throws BackgroundException {
                final AttributedList<Path> list = new AttributedList<>(Collections.singletonList(new Path(folder, "t", EnumSet.of(Path.Type.file))
                        .withAttributes(new PathAttributes().withSize(3L))));
                listener.chunk(folder, list);
                return list;
            }
        };
        final ResumeFilter f = new ResumeFilter(new DisabledUploadSymlinkResolver(), session,
                new UploadFilterOptions(host).withTemporary(true), new NullUploadFeature());
        final long size = 3L;
        final Path t = new Path("t", EnumSet.of(Path.Type.file));
        assertFalse(f.accept(t, new NullLocal("t") {
            @Override
            public LocalAttributes attributes() {
                return new LocalAttributes("t") {
                    @Override
                    public long getSize() {
                        return size;
                    }
                };
            }

            @Override
            public boolean isFile() {
                return true;
            }

            @Override
            public boolean exists() {
                return true;
            }
        }, new TransferStatus().exists(true)));
    }