byte[] oldValue = "ZurichGenevaLuganoAAA".getBytes();
byte[] newValue = "AzurichGenevaLuganoAbbLuganoAAA".getBytes();
List<Checksum> checksums = RSync.checksums(oldValue, size);
List<Instruction> instructions = RSync.instructions(newValue, checksums, size);
DataBuffer reconstructedValue = RSync.reconstruct(oldValue, instructions, size);
Assert.assertArrayEquals(newValue, reconstructedValue.bytes());
}
@Test
public void testGetReconstructedValueStatic1() throws IOException, NoSuchAlgorithmException {
// oldValue and newValue are set manually