### Question:
ByteArrayDiffs { public static byte[] undo(byte[] target, byte[] diff) { MemoryDiff md = Serials.deserialize(DefaultSerialization.newInstance(), MemoryDiff.class, diff); return Diffs.apply(new UndoOpQueue(md.queue()), target); } private  ByteArrayDiffs(); static byte[] diff(byte[] orig, byte[] target); static byte[] apply(byte[] orig, byte[] diff); static byte[] udiff(byte[] orig, byte[] target); static byte[] undo(byte[] target, byte[] diff); static byte[] udiff(byte[] diff); static byte[] undo(byte[] diff);  }### Answer:
@Test public void testUndo() throws Exception { byte[] orig = "Hello World".getBytes(); byte[] target = "Hellish Cruel World".getBytes(); byte[] diff = ByteArrayDiffs.diff(orig, target); byte[] undone = ByteArrayDiffs.undo(target, diff); Assert.assertTrue(Arrays.equals(orig, undone)); }