> + .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;
> + }
> +}
I think specifically for the mock tests, add a Fail test for each happy-path
test (where possible). Usually a 404 response will be a good test. In some
places testing forbidden is also relevant (I think). Thoughts?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/79/files#r9966446