Adapt to MockClientHttpResponse no longer accepting a null body

This commit is contained in:
Andy Wilkinson 2017-06-08 14:11:37 +01:00
parent b5f0701356
commit 776933a1be
1 changed files with 2 additions and 2 deletions

View File

@ -118,8 +118,8 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
}
public ClientHttpResponse asHttpResponse(AtomicLong seq) {
MockClientHttpResponse httpResponse = new MockClientHttpResponse(this.payload,
this.status);
MockClientHttpResponse httpResponse = new MockClientHttpResponse(
this.payload == null ? new byte[0] : this.payload, this.status);
waitForDelay();
if (this.payload != null) {
httpResponse.getHeaders().setContentLength(this.payload.length);