added a test for the dispose() method in the Query class