[TASK] Add functional tests for QueryGeneratorTest