Fixed query builder tests