function checkFlatten(expected, rows, fields) {
  var actual = rows.map(function(obj) {
    assertEquals(fields.length, Object.keys(obj).length);
    return fields.map(function(name) {
      return obj[name].toString();
    }).join(' ');
  }).join(' ');
  assertEquals(expected, actual);
}
@param {string} expected
@param {!Array<!Object>} rows
@param {!Array<string>} fields