function checkIndexRangeScan(order, description) {
  var table = schema.table('tableA');
  var index = order == lf.Order.ASC ?
      table.getIndices()[0] : table.getIndices()[1];
  var keyRange = order == lf.Order.ASC ?
      new lf.index.SingleKeyRange(5, 8, false, false) :
      new lf.index.SingleKeyRange(
          'dummyName' + 5, 'dummyName' + 8, false, false);
  var step = new lf.proc.IndexRangeScanStep(
      lf.Global.get(), index,
      new lf.testing.proc.MockKeyRangeCalculator([keyRange]), false);

  return step.exec().then(
      function(relations) {
        var relation = relations[0];
        assertEquals(4, relation.entries.length);
        relation.entries.forEach(function(entry, j) {
          if (j == 0) {
            return;
          }

          // Row ID is equal to the payload's ID field for the data used in this
          // test.
          var comparator = order == lf.Order.ASC ? 1 : -1;
          assertTrue(comparator *
              (entry.row.id() - relation.entries[j - 1].row.id()) > 0);
        });
      });
}
Checks that an IndexRangeScanStep returns results in the expected order.
@param {!lf.Order} order The expected order.
@param {string} description A description of this test.
@return {!IThenable}