Added query tests.