Query subclassing test cleanup