func (a *APITest) Handler(handler http.Handler) *APITest {
	a.handler = handler
	return a
}
Handler defines the http handler that is invoked when the test is run
package apitest
import (
	"bytes"
	"encoding/json"
	"fmt"
	"hash/fnv"
	"io/ioutil"
	"net/http"
	"net/http/httptest"
	"net/http/httputil"
	"net/textproto"
	"net/url"
	"runtime/debug"
	"sort"
	"strings"
	"time"
)
const SystemUnderTestDefaultName = "sut"
const ConsumerDefaultName = "cli"
var divider = strings.Repeat("-", 10)
var requestDebugPrefix = fmt.Sprintf("%s>", divider)
var responseDebugPrefix = fmt.Sprintf("<%s", divider)
type APITest struct {
	debugEnabled             bool
	mockResponseDelayEnabled bool
	networkingEnabled        bool
	networkingHTTPClient     *http.Client
	reporter                 ReportFormatter
	verifier                 Verifier
	recorder                 *Recorder
	handler                  http.Handler
	name                     string
	request                  *Request
	response                 *Response
	observers                []Observe
	mocksObservers           []Observe
	recorderHook             RecorderHook
	mocks                    []*Mock
	t                        TestingT
	httpClient               *http.Client
	httpRequest              *http.Request
	transport                *Transport
	meta                     map[string]interface{}
	started                  time.Time
	finished                 time.Time
}
type InboundRequest struct {
	request   *http.Request
	timestamp time.Time
}
type FinalResponse struct {
	response  *http.Response
	timestamp time.Time
}
type Observe func(*http.Response, *http.Request, *APITest)
type RecorderHook func(*Recorder)
func New(name ...string) *APITest {
	apiTest := &APITest{
		meta: map[string]interface{}{},
	}
	request := &Request{
		apiTest:  apiTest,
		headers:  map[string][]string{},
		query:    map[string][]string{},
		formData: map[string][]string{},
	}
	response := &Response{
		apiTest: apiTest,
		headers: map[string][]string{},
	}
	apiTest.request = request
	apiTest.response = response
	if len(name) > 0 {
		apiTest.name = name[0]
	}
	return apiTest
}
func Handler(handler http.Handler) *APITest {
	return New().Handler(handler)
}
func HandlerFunc(handlerFunc http.HandlerFunc) *APITest {
	return New().HandlerFunc(handlerFunc)
}
func (a *APITest) EnableNetworking(cli ...*http.Client) *APITest {
	a.networkingEnabled = true
	if len(cli) == 1 {
		a.networkingHTTPClient = cli[0]
		return a
	}
	a.networkingHTTPClient = http.DefaultClient
	return a
}
func (a *APITest) EnableMockResponseDelay() *APITest {
	a.mockResponseDelayEnabled = true
	return a
}
func (a *APITest) Debug() *APITest {
	a.debugEnabled = true
	return a
}
func (a *APITest) Report(reporter ReportFormatter) *APITest {
	a.reporter = reporter
	return a
}
func (a *APITest) Recorder(recorder *Recorder) *APITest {
	a.recorder = recorder
	return a
}
func (a *APITest) Meta(meta map[string]interface{}) *APITest {
	a.meta = meta
	return a
}