Add query testcases for filtering and stuff.