// TODO: Rename this converter; it converts from higher-level test annotations to the serializable
        //               annotations in CSDL.

        /// <summary>
        /// Performs the conversion.
        /// </summary>
        /// <param name="model">Model to perform conversion on.</param>
        /// <returns>A clone of the <paramref name="model"/> with the converted annotations.</returns>
        public EntityModelSchema ConvertToProductAnnotations(EntityModelSchema model)
        {
            // we have to clone the model here since we will modify it by adding the converted annotations;
            // we do this in all cases even if there are no annotations to convert; if this becomes a performance problem
            // we can change this going forward (to do the clone on-demand).
            model = model.Clone();

            // TODO: support for MimeTypeAnnotation on service operations and primitive properties
            foreach (var entityType in model.EntityTypes)
            {
                if (entityType.HasStream())
                {
                    var attribute = new XAttribute(ODataConstants.DataServicesMetadataNamespace.GetName(ODataConstants.HasStreamAttributeName), true);
                    AddAnnotationIfDoesntExist(entityType, new AttributeAnnotation(attribute));
                }
            }

            return model;
        }