test method for loading an existing query moved, duplication removed