More thorough test of query builder