QueryExpression test improved