function simulatePersistedIndices(tableSchema, tableRows) {
  var tempIndexStore = new lf.index.MemoryIndexStore();
  return tempIndexStore.init(env.schema).then(function() {
    var indices = tempIndexStore.getTableIndices(tableSchema.getName());
    tableRows.forEach(function(row) {
      indices.forEach(function(index) {
        var key = /** @type {!lf.index.Index.Key} */ (
            row.keyOfIndex(index.getName()));
        index.add(key, row.id());
      });
    });

    var serializedIndices = indices.map(function(index) {
      return index.serialize();
    });
    var whenIndexTablesPopulated = indices.map(function(index, i) {
      var indexTable = env.store.getTableInternal(index.getName());
      return indexTable.put(serializedIndices[i]);
    });

    return goog.Promise.all(whenIndexTablesPopulated);
  });
}
Populates the backstore tables that correspond to indices for the given table
with dummy data. Used for testing prefetcher#init.
@param {!lf.schema.Table} tableSchema
@param {!Array<lf.Row>} tableRows
@return {!IThenable} A signal that index contents have been persisted in the
    backing store.