- Use `anypb.New()` instead of `ptypes.MarshalAny` - Accept a `testing.T` and mark this as a test helper with `t.Helper()` and call `t.Fatalf()` instead of `panic`