// NewMock creates an instance of Mock, you can optionally pass ConnectOpts to
// the function, if passed any mocked query will be generated using those
// options.
160067
func NewMock(opts ...ConnectOpts) *Mock {
	m := &Mock{
		ExpectedQueries: make([]*MockQuery, 0),
		Queries:         make([]MockQuery, 0),
	}

	if len(opts) > 0 {
		m.opts = opts[0]
	}

	return m
}
690524
func NewMockConnectionFlowController(ctrl *gomock.Controller) *MockConnectionFlowController {
	mock := &MockConnectionFlowController{ctrl: ctrl}
	mock.recorder = &MockConnectionFlowControllerMockRecorder{mock}
	return mock
}
433355
func NewMockScope(ctrl *gomock.Controller) *MockScope {
	mock := &MockScope{ctrl: ctrl}
	mock.recorder = &MockScopeMockRecorder{mock}
	return mock
}
754929
func NewMockAddr(ctrl *gomock.Controller) *MockAddr {
	mock := &MockAddr{ctrl: ctrl}
	mock.recorder = &MockAddrMockRecorder{mock}
	return mock
}
91081
func NewMockPeer(name, url string, blockHeight uint64) *MockPeer {
	return &MockPeer{
		MockPeer:    fabmocks.NewMockPeer(name, url),
		blockHeight: blockHeight,
	}
}
1344897
func NewMockPinner(ctrl *gomock.Controller) *MockPinner {
	mock := &MockPinner{ctrl: ctrl}
	mock.recorder = &MockPinnerMockRecorder{mock}
	return mock
}
579744
func NewMockFeed(ctrl *gomock.Controller) *MockFeed {
	mock := &MockFeed{ctrl: ctrl}
	mock.recorder = &MockFeedMockRecorder{mock}
	return mock
}
176710
func NewMockBackoff() *MockBackoff {
	return &MockBackoff{
		CloneFunc: &BackoffCloneFunc{
			defaultHook: func() backoff.Backoff {
				return nil
			},
		},
		NextIntervalFunc: &BackoffNextIntervalFunc{
			defaultHook: func() time.Duration {
				return 0
			},
		},
		ResetFunc: &BackoffResetFunc{
			defaultHook: func() {
				return
			},
		},
	}
}
817694
func NewMockInstance(ctrl *gomock.Controller) *MockInstance {
	mock := &MockInstance{ctrl: ctrl}
	mock.recorder = &MockInstanceMockRecorder{mock}
	return mock
}
143426
func NewMockAPICaller(ctrl *gomock.Controller) *MockAPICaller {
	mock := &MockAPICaller{ctrl: ctrl}
	mock.recorder = &MockAPICallerMockRecorder{mock}
	return mock
}
828747
func NewMockBrokerListener(t TestReporter, brokerID int32, listener net.Listener) *MockBroker {
	var err error

	broker := &MockBroker{
		closing:      make(chan none),
		stopper:      make(chan none),
		t:            t,
		brokerID:     brokerID,
		expectations: make(chan encoder, 512),
		listener:     listener,
	}
	broker.handler = broker.defaultRequestHandler

	Logger.Printf("*** mockbroker/%d listening on %s\n", brokerID, broker.listener.Addr().String())
	_, portStr, err := net.SplitHostPort(broker.listener.Addr().String())
	if err != nil {
		t.Fatal(err)
	}
	tmp, err := strconv.ParseInt(portStr, 10, 32)
	if err != nil {
		t.Fatal(err)
	}
	broker.port = int32(tmp)

	go broker.serverLoop()

	return broker
}
1124572
func NewMockUi() *MockUi {
	m := new(MockUi)
	m.once.Do(m.init)
	return m
}
1340034
func NewMockLock(ctrl *gomock.Controller) *MockLock {
	mock := &MockLock{ctrl: ctrl}
	mock.recorder = &MockLockMockRecorder{mock}
	return mock
}
956919
func NewMockPeer(name string, url string) *MockPeer {
	mp := &MockPeer{MockName: name, MockMSP: "Org1MSP", MockURL: url, Status: 200, RWLock: &sync.RWMutex{}}
	return mp
}
698048
func NewMockEventInterface(ctrl *gomock.Controller) *MockEventInterface {
	mock := &MockEventInterface{ctrl: ctrl}
	mock.recorder = &MockEventInterfaceMockRecorder{mock}
	return mock
}
749182
func NewMockLocker(ctrl *gomock.Controller) *MockLocker {
	mock := &MockLocker{ctrl: ctrl}
	mock.recorder = &MockLockerMockRecorder{mock}
	return mock
}
1220282
func NewMockServer() MockServer {
	ms := MockServer{}

	// Add all our handlers
	r := chi.NewRouter()

	r.Route("/v3", func(r chi.Router) {
		ms.addIPRoutes(r)
		ms.addExportRoutes(r)
		ms.addDomainRoutes(r)
		ms.addMailingListRoutes(r)
		ms.addEventRoutes(r)
		ms.addMessagesRoutes(r)
		ms.addValidationRoutes(r)
		ms.addRoutes(r)
	})

	// Start the server
	ms.srv = httptest.NewServer(r)
	return ms
}