func MustCreateMockStructuredMessage(t testing.TB, e event.Event) binding.Message {
	return &MockStructuredMessage{
		Bytes:  test.MustJSON(t, e),
		Format: format.JSON,
	}
}
MustCreateMockStructuredMessage creates a new MockStructuredMessage starting from an event.Event. Panics in case of error.
package test
import (
	"bytes"
	"context"
	"io"
	"io/ioutil"
	"testing"
	"github.com/cloudevents/sdk-go/v2/binding"
	"github.com/cloudevents/sdk-go/v2/binding/format"
	"github.com/cloudevents/sdk-go/v2/event"
	"github.com/cloudevents/sdk-go/v2/test"
)
type MockStructuredMessage struct {
	Format format.Format
	Bytes  []byte
}