added more integration specs for newQuery
forgot to add code..