MockHttpResponseImpl response = new MockHttpResponseImpl(this.request, version, status, headers, cookies, new ByteArrayInputStream(responseEntity)); this.callback.response(new MockHttpResponseImpl(this.request, ex));
@Override public MockHttpResponse build() { try { // Write the response (to obtain mock HTTP response) this.delegate.flushResponseToHttpResponseWriter(null); } catch (IOException ex) { this.response = new MockHttpResponseImpl(this.request, ex); } // Return the built response return this.response; }