Fixing QueryBuilder unit-tests