Add tests for Query.execute