private string SerializePropertyWithOwningType(EdmModel model, IEdmStructuredType owningType, ODataProperty odataProperty)
        {
            MemoryStream outputStream = new MemoryStream();
            ODataAtomOutputContext atomOutputContext = this.CreateAtomOutputContext(model, outputStream);
            var serializer = new ODataAtomPropertyAndValueSerializer(atomOutputContext);

            serializer.WritePayloadStart();
            serializer.WriteProperties(
                owningType,
                new[] { odataProperty },
                /*isWritingCollection*/ false,
                null,
                null,
                new DuplicatePropertyNamesChecker(allowDuplicateProperties: true, isResponse: true),
                ProjectedPropertiesAnnotation.AllProjectedPropertiesInstance
                );
            serializer.WritePayloadEnd();

            atomOutputContext.Flush();
            outputStream.Position = 0;
            string result = new StreamReader(outputStream).ReadToEnd();

            return result;
        }