func (m *MockOffLedgerClient) WithPutErrorForKey(ns, coll, key string, err error) *MockOffLedgerClient {
	m.putErrs[getKey(ns, coll, key)] = err
	return m
}
WithPutErrorForKey injects an error when a call is made to put a value for the given namespace, collection, and key
package mocks
import (
	"sync"
	"github.com/hyperledger/fabric-protos-go/ledger/queryresult"
	commonledger "github.com/hyperledger/fabric/common/ledger"
	"github.com/trustbloc/fabric-peer-ext/pkg/collections/client"
)
const (
	defaultQueryResultsKey = ""
)
type MockOffLedgerClient struct {
	sync.RWMutex
	m       map[string]map[string][]byte
	qr      map[string][]*queryresult.KV
	PutErr  error
	GetErr  error
	putErrs map[string]error
	getErrs map[string]error
}
func NewMockOffLedgerClient() *MockOffLedgerClient {
	return &MockOffLedgerClient{
		m:       make(map[string]map[string][]byte),
		qr:      make(map[string][]*queryresult.KV),
		putErrs: make(map[string]error),
		getErrs: make(map[string]error),
	}
}
func (m *MockOffLedgerClient) WithPutError(err error) *MockOffLedgerClient {
	m.PutErr = err
	return m
}
func (m *MockOffLedgerClient) WithGetError(err error) *MockOffLedgerClient {
	m.GetErr = err
	return m
}