@Override
    public Comparison compare(final Path.Type type, final PathAttributes local, final PathAttributes remote) {
        if(TransferStatus.UNKNOWN_LENGTH != local.getSize() && TransferStatus.UNKNOWN_LENGTH != remote.getSize()) {
            if(local.getSize() == remote.getSize()) {
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Equal size %s", remote.getSize()));
                }
                return Comparison.equal;
            }
            if(remote.getSize() == 0) {
                return Comparison.local;
            }
            if(local.getSize() == 0) {
                return Comparison.remote;
            }
            if(log.isDebugEnabled()) {
                log.debug(String.format("Local size %s not equal remote %s", local.getSize(), remote.getSize()));
            }
            // Different file size
            return Comparison.notequal;
        }
        return Comparison.unknown;
    }
@Test
    public void testCompare() {
        ComparisonService s = new SizeComparisonService();
        assertEquals(Comparison.remote, s.compare(Path.Type.file, new PathAttributes().withSize(0L), new PathAttributes().withSize(1L)));
        assertEquals(Comparison.local, s.compare(Path.Type.file, new PathAttributes().withSize(1L), new PathAttributes().withSize(0L)));
        assertEquals(Comparison.equal, s.compare(Path.Type.file, new PathAttributes().withSize(1L), new PathAttributes().withSize(1L)));
        assertEquals(Comparison.notequal, s.compare(Path.Type.file, new PathAttributes().withSize(2L), new PathAttributes().withSize(1L)));
    }