public void SerializeTestModel_AssertAddMetadata()
        {
            var m = new TestModel
            {
                Receiver = new EdiPartnerIdentification
                {
                    EdiId = "KLMN01",
                },
                Sender = new EdiPartnerIdentification
                {
                    PartnerId = "4711"
                },
                TestReceivingPartner = new EdiPartnerIdentification
                {
                    EdiId = "KLMN01",
                    Name  = "Franz Kafka",
                    City  = "Kafka City"
                },
                TestShippingPartner = new EdiPartnerIdentification
                {
                    EdiId = "4712"
                }
            };

            // Add the metadata
            m.AddOrUpdateMetadata(new EdiMetadata
            {
                Receiver = new EdiMetadataEntity
                {
                    Party  = "MY-CONIZI-PARTY-ID",
                    Tenant = "MY-CONIZI-SENDER-TENANT"
                }
            });

            Assert.Equal("MY-CONIZI-PARTY-ID", m.Metadata.Receiver.Party);

            var result = Converter.Serialize(m, writeMetadata: true);

            Assert.False(result.HasValidationErrors);

            var metadata = m.GetMetadata();

            Assert.NotNull(metadata);

            Assert.Equal("MY-CONIZI-SENDER-TENANT", metadata.Receiver.Tenant);

            Assert.Contains("MY-CONIZI-SENDER-TENANT", result.Content);
            Assert.Contains("MY-CONIZI-PARTY-ID", result.Content);
            Assert.Contains("createdAt", result.Content);
            Assert.Contains("environment", result.Content);
        }