public void Init()
        {
            this._address = new Address { Street = "123 fake st" };
            this._entity = new Customer { Id = 1, Address = this._address, Emails = new List<string> { "*****@*****.**"} };

            var model = new ClientEdmModel(ODataProtocolVersion.V4);
            var entityType = model.GetOrCreateEdmType(typeof(Customer));
            var complexType = model.GetOrCreateEdmType(typeof(Address));

            this._complexValue = new ClientEdmStructuredValue(this._address, model, model.GetClientTypeAnnotation(complexType));
            this._entityValue = new ClientEdmStructuredValue(this._entity, model, model.GetClientTypeAnnotation(entityType));
        }
        public void OnEntryEndShouldBeFired()
        {
            ODataEntry entry = new ODataEntry();
            var customer = new Customer();
            var wrappedWriter = this.SetupTestActionExecuted((context, requestPipeline) =>
            {
                requestPipeline.OnEntryEnding((args) =>
                {
                    args.Entry.Id = new Uri("http://foo.org");
                    args.Entity.Should().BeSameAs(customer);
                });
            });

            wrappedWriter.WriteEnd(entry, customer);
            entry.Id.Should().Be(new Uri("http://foo.org"));
        }