function testWhere_ThrowsAlreadyCalled() {
  var query = new lf.query.SelectBuilder(hr.db.getGlobal(), []);

  var buildQuery = function() {
    var employeeTable = db.getSchema().getEmployee();
    var predicate = employeeTable.id.eq('testId');
    query.from(employeeTable).
        where(predicate).
        where(predicate);
  };

  // 516: where() has already been called.
  lf.testing.util.assertThrowsError(516, buildQuery);
}
Tests that Select#where() fails if where() has already been called.