public async Task EventDataTEndToEndWithBeef()
        {
            var eds = new NewtonsoftJsonCloudEventSerializer {
                IncludeEventMetadataProperties = null
            };
            var bytes = await eds.SerializeAsync(new EventData <Person>(NewtonsoftJsonEventDataSerializerTest.CreateEventMetadata()) { Value = Person.Create() });

            Assert.Greater(bytes.Length, 0);

            var json = Encoding.UTF8.GetString(bytes);

            Assert.AreEqual(@"{""specversion"":""1.0"",""type"":""Test.Subject.Created"",""source"":""/test"",""id"":""00000001-0000-0000-0000-000000000000"",""time"":""2001-01-15T12:48:16Z"",""tenantid"":""00000002-0000-0000-0000-000000000000"",""subject"":""Test.Subject"",""action"":""Created"",""key"":""1"",""username"":""Bob"",""userid"":""123"",""correlationid"":""XXX"",""etag"":""YYY"",""partitionkey"":""PK"",""datacontenttype"":""application/json"",""data"":{""first"":""Rebecca"",""last"":""Brown""}}", json);

            var ed = await eds.DeserializeAsync(typeof(Person), bytes);

            NewtonsoftJsonEventDataSerializerTest.AssertEventMetadata(ed, keyIsAString: true);
            Assert.NotNull(ed.GetValue());

            var p = ((EventData <Person>)ed).Value;

            Assert.NotNull(p);
            Assert.AreEqual("Rebecca", p.FirstName);
            Assert.AreEqual("Brown", p.LastName);
            Assert.Null(p.Private);
        }
        public async Task EventDataEndToEndWithBeef()
        {
            var eds = new NewtonsoftJsonCloudEventSerializer {
                IncludeEventMetadataProperties = null
            };
            var bytes = await eds.SerializeAsync(new EventData(NewtonsoftJsonEventDataSerializerTest.CreateEventMetadata()));

            Assert.Greater(bytes.Length, 0);

            var json = Encoding.UTF8.GetString(bytes);

            Assert.AreEqual(@"{""specversion"":""1.0"",""type"":""Test.Subject.Created"",""source"":""/test"",""id"":""00000001-0000-0000-0000-000000000000"",""time"":""2001-01-15T12:48:16Z"",""tenantid"":""00000002-0000-0000-0000-000000000000"",""subject"":""Test.Subject"",""action"":""Created"",""key"":""1"",""username"":""Bob"",""userid"":""123"",""correlationid"":""XXX"",""etag"":""YYY"",""partitionkey"":""PK""}", json);

            var ed = await eds.DeserializeAsync(bytes);

            NewtonsoftJsonEventDataSerializerTest.AssertEventMetadata(ed, keyIsAString: true);
        }