assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, "whoops", "application/unknown", true);
}
public void testPutInputStreamPayload() throws SecurityException, NoSuchMethodException, IOException {
Payload payload = newInputStreamPayload(Strings2.toInputStream("whoops"));
payload.getContentMetadata().setContentLength((long) "whoops".length());
Invokable<?, ?> method = method(TestTransformers.class, "put", Payload.class);
GeneratedHttpRequest request = processor.apply(Invocation.create(method,
ImmutableList.<Object> of(payload)));
assertRequestLineEquals(request, "PUT http://localhost:9999 HTTP/1.1");
assertNonPayloadHeadersEqual(request, "");