func MustToEvent(t testing.TB, ctx context.Context, m binding.Message) event.Event {
	e, err := binding.ToEvent(ctx, m)
	require.NoError(t, err)
	return *e
}
MustToEvent converts a Message to event.Event
package test
import (
	"context"
	"encoding/json"
	"fmt"
	"reflect"
	"testing"
	"github.com/stretchr/testify/require"
	"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/types"
)
func WithoutExtensions(events []event.Event) []event.Event {
	result := make([]event.Event, len(events))
	for i, e := range events {
		result[i] = e
		result[i].Context = e.Context.Clone()
		ctx := reflect.ValueOf(result[i].Context).Elem()
		ext := ctx.FieldByName("Extensions")
		ext.Set(reflect.Zero(ext.Type()))
	}
	return result
}
func MustJSON(t testing.TB, e event.Event) []byte {
	b, err := format.JSON.Marshal(&e)
	require.NoError(t, err)
	return b
}