Move assertQuerySetEqual to the base test case