/// <inheritdoc/>
        public async Task <StorageManifest> CreateStorageManifest(string containerName, string manifestName, IDictionary <string, string> metadata, IEnumerable <StorageObject> objects)
        {
            containerName.AssertIsNotNullOrEmpty("containerName", "Cannot create a storage manifest with a container name that is null or empty.");
            manifestName.AssertIsNotNullOrEmpty("manifestNamee", "Cannot create a storage manifest with a name that is null or empty.");
            metadata.AssertIsNotNull("metadata", "Cannot create a storage manifest with null metadata.");

            var client = this.GetPocoClient();

            var manifest = new StaticLargeObjectManifest(containerName, manifestName, metadata, objects.ToList());

            return(await client.CreateStorageManifest(manifest));
        }
        /// <inheritdoc/>
        public async Task<StorageManifest> CreateStorageManifest(string containerName, string manifestName, IDictionary<string, string> metadata, IEnumerable<StorageObject> objects)
        {
            containerName.AssertIsNotNullOrEmpty("containerName", "Cannot create a storage manifest with a container name that is null or empty.");
            manifestName.AssertIsNotNullOrEmpty("manifestNamee", "Cannot create a storage manifest with a name that is null or empty.");
            metadata.AssertIsNotNull("metadata","Cannot create a storage manifest with null metadata.");

            var client = this.GetPocoClient();

            var manifest = new StaticLargeObjectManifest(containerName, manifestName, metadata, objects.ToList());

            return await client.CreateStorageManifest(manifest);
        }
        public async Task CanCreateStaticManifestWithCreatedResponse()
        {
            var containerName = "TestContainer";
            var manifestName = "a/b/c/manifest";

            var headers = new HttpHeadersAbstraction()
            {
                {"Content-Length", "1234"},
                {"Content-Type", "application/octet-stream"},
                {"Last-Modified", "Wed, 12 Mar 2014 23:42:23 GMT"},
                {"ETag", "d41d8cd98f00b204e9800998ecf8427e"}
            };

            var headers2 = new HttpHeadersAbstraction()
            {
                {"Content-Length", "1234"},
                {"Content-Type", "application/octet-stream"},
                {"Last-Modified", "Wed, 12 Mar 2014 23:42:23 GMT"},
                {"ETag", "d41d8cd98f00b204e9800998ecf8427e"},
                {"X-Static-Large-Object","True"}
            };

            var payload = @"[
                                {
                                    ""hash"": ""d41d8cd98f00b204e9800998ecf8427e"",
                                    ""last_modified"": ""2014-03-07T21:31:31.588170"",
                                    ""bytes"": 0,
                                    ""name"": ""a/b/c/BLAH"",
                                    ""content_type"": ""application/octet-stream""
                                }]";

            var content = TestHelper.CreateStream(payload);

            var restResp1 = new HttpResponseAbstraction(new MemoryStream(), headers, HttpStatusCode.Created);
            var restResp2 = new HttpResponseAbstraction(content, headers2, HttpStatusCode.OK);
            this.StorageServiceRestClient.Responses.Enqueue(restResp1);
            this.StorageServiceRestClient.Responses.Enqueue(restResp2);

            var client = new StorageServicePocoClientFactory().Create(GetValidContext(), this.ServiceLocator) as StorageServicePocoClient;

            var manifest = new StaticLargeObjectManifest(containerName, manifestName,
                new List<StorageObject>()
                {
                    new StorageObject("a/b/c/BLAH", containerName, new Dictionary<string, string>())
                });

            var result = await client.CreateStorageManifest(manifest);

            Assert.IsTrue(this.StorageServiceRestClient.CreateStaticManifestCalled);
            Assert.IsInstanceOfType(result, typeof(StaticLargeObjectManifest));
            Assert.AreEqual(manifestName, result.FullName);
            Assert.AreEqual(containerName, result.ContainerName);
            Assert.AreEqual(1, ((StaticLargeObjectManifest)result).Objects.Count);
            Assert.AreEqual("a/b/c/BLAH", ((StaticLargeObjectManifest)result).Objects.First().FullName);
        }