new PeerSync(receiver, 5);
final Number160 locationKey = new Number160(500);
final Number160 domainKey = Number160.ZERO;
final Number160 contentKey = Number160.ZERO;
Number640 key = new Number640(locationKey, domainKey, contentKey, Number160.ZERO);
final String newValue = "Test1Test2Test3Test4";
final String oldValue = "test0Test2test0Test4";
Data test1 = new Data(newValue.getBytes());
Data test2 = new Data(oldValue.getBytes());
sender.put(locationKey).data(test1).start().awaitUninterruptibly();
receiver.put(locationKey).data(test2).start().awaitUninterruptibly();
FutureDone<SyncStat> future = senderSync.synchronize(receiver.peerAddress()).key(key)
.start();
future.awaitUninterruptibly();
System.err.println(future.object().toString());
Data data = receiver.storageLayer()
.get(new Number640(locationKey, domainKey, contentKey, Number160.ZERO));
byte[] reconstructedValue = data.toBytes();
assertArrayEquals(newValue.getBytes(), reconstructedValue);
Assert.assertEquals(20, ((SyncStat)future.object()).dataOrig());
Assert.assertEquals(26, ((SyncStat)future.object()).dataCopy());