Commit 776933a1 authored by Andy Wilkinson's avatar Andy Wilkinson

Adapt to MockClientHttpResponse no longer accepting a null body

parent b5f07013
...@@ -118,8 +118,8 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory { ...@@ -118,8 +118,8 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
} }
public ClientHttpResponse asHttpResponse(AtomicLong seq) { public ClientHttpResponse asHttpResponse(AtomicLong seq) {
MockClientHttpResponse httpResponse = new MockClientHttpResponse(this.payload, MockClientHttpResponse httpResponse = new MockClientHttpResponse(
this.status); this.payload == null ? new byte[0] : this.payload, this.status);
waitForDelay(); waitForDelay();
if (this.payload != null) { if (this.payload != null) {
httpResponse.getHeaders().setContentLength(this.payload.length); httpResponse.getHeaders().setContentLength(this.payload.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment