Added a QueryFieldsProvider and a test.