code: func (b *MockDiscoverEndpointResponse) Build() fabdiscovery.Response {
  	var peers discclient.Endorsers
  	for _, endpoint := range b.PeerEndpoints {
  		peer := &discclient.Peer{
  			MSPID:            endpoint.MSPID,
  			AliveMessage:     newAliveMessage(endpoint),
  			StateInfoMessage: newStateInfoMessage(endpoint),
  		}
  		peers = append(peers, peer)
  	}
  	return &mockDiscoverResponse{
  		Response: &response{
  			peers: peers,
  			err:   b.Error,
  		},
  		target: b.Target,
  	}
  }
docs: // Build builds a mock discovery response