re-factor testingRoundTripper so it can be used for different calls
re-factor testingRoundTripper so it can be used for different calls

Change-Id: I8dd18192fc93f38d2432dc09e3b2ec7a65cc476c
Reviewed-on: http://review.couchbase.org/62717
Tested-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>
Reviewed-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>

couchbase/cbauth,couchbase/cbauth