function testAddObserver() {
  var promiseResolver = goog.Promise.withResolver();

  var table = schema.tables()[0];
  var builder = new lf.query.SelectBuilder(lf.Global.get(), []);
  builder.from(table);

  var callback = function(changes) {
    promiseResolver.resolve();
  };

  registry.addObserver(builder, callback);
  var row1 = table.createRow({ 'id': 'dummyId1', 'value': 'dummyValue1'});
  var row2 = table.createRow({ 'id': 'dummyId2', 'value': 'dummyValue2'});

  var firstResults = lf.proc.Relation.fromRows([row1], [table.getName()]);
  assertTrue(registry.updateResultsForQuery(builder.getQuery(), firstResults));

  var secondResults = lf.proc.Relation.fromRows(
      [row1, row2], [table.getName()]);
  assertTrue(registry.updateResultsForQuery(builder.getQuery(), secondResults));
  return promiseResolver.promise;
}
Tests that addObserver() works as expected by checking that observers are
notified when the observable results are modified.
@return {!IThenable}