public async Task CanDeleteImageMetadata()
        {
            var metadata = new Dictionary<string, string>() { { "item1", "value1" }, { "item2", "value2" } };
            var created = DateTime.UtcNow.Subtract(TimeSpan.FromMinutes(10));
            var updated = DateTime.UtcNow.Subtract(TimeSpan.FromMinutes(1));
            var imageId = "12345";
            var image = new ComputeImage(imageId, "tiny",
               new Uri("http://testcomputeendpoint.com/v2/1234567890/images/12345"),
               new Uri("http://testcomputeendpoint.com/1234567890/images/12345"), metadata,
               "ACTIVE", created, updated, 10, 512, 100);
            this.simulator.Images.Add(image);

            var client = new ComputeServiceRestClient(GetValidContext(), this.ServiceLocator);

            var resp = await client.DeleteImageMetadata(imageId, "item1");

            Assert.AreEqual(HttpStatusCode.OK, resp.StatusCode);

            Assert.AreEqual(1, image.Metadata.Count);
            Assert.AreEqual("value2", image.Metadata["item2"]);
        }
        public async Task DeleteComputeImageMetadataIncludesAuthHeader()
        {
            var client =
                new ComputeServiceRestClient(GetValidContext(), this.ServiceLocator);

            await client.DeleteImageMetadata("12345", "item1");

            Assert.IsTrue(this.simulator.Headers.ContainsKey("X-Auth-Token"));
            Assert.AreEqual(this.authId, this.simulator.Headers["X-Auth-Token"]);
        }
        public async Task DeleteComputeImageMetadataFormsCorrectUrlAndMethod()
        {
            var imageId = "12345";
            var key = "item1";
            var client =
                new ComputeServiceRestClient(GetValidContext(), this.ServiceLocator);

            await client.DeleteImageMetadata(imageId, key);

            Assert.AreEqual(string.Format("{0}/images/{1}/metadata/{2}", endpoint, imageId, key), this.simulator.Uri.ToString());
            Assert.AreEqual(HttpMethod.Delete, this.simulator.Method);
        }