@@ -0,0 +1,2106 @@
+package org.springframework.mock.http.client;%0A%0A/*%0A * %E2%81%A3%E2%80%8B%0A * Riptide%0A * %E2%81%A3%E2%81%A3%0A * Copyright (C) 2015 - 2016 Zalando SE%0A * %E2%81%A3%E2%81%A3%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * %E2%80%8B%E2%81%A3%0A */%0A%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.client.ClientHttpResponse;%0Aimport org.springframework.mock.http.MockHttpInputMessage;%0Aimport org.springframework.util.Assert;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0A%0Apublic class MockClientHttpResponse extends MockHttpInputMessage implements ClientHttpResponse %7B%0A%0A    private final HttpStatus status;%0A%0A    /**%0A     * Constructor with response body as a byte array.%0A     */%0A    public MockClientHttpResponse(byte%5B%5D body, HttpStatus statusCode) %7B%0A        super(body);%0A        Assert.notNull(statusCode, %22statisCode is required%22);%0A        this.status = statusCode;%0A    %7D%0A%0A    /**%0A     * Constructor with response body as InputStream.%0A     */%0A    public MockClientHttpResponse(InputStream body, HttpStatus statusCode) %7B%0A        super(body);%0A        Assert.notNull(statusCode, %22statisCode is required%22);%0A        this.status = statusCode;%0A    %7D%0A%0A    @Override%0A    public HttpStatus getStatusCode() throws IOException %7B%0A        return this.status;%0A    %7D%0A%0A    @Override%0A    public int getRawStatusCode() throws IOException %7B%0A        return this.status.value();%0A    %7D%0A%0A    @Override%0A    public String getStatusText() throws IOException %7B%0A        return this.status.getReasonPhrase();%0A    %7D%0A%0A    @Override%0A    public void close() %7B%0A        try %7B%0A            this.getBody().close();%0A        %7D catch (IOException e) %7B%0A        %7D%0A    %7D%0A%0A%7D

Align mock mvc behaviour with real http client