func newTestInjectorOneOK() *testInjectorOneOK {
	return &testInjectorOneOK{}
}
newTestInjectorOneOK creates a new testInjectorOneOK.
package fault
import (
	"errors"
	"fmt"
	"net/http"
	"net/http/httptest"
	"testing"
)
const (
	testHandlerCode = http.StatusAccepted
	testHandlerBody = "Accepted"
	testHeaderKey   = "testing header key"
	testHeaderVal   = "testing header val"
)
func testRequest(t *testing.T, f *Fault) *httptest.ResponseRecorder {
	t.Helper()
	var testHandler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
		http.Error(w, testHandlerBody, testHandlerCode)
	})
	req := httptest.NewRequest("GET", "/", nil)
	req.Header.Add(testHeaderKey, testHeaderVal)
	rr := httptest.NewRecorder()
	if f != nil {
		finalHandler := f.Handler(testHandler)
		finalHandler.ServeHTTP(rr, req)
	} else {
		testHandler.ServeHTTP(rr, req)
	}
	return rr
}
func testRequestExpectPanic(t *testing.T, f *Fault) *httptest.ResponseRecorder {
	t.Helper()
	defer func() {
		if r := recover(); r != nil {
			if !errors.Is(r.(error), http.ErrAbortHandler) {
				t.Fatal(r)
			}
		}
	}()
	rr := testRequest(t, f)
	return rr
}
type testInjectorNoop struct{}
func newTestInjectorNoop() *testInjectorNoop {
	return &testInjectorNoop{}
}
func (i *testInjectorNoop) Handler(next http.Handler) http.Handler { return next }
type testInjectorStop struct{}
func newTestInjectorStop() *testInjectorStop {
	return &testInjectorStop{}
}
func (i *testInjectorStop) Handler(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
}
type testInjector500s struct{}
func newTestInjector500s() *testInjector500s {
	return &testInjector500s{}
}
func (i *testInjector500s) Handler(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
	})
}
type testInjectorOneOK struct{}