Query rewriter tests complete