func (mt *MockTransactor) OnRoundTrip(matchers ...func(*http.Request) bool) *TransactCall {
	call := mt.On("RoundTrip", mock.MatchedBy(func(candidate *http.Request) bool {
		for _, matcher := range matchers {
			if !matcher(candidate) {
				return false
			}
		}
		return true
	}))
	return &TransactCall{call}
}
OnRoundTrip sets an On("Do", ...) with the given matchers for a request.  The returned Call has some
augmented behavior for setting responses.
package xhttptest
import (
	"bytes"
	"context"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/textproto"
	"net/url"
	"strings"
	"github.com/stretchr/testify/mock"
)
type ExpectedResponse struct {
	StatusCode int
	Body       []byte
	Header     http.Header
	Err        error
}
type TransactCall struct {
	*mock.Call
}
func (dc *TransactCall) RespondWith(er ExpectedResponse) *TransactCall {
	var response *http.Response
	if er.Err == nil {
		response = NewResponse(er.StatusCode, er.Body)
		for key, values := range er.Header {
			response.Header[key] = values
		}
	}
	return dc.Respond(response, er.Err)
}
func (dc *TransactCall) Respond(response *http.Response, err error) *TransactCall {
	dc.Return(response, err)
	return dc
}
type MockTransactor struct {
	mock.Mock
}
func (mt *MockTransactor) Do(request *http.Request) (*http.Response, error) {
	arguments := mt.Called(request.WithContext(context.Background()))
	response, _ := arguments.Get(0).(*http.Response)
	return response, arguments.Error(1)
}
func (mt *MockTransactor) RoundTrip(request *http.Request) (*http.Response, error) {
	arguments := mt.Called(request.WithContext(context.Background()))
	response, _ := arguments.Get(0).(*http.Response)
	return response, arguments.Error(1)
}
func (mt *MockTransactor) OnDo(matchers ...func(*http.Request) bool) *TransactCall {
	call := mt.On("Do", mock.MatchedBy(func(candidate *http.Request) bool {
		for _, matcher := range matchers {
			if !matcher(candidate) {
				return false
			}
		}
		return true
	}))
	return &TransactCall{call}
}