fix #1000 - Fix query generator tests