From c812cd370bcd13b3d9057891bc44f73aa17ee0ae Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Thu, 5 Nov 2009 13:44:52 +0000 Subject: [PATCH] Fixing test --- .../java/org/springframework/web/client/RestTemplateTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.springframework.web/src/test/java/org/springframework/web/client/RestTemplateTests.java b/org.springframework.web/src/test/java/org/springframework/web/client/RestTemplateTests.java index 4aa0ee0595..4343566485 100644 --- a/org.springframework.web/src/test/java/org/springframework/web/client/RestTemplateTests.java +++ b/org.springframework.web/src/test/java/org/springframework/web/client/RestTemplateTests.java @@ -116,6 +116,8 @@ public class RestTemplateTests { expect(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET)).andReturn(request); expect(request.execute()).andReturn(response); expect(errorHandler.hasError(response)).andReturn(true); + expect(response.getStatusCode()).andReturn(HttpStatus.INTERNAL_SERVER_ERROR); + expect(response.getStatusText()).andReturn("Internal Server Error"); errorHandler.handleError(response); expectLastCall().andThrow(new HttpServerErrorException(HttpStatus.INTERNAL_SERVER_ERROR)); response.close();