Consolidation of testing of query string