func (m *MockDCASClient) Get(cid string, w io.Writer) error {
	if m.errGet != nil {
		return m.errGet
	}
	if m.panicMessage != "" {
		panic(m.panicMessage)
	}
	value, ok := m.data[cid]
	if !ok {
		return nil
	}
	_, err := w.Write(value)
	return err
}
Get retrieves the value for the given content ID.
package mocks
import (
	"io"
	"io/ioutil"
	"github.com/ipfs/go-cid"
	mh "github.com/multiformats/go-multihash"
	"github.com/trustbloc/fabric-peer-ext/pkg/collections/offledger/dcas"
	dcasclient "github.com/trustbloc/fabric-peer-ext/pkg/collections/offledger/dcas/client"
)
type MockDCASClient struct {
	data               map[string][]byte
	nodes              map[string]*dcasclient.Node
	errPut             error
	errGet, errGetNode error
	panicMessage       string
}
func NewDCASClient() *MockDCASClient {
	return &MockDCASClient{
		data:  make(map[string][]byte),
		nodes: make(map[string]*dcasclient.Node),
	}
}
func (m *MockDCASClient) WithData(key string, value []byte) *MockDCASClient {
	m.data[key] = value
	return m
}
func (m *MockDCASClient) WithNode(key string, node *dcasclient.Node) *MockDCASClient {
	m.nodes[key] = node
	return m
}
func (m *MockDCASClient) WithPutError(err error) *MockDCASClient {
	m.errPut = err
	return m
}
func (m *MockDCASClient) WithGetError(err error) *MockDCASClient {
	m.errGet = err
	return m
}
func (m *MockDCASClient) WithGetNodeError(err error) *MockDCASClient {
	m.errGetNode = err
	return m
}
func (m *MockDCASClient) WithPanic(msg string) *MockDCASClient {
	m.panicMessage = msg
	return m
}
func (m *MockDCASClient) Put(data io.Reader, opts ...dcasclient.Option) (string, error) {
	if m.errPut != nil {
		return "", m.errPut
	}
	if m.panicMessage != "" {
		panic(m.panicMessage)
	}
	value, err := ioutil.ReadAll(data)
	if err != nil {
		return "", err
	}
	cID, err := dcas.GetCID(value, dcas.CIDV1, cid.Raw, mh.SHA2_256)
	if err != nil {
		return "", err
	}
	m.data[cID] = value
	return cID, nil
}
func (m *MockDCASClient) Delete(...string) error {
	panic("not implemented")
}