func (m *MockMessageSvc) Accept(msgType string, purpose []string) bool {
	if m.AcceptFunc != nil {
		return m.AcceptFunc(msgType, purpose)
	}
	return true
}
Accept msg checks the msg type.
package generic
import (
	"github.com/google/uuid"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/common/service"
)
func NewCustomMockMessageSvc(typeVal, name string) *MockMessageSvc {
	return &MockMessageSvc{
		HandleFunc: func(*service.DIDCommMsg) (string, error) {
			return "", nil
		},
		AcceptFunc: func(msgType string, purpose []string) bool {
			return typeVal == msgType
		},
		NameVal: name,
	}
}
type MockMessageSvc struct {
	HandleFunc func(*service.DIDCommMsg) (string, error)
	AcceptFunc func(msgType string, purpose []string) bool
	NameVal    string
}
func (m *MockMessageSvc) HandleInbound(msg service.DIDCommMsg, ctx service.DIDCommContext) (string, error) {
	if m.HandleFunc != nil {
		return m.HandleFunc(&msg)
	}
	return uuid.New().String(), nil
}