Add query criteria merge function
Correct test names