new ParseImageDetailsTest().expected());
}
@Test(expectedExceptions = AuthorizationException.class)
public void testCreateWhenResponseIs4xx() throws Exception {
HttpRequest get = HttpRequest.builder().method("POST")
.endpoint("https://glance.jclouds.org:9292/v1.0/images")
.addHeader("x-image-meta-name", "test")
.addHeader("Accept", MediaType.APPLICATION_JSON)
.addHeader("X-Auth-Token", authToken)
.payload(payloadFromStringWithContentType("somedata", MediaType.APPLICATION_OCTET_STREAM)).build();