Use HttpStatusCode interface
This commit contains changes made because of the introduction of HttpStatusCode. In general, methods that used to return a HttpStatus now return HttpStatusCode instead, and methods that returned raw status codes are now deprecated. See gh-28214
This commit is contained in:
@@ -190,7 +190,7 @@ public class RestTemplateXhrTransportTests {
|
||||
private ClientHttpResponse response(HttpStatus status, String body) throws IOException {
|
||||
ClientHttpResponse response = mock(ClientHttpResponse.class);
|
||||
InputStream inputStream = getInputStream(body);
|
||||
given(response.getRawStatusCode()).willReturn(status.value());
|
||||
given(response.getStatusCode()).willReturn(status);
|
||||
given(response.getBody()).willReturn(inputStream);
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user