server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json")).setResponseCode(200)));
server.enqueue(addCommonHeaders(enabledResponse().setResponseCode(200)));
server.enqueue(addCommonHeaders(updatedResponse().setResponseCode(404)));
try {
CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");
CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
assertCDNContainerNotNull(cdnContainer);
// update the CDN Container
assertFalse(api.cdnApiInRegion("DFW").update("container-1", enabled(false).logRetention(true).ttl(7654321)));
assertEquals(server.getRequestCount(), 3);
assertAuthentication(server);
assertRequest(server.takeRequest(), "HEAD", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/container-1");
assertRequest(server.takeRequest(), "POST", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/container-1");