tests for QueryResult