ISPN-3442 fix and tests added for Query API DSL