function testUpdate_NoPrimaryKeyViolation() {
  var table = env.schema.table('tableA');
  var pkIndexSchema = table.getConstraint().getPrimaryKey();
  var pkIndex = env.indexStore.get(pkIndexSchema.getNormalizedName());
  var rowIdIndex = env.indexStore.get(table.getRowIdIndexName());

  var row = table.createRow({'id': 'pk1', 'name': 'DummyName'});
  var journal = createJournal([table]);
  journal.insert(table, [row]);
  journal.commit();
  assertEquals(1, env.cache.getCount());
  assertTrue(pkIndex.containsKey(row.payload()['id']));
  assertTrue(rowIdIndex.containsKey(row.id()));

  // Attempting to update a column that is not the primary key.
  var rowUpdated1 = table.createRow({
    'id': row.payload()['id'],
    'name': 'OtherDummyName'
  });
  rowUpdated1.assignRowId(row.id());

  journal = createJournal([table]);
  journal.update(table, [rowUpdated1]);
  journal.commit();

  // Attempting to update the primary key column.
  var rowUpdated2 = table.createRow({
    'id': 'otherPk',
    'name': 'OtherDummyName'
  });
  rowUpdated2.assignRowId(row.id());
  journal = createJournal([table]);
  journal.update(table, [rowUpdated2]);
  journal.commit();

  assertFalse(pkIndex.containsKey(row.payload()['id']));
  assertTrue(pkIndex.containsKey(rowUpdated2.payload()['id']));
}
Tests that update() succeeds if there is no primary/unique key violation.