code: func NewMockConnection(opts ...Opt) *MockConnection {
  	copts := &Opts{}
  	for _, opt := range opts {
  		opt(copts)
  	}
  
  	operations := copts.Operations
  	if operations == nil {
  		operations = make(map[Operation]ResultDesc)
  	}
  
  	if copts.Ledger == nil {
  		panic("ledger is nil")
  	}
  
  	sourceURL := copts.SourceURL
  	if sourceURL == "" {
  		sourceURL = "localhost:9051"
  	}
  
  	producer := servicemocks.NewMockProducer(copts.Ledger)
  
  	c := &MockConnection{
  		producer:   producer,
  		producerch: producer.Register(),
  		rcvch:      make(chan interface{}),
  		operations: operations,
  		sourceURL:  sourceURL,
  	}
  	return c
  }
docs: // NewMockConnection returns a new MockConnection using the given options