> + .addHeader("ETag", "8a964ee2a5e88be344f36c22562a6486")
> + // TODO: MWS doesn't allow you to return content length w/o
> content
> + // on HEAD!
> + .setBody("ABCD".getBytes(US_ASCII))
> + .addHeader("Content-Length", "4").addHeader("Content-Type",
> "text/plain; charset=UTF-8");
> + }
> +
> + private static final byte[] NO_CONTENT = new byte[] {};
> +
> + private static Payload payload(long bytes, String contentType) {
> + Payload payload = Payloads.newByteArrayPayload(NO_CONTENT);
> + payload.getContentMetadata().setContentLength(bytes);
> + payload.getContentMetadata().setContentType(contentType);
> + return payload;
> + }
> +}
Agree. A mock test for a failed response should be added for each API method
that configures a `@Fallback`, to properly test the API is handling errors as
expected.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/79/files#r10013565