func init() {
	extension.SetFilter(mockFilterKey, newFilter)
}
The initialization of mockEchoFilter, for test
package protocolwrapper
import (
	"context"
	"net/url"
	"testing"
)
import (
	"github.com/stretchr/testify/assert"
)
import (
	"dubbo.apache.org/dubbo-go/v3/common"
	"dubbo.apache.org/dubbo-go/v3/common/constant"
	"dubbo.apache.org/dubbo-go/v3/common/extension"
	"dubbo.apache.org/dubbo-go/v3/common/logger"
	"dubbo.apache.org/dubbo-go/v3/filter"
	"dubbo.apache.org/dubbo-go/v3/protocol"
)
const mockFilterKey = "mockEcho"
func TestProtocolFilterWrapperExport(t *testing.T) {
	filtProto := extension.GetProtocol(FILTER)
	filtProto.(*ProtocolFilterWrapper).protocol = &protocol.BaseProtocol{}
	u := common.NewURLWithOptions(
		common.WithParams(url.Values{}),
		common.WithParamsValue(constant.SERVICE_FILTER_KEY, mockFilterKey))
	exporter := filtProto.Export(protocol.NewBaseInvoker(u))
	_, ok := exporter.GetInvoker().(*FilterInvoker)
	assert.True(t, ok)
}
func TestProtocolFilterWrapperRefer(t *testing.T) {
	filtProto := extension.GetProtocol(FILTER)
	filtProto.(*ProtocolFilterWrapper).protocol = &protocol.BaseProtocol{}
	u := common.NewURLWithOptions(
		common.WithParams(url.Values{}),
		common.WithParamsValue(constant.REFERENCE_FILTER_KEY, mockFilterKey))
	invoker := filtProto.Refer(u)
	_, ok := invoker.(*FilterInvoker)
	assert.True(t, ok)
}