Added query tests