function testGetReversed_Modify() {
  var original = new lf.cache.TableDiff(table.getName());
  var rowOld = table.createRow({'id': 'pk1', 'name': 'DummyName'});
  rowOld.assignRowId(1);
  var rowNew = table.createRow({'id': 'pk1', 'name': 'OtherDummyName'});
  rowNew.assignRowId(1);
  original.modify([rowOld, rowNew]);

  assertEquals(0, original.getAdded().size);
  assertEquals(1, original.getModified().size);
  assertEquals(0, original.getDeleted().size);

  var reverse = original.getReverse();
  assertEquals(0, reverse.getAdded().size);
  assertEquals(1, reverse.getModified().size);
  assertEquals(0, reverse.getDeleted().size);

  assertSameElements(
      lf.structs.map.keys(original.getModified()),
      lf.structs.map.keys(reverse.getModified()));

  reverse.getModified().forEach(
      function(modification, rowId) {
        var originalModification = original.getModified().get(rowId, null);
        assertNotNull(originalModification);
        assertEquals(
            originalModification[0].payload()['name'],
            modification[1].payload()['name']);
      });
}
Testing reversing a diff with only modifications.