add couchdb rewrite test