[#62889914] Move query test to core

I should have done this when I did https://github.com/alphagov/vcloud-tools/pull/102 but I overlooked it.