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

  var rows = [];
  for (var i = 0; i < 3; i++) {
    rows.push(table.createRow(
        {'id': 'pk' + i.toString(), 'name': 'DummyName'}));
  }
  for (var j = 0; j < 3; j++) {
    rows.push(table.createRow({'id': 'samePk', 'name': 'DummyName'}));
  }

  var journal = createJournal([table]);
  lf.testing.util.assertThrowsError(
      201,  // Duplicate keys are not allowed.
      journal.insert.bind(journal, table, rows));
  journal.rollback();

  assertEquals(0, env.cache.getCount());
  var rowIdIndex = env.indexStore.get(table.getRowIdIndexName());
  assertEquals(0, pkIndex.getRange().length);
  assertEquals(0, rowIdIndex.getRange().length);
}
Tests the case where some of the rows being inserted, have the same primary
key. An exception should be thrown even though the primary key does not
already exist prior this insertion.