QueryBuilder tests edited