Adding more tests for query restrictions.