ISPN-2768 - Write new tests for Query module