query builder tests