function checkCalculationForRelation(
    inputRelation, aggregatedColumn, expectedValue, assertFn) {
  var childStep = new lf.proc.NoOpStep([inputRelation]);
  var aggregationStep = new lf.proc.AggregationStep([aggregatedColumn]);
  aggregationStep.addChild(childStep);

  return aggregationStep.exec().then(function(relations) {
    var relation = relations[0];
    if (expectedValue instanceof Array) {
      assertEquals(
          expectedValue.length,
          relation.getAggregationResult(aggregatedColumn).entries.length);
    } else {
      assertTrue(assertFn(
          expectedValue,
          relation.getAggregationResult(aggregatedColumn)));
    }
  });
}
@param {!lf.proc.Relation} inputRelation
@param {!lf.schema.Column} aggregatedColumn The column to be calculated.
@param {?number|!Array|Date} expectedValue The expected value for the
    aggregated column.
@param {!Function} assertFn
@return {!IThenable}