func NewMock(
	ctx context.Context,
	callOptions CallOptions,
	errorOnCreate []error,
	ldsReceiveChan chan *v2.DiscoveryResponse,
	rdsReceiveChan chan *v2.DiscoveryResponse,
	edsReceiveChan chan *v2.DiscoveryResponse,
	cdsReceiveChan chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error,
	scope tally.Scope) Client {
	return NewMockClient(
		ctx,
		createMockLdsClient(errorOnCreate, ldsReceiveChan, sendCb),
		createMockRdsClient(errorOnCreate, rdsReceiveChan, sendCb),
		createMockEdsClient(errorOnCreate, edsReceiveChan, sendCb),
		createMockCdsClient(errorOnCreate, cdsReceiveChan, sendCb),
		callOptions,
		scope,
	)
}
NewMock creates a mock client implementation for testing
package upstream
import (
	"context"
	"github.com/uber-go/tally"
	v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
	clusterservice "github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3"
	discoveryv3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
	endpointservice "github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3"
	listenerservice "github.com/envoyproxy/go-control-plane/envoy/service/listener/v3"
	routeservice "github.com/envoyproxy/go-control-plane/envoy/service/route/v3"
	"github.com/envoyproxy/xds-relay/internal/pkg/log"
)
func NewMockClient(
	ctx context.Context,
	ldsClient v2.ListenerDiscoveryServiceClient,
	rdsClient v2.RouteDiscoveryServiceClient,
	edsClient v2.EndpointDiscoveryServiceClient,
	cdsClient v2.ClusterDiscoveryServiceClient,
	callOptions CallOptions,
	scope tally.Scope) Client {
	return &client{
		ldsClient:   ldsClient,
		rdsClient:   rdsClient,
		edsClient:   edsClient,
		cdsClient:   cdsClient,
		callOptions: callOptions,
		logger:      log.MockLogger,
		scope:       scope,
		shutdown:    make(<-chan struct{}),
	}
}
func NewMockClientV3(
	ctx context.Context,
	ldsClient listenerservice.ListenerDiscoveryServiceClient,
	rdsClient routeservice.RouteDiscoveryServiceClient,
	edsClient endpointservice.EndpointDiscoveryServiceClient,
	cdsClient clusterservice.ClusterDiscoveryServiceClient,
	callOptions CallOptions,
	scope tally.Scope) Client {
	return &client{
		ldsClientV3: ldsClient,
		rdsClientV3: rdsClient,
		edsClientV3: edsClient,
		cdsClientV3: cdsClient,
		callOptions: callOptions,
		logger:      log.MockLogger,
		scope:       scope,
		shutdown:    make(<-chan struct{}),
	}
}
func NewMockClientEDS(
	ctx context.Context,
	edsClientV3 endpointservice.EndpointDiscoveryServiceClient,
	edsClientV2 v2.EndpointDiscoveryServiceClient,
	callOptions CallOptions,
	scope tally.Scope) Client {
	return &client{
		edsClient:   edsClientV2,
		edsClientV3: edsClientV3,
		callOptions: callOptions,
		logger:      log.MockLogger,
		scope:       scope,
		shutdown:    make(<-chan struct{}),
	}
}