diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/MockRestServiceServer.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/MockRestServiceServer.java
index b454f5d545b..1a5942c44c6 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/MockRestServiceServer.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/MockRestServiceServer.java
@@ -24,8 +24,8 @@ import java.util.List;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpRequestFactory;
-import org.springframework.test.web.mock.client.match.RequestMatchers;
-import org.springframework.test.web.mock.client.response.ResponseCreators;
+import org.springframework.test.web.mock.client.match.MockRestRequestMatchers;
+import org.springframework.test.web.mock.client.response.MockRestResponseCreators;
import org.springframework.util.Assert;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.support.RestGatewaySupport;
@@ -58,9 +58,9 @@ import org.springframework.web.client.support.RestGatewaySupport;
* {@link ResponseActions#andExpect(RequestMatcher) andExpect(RequestMatcher)} and
* {@link ResponseActions#andRespond(ResponseCreator) andRespond(ResponseCreator)}
* to set up request expectations and responses, most likely relying on the default
- * {@code RequestMatcher} implementations provided in {@link RequestMatchers}
+ * {@code RequestMatcher} implementations provided in {@link MockRestRequestMatchers}
* and the {@code ResponseCreator} implementations provided in
- * {@link ResponseCreators} both of which can be statically imported.
+ * {@link MockRestResponseCreators} both of which can be statically imported.
*
*
At the end of the test use {@link #verify()} to ensure all expected
* requests were actually performed.
@@ -132,7 +132,7 @@ public class MockRestServiceServer {
* before using the {@code RestTemplate}, to set up expectations for multiple
* requests.
*
- * @param requestMatcher a request expectation, see {@link RequestMatchers}
+ * @param requestMatcher a request expectation, see {@link MockRestRequestMatchers}
* @return used to set up further expectations or to define a response
*/
public ResponseActions expect(RequestMatcher requestMatcher) {
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/ResponseCreator.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/ResponseCreator.java
index 400890903cd..525e760fa2e 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/ResponseCreator.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/ResponseCreator.java
@@ -19,11 +19,11 @@ import java.io.IOException;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse;
-import org.springframework.test.web.mock.client.response.ResponseCreators;
+import org.springframework.test.web.mock.client.response.MockRestResponseCreators;
/**
* A contract for creating a {@link ClientHttpResponse}.
- * Implementations can be obtained via {@link ResponseCreators}.
+ * Implementations can be obtained via {@link MockRestResponseCreators}.
*
* @author Craig Walls
* @since 3.2
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/ContentRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/ContentRequestMatchers.java
index 85cd75b7003..b105b56db89 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/ContentRequestMatchers.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/ContentRequestMatchers.java
@@ -35,7 +35,7 @@ import org.w3c.dom.Node;
/**
* Factory for request content {@code RequestMatcher}'s. An instance of this
- * class is typically accessed via {@link RequestMatchers#content()}.
+ * class is typically accessed via {@link MockRestRequestMatchers#content()}.
*
* @author Rossen Stoyanchev
* @since 3.2
@@ -47,7 +47,7 @@ public class ContentRequestMatchers {
/**
* Class constructor, not for direct instantiation.
- * Use {@link RequestMatchers#content()}.
+ * Use {@link MockRestRequestMatchers#content()}.
*/
protected ContentRequestMatchers() {
this.xmlHelper = new XmlExpectationsHelper();
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/JsonPathRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/JsonPathRequestMatchers.java
index 234290908fa..0fa6722fdcf 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/JsonPathRequestMatchers.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/JsonPathRequestMatchers.java
@@ -44,8 +44,8 @@ public class JsonPathRequestMatchers {
/**
* Class constructor, not for direct instantiation. Use
- * {@link RequestMatchers#jsonPath(String, Matcher)} or
- * {@link RequestMatchers#jsonPath(String, Object...)}.
+ * {@link MockRestRequestMatchers#jsonPath(String, Matcher)} or
+ * {@link MockRestRequestMatchers#jsonPath(String, Object...)}.
*
* @param expression the JSONPath expression
* @param args arguments to parameterize the JSONPath expression with using
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/RequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/MockRestRequestMatchers.java
similarity index 99%
rename from spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/RequestMatchers.java
rename to spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/MockRestRequestMatchers.java
index b5e92088801..5cf8e986a6f 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/RequestMatchers.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/MockRestRequestMatchers.java
@@ -46,13 +46,13 @@ import org.springframework.util.Assert;
* @author Rossen Stoyanchev
* @since 3.2
*/
-public abstract class RequestMatchers {
+public abstract class MockRestRequestMatchers {
/**
* Private class constructor.
*/
- private RequestMatchers() {
+ private MockRestRequestMatchers() {
}
/**
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/XpathRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/XpathRequestMatchers.java
index 2c19caab57d..0b2255b1a4e 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/XpathRequestMatchers.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/XpathRequestMatchers.java
@@ -43,8 +43,8 @@ public class XpathRequestMatchers {
/**
* Class constructor, not for direct instantiation. Use
- * {@link RequestMatchers#xpath(String, Object...)} or
- * {@link RequestMatchers#xpath(String, Map, Object...)}.
+ * {@link MockRestRequestMatchers#xpath(String, Object...)} or
+ * {@link MockRestRequestMatchers#xpath(String, Map, Object...)}.
*
* @param expression the XPath expression
* @param namespaces XML namespaces referenced in the XPath expression, or {@code null}
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/package-info.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/package-info.java
index bd89bae2791..55ad8f4f2fd 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/package-info.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/match/package-info.java
@@ -17,7 +17,7 @@
/**
* Contains built-in {@link org.springframework.test.web.mock.client.RequestMatcher}
* implementations. Use
- * {@link org.springframework.test.web.mock.client.match.RequestMatchers}
+ * {@link org.springframework.test.web.mock.client.match.MockRestRequestMatchers}
* to gain access to instances of those implementations.
*/
package org.springframework.test.web.mock.client.match;
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/DefaultResponseCreator.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/DefaultResponseCreator.java
index 92eb2449f73..79cb215b5c9 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/DefaultResponseCreator.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/DefaultResponseCreator.java
@@ -49,7 +49,7 @@ public class DefaultResponseCreator implements ResponseCreator {
/**
* Protected constructor.
- * Use static factory methods in {@link ResponseCreators}.
+ * Use static factory methods in {@link MockRestResponseCreators}.
*/
protected DefaultResponseCreator(HttpStatus statusCode) {
Assert.notNull(statusCode);
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/ResponseCreators.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/MockRestResponseCreators.java
similarity index 98%
rename from spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/ResponseCreators.java
rename to spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/MockRestResponseCreators.java
index 18982b49415..8ad41971d28 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/ResponseCreators.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/MockRestResponseCreators.java
@@ -35,10 +35,10 @@ import org.springframework.test.web.mock.client.ResponseCreator;
* @author Rossen Stoyanchev
* @since 3.2
*/
-public abstract class ResponseCreators {
+public abstract class MockRestResponseCreators {
- private ResponseCreators() {
+ private MockRestResponseCreators() {
}
/**
diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/package-info.java b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/package-info.java
index d7c508aaac0..ac2585d6e3e 100644
--- a/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/package-info.java
+++ b/spring-test-mvc/src/main/java/org/springframework/test/web/mock/client/response/package-info.java
@@ -17,7 +17,7 @@
/**
* Contains built-in {@link org.springframework.test.web.mock.client.ResponseCreator}
* implementations. Use
- * {@link org.springframework.test.web.mock.client.response.ResponseCreators}
+ * {@link org.springframework.test.web.mock.client.response.MockRestResponseCreators}
* to gain access to instances of those implementations.
*/
package org.springframework.test.web.mock.client.response;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/MockClientHttpRequestFactoryTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/MockClientHttpRequestFactoryTests.java
index de7c987480d..ce857fb4777 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/MockClientHttpRequestFactoryTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/MockClientHttpRequestFactoryTests.java
@@ -18,7 +18,7 @@ package org.springframework.test.web.mock.client;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.anything;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.anything;
import java.net.URI;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/ContentRequestMatchersTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/ContentRequestMatchersTests.java
index 149ed439657..e8f79171b31 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/ContentRequestMatchersTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/ContentRequestMatchersTests.java
@@ -22,7 +22,7 @@ import org.junit.Test;
import org.springframework.http.MediaType;
import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.match.ContentRequestMatchers;
-import org.springframework.test.web.mock.client.match.RequestMatchers;
+import org.springframework.test.web.mock.client.match.MockRestRequestMatchers;
/**
* Tests for {@link ContentRequestMatchers}.
@@ -42,36 +42,36 @@ public class ContentRequestMatchersTests {
public void testContentType() throws Exception {
this.request.getHeaders().setContentType(MediaType.APPLICATION_JSON);
- RequestMatchers.content().mimeType("application/json").match(this.request);
- RequestMatchers.content().mimeType(MediaType.APPLICATION_JSON).match(this.request);
+ MockRestRequestMatchers.content().mimeType("application/json").match(this.request);
+ MockRestRequestMatchers.content().mimeType(MediaType.APPLICATION_JSON).match(this.request);
}
@Test(expected=AssertionError.class)
public void testContentTypeNoMatch1() throws Exception {
this.request.getHeaders().setContentType(MediaType.APPLICATION_JSON);
- RequestMatchers.content().mimeType("application/xml").match(this.request);
+ MockRestRequestMatchers.content().mimeType("application/xml").match(this.request);
}
@Test(expected=AssertionError.class)
public void testContentTypeNoMatch2() throws Exception {
this.request.getHeaders().setContentType(MediaType.APPLICATION_JSON);
- RequestMatchers.content().mimeType(MediaType.APPLICATION_ATOM_XML).match(this.request);
+ MockRestRequestMatchers.content().mimeType(MediaType.APPLICATION_ATOM_XML).match(this.request);
}
@Test
public void testString() throws Exception {
this.request.getBody().write("test".getBytes());
- RequestMatchers.content().string("test").match(this.request);
+ MockRestRequestMatchers.content().string("test").match(this.request);
}
@Test(expected=AssertionError.class)
public void testStringNoMatch() throws Exception {
this.request.getBody().write("test".getBytes());
- RequestMatchers.content().string("Test").match(this.request);
+ MockRestRequestMatchers.content().string("Test").match(this.request);
}
@Test
@@ -79,14 +79,14 @@ public class ContentRequestMatchersTests {
byte[] content = "test".getBytes();
this.request.getBody().write(content);
- RequestMatchers.content().bytes(content).match(this.request);
+ MockRestRequestMatchers.content().bytes(content).match(this.request);
}
@Test(expected=AssertionError.class)
public void testBytesNoMatch() throws Exception {
this.request.getBody().write("test".getBytes());
- RequestMatchers.content().bytes("Test".getBytes()).match(this.request);
+ MockRestRequestMatchers.content().bytes("Test".getBytes()).match(this.request);
}
@Test
@@ -94,14 +94,14 @@ public class ContentRequestMatchersTests {
String content = "bazbazz";
this.request.getBody().write(content.getBytes());
- RequestMatchers.content().xml(content).match(this.request);
+ MockRestRequestMatchers.content().xml(content).match(this.request);
}
@Test(expected=AssertionError.class)
public void testXmlNoMatch() throws Exception {
this.request.getBody().write("11".getBytes());
- RequestMatchers.content().xml("22").match(this.request);
+ MockRestRequestMatchers.content().xml("22").match(this.request);
}
@Test
@@ -109,7 +109,7 @@ public class ContentRequestMatchersTests {
String content = "baz";
this.request.getBody().write(content.getBytes());
- RequestMatchers.content().node(hasXPath("/foo/bar")).match(this.request);
+ MockRestRequestMatchers.content().node(hasXPath("/foo/bar")).match(this.request);
}
@Test(expected=AssertionError.class)
@@ -117,7 +117,7 @@ public class ContentRequestMatchersTests {
String content = "baz";
this.request.getBody().write(content.getBytes());
- RequestMatchers.content().node(hasXPath("/foo/bar/bar")).match(this.request);
+ MockRestRequestMatchers.content().node(hasXPath("/foo/bar/bar")).match(this.request);
}
}
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/RequestMatchersTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/RequestMatchersTests.java
index 3bd0549126e..2c3d61320d8 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/RequestMatchersTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/match/RequestMatchersTests.java
@@ -24,10 +24,10 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.http.HttpMethod;
import org.springframework.mock.http.client.MockClientHttpRequest;
-import org.springframework.test.web.mock.client.match.RequestMatchers;
+import org.springframework.test.web.mock.client.match.MockRestRequestMatchers;
/**
- * Tests for {@link RequestMatchers}.
+ * Tests for {@link MockRestRequestMatchers}.
*
* @author Craig Walls
* @author Rossen Stoyanchev
@@ -45,54 +45,54 @@ public class RequestMatchersTests {
public void requestTo() throws Exception {
this.request.setURI(new URI("http://foo.com/bar"));
- RequestMatchers.requestTo("http://foo.com/bar").match(this.request);
+ MockRestRequestMatchers.requestTo("http://foo.com/bar").match(this.request);
}
@Test(expected=AssertionError.class)
public void requestToNoMatch() throws Exception {
this.request.setURI(new URI("http://foo.com/bar"));
- RequestMatchers.requestTo("http://foo.com/wrong").match(this.request);
+ MockRestRequestMatchers.requestTo("http://foo.com/wrong").match(this.request);
}
@Test
public void requestToContains() throws Exception {
this.request.setURI(new URI("http://foo.com/bar"));
- RequestMatchers.requestTo(containsString("bar")).match(this.request);
+ MockRestRequestMatchers.requestTo(containsString("bar")).match(this.request);
}
@Test
public void method() throws Exception {
this.request.setMethod(HttpMethod.GET);
- RequestMatchers.method(HttpMethod.GET).match(this.request);
+ MockRestRequestMatchers.method(HttpMethod.GET).match(this.request);
}
@Test(expected=AssertionError.class)
public void methodNoMatch() throws Exception {
this.request.setMethod(HttpMethod.POST);
- RequestMatchers.method(HttpMethod.GET).match(this.request);
+ MockRestRequestMatchers.method(HttpMethod.GET).match(this.request);
}
@Test
public void header() throws Exception {
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
- RequestMatchers.header("foo", "bar", "baz").match(this.request);
+ MockRestRequestMatchers.header("foo", "bar", "baz").match(this.request);
}
@Test(expected=AssertionError.class)
public void headerMissing() throws Exception {
- RequestMatchers.header("foo", "bar").match(this.request);
+ MockRestRequestMatchers.header("foo", "bar").match(this.request);
}
@Test(expected=AssertionError.class)
public void headerMissingValue() throws Exception {
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
- RequestMatchers.header("foo", "bad").match(this.request);
+ MockRestRequestMatchers.header("foo", "bad").match(this.request);
}
@SuppressWarnings("unchecked")
@@ -100,13 +100,13 @@ public class RequestMatchersTests {
public void headerContains() throws Exception {
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
- RequestMatchers.header("foo", containsString("ba")).match(this.request);
+ MockRestRequestMatchers.header("foo", containsString("ba")).match(this.request);
}
@SuppressWarnings("unchecked")
@Test(expected=AssertionError.class)
public void headerContainsWithMissingHeader() throws Exception {
- RequestMatchers.header("foo", containsString("baz")).match(this.request);
+ MockRestRequestMatchers.header("foo", containsString("baz")).match(this.request);
}
@SuppressWarnings("unchecked")
@@ -114,26 +114,26 @@ public class RequestMatchersTests {
public void headerContainsWithMissingValue() throws Exception {
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
- RequestMatchers.header("foo", containsString("bx")).match(this.request);
+ MockRestRequestMatchers.header("foo", containsString("bx")).match(this.request);
}
@Test
public void headers() throws Exception {
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
- RequestMatchers.header("foo", "bar", "baz").match(this.request);
+ MockRestRequestMatchers.header("foo", "bar", "baz").match(this.request);
}
@Test(expected=AssertionError.class)
public void headersWithMissingHeader() throws Exception {
- RequestMatchers.header("foo", "bar").match(this.request);
+ MockRestRequestMatchers.header("foo", "bar").match(this.request);
}
@Test(expected=AssertionError.class)
public void headersWithMissingValue() throws Exception {
this.request.getHeaders().put("foo", Arrays.asList("bar"));
- RequestMatchers.header("foo", "bar", "baz").match(this.request);
+ MockRestRequestMatchers.header("foo", "bar", "baz").match(this.request);
}
}
\ No newline at end of file
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/response/ResponseCreatorsTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/response/ResponseCreatorsTests.java
index 38ba8620708..5cc31942e63 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/response/ResponseCreatorsTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/response/ResponseCreatorsTests.java
@@ -27,11 +27,11 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.mock.http.client.MockClientHttpResponse;
import org.springframework.test.web.mock.client.response.DefaultResponseCreator;
-import org.springframework.test.web.mock.client.response.ResponseCreators;
+import org.springframework.test.web.mock.client.response.MockRestResponseCreators;
import org.springframework.util.FileCopyUtils;
/**
- * Tests for the {@link ResponseCreators} static factory methods.
+ * Tests for the {@link MockRestResponseCreators} static factory methods.
*
* @author Rossen Stoyanchev
*/
@@ -39,7 +39,7 @@ public class ResponseCreatorsTests {
@Test
public void success() throws Exception {
- MockClientHttpResponse response = (MockClientHttpResponse) ResponseCreators.withSuccess().createResponse(null);
+ MockClientHttpResponse response = (MockClientHttpResponse) MockRestResponseCreators.withSuccess().createResponse(null);
assertEquals(HttpStatus.OK, response.getStatusCode());
assertTrue(response.getHeaders().isEmpty());
@@ -48,7 +48,7 @@ public class ResponseCreatorsTests {
@Test
public void successWithContent() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withSuccess("foo", MediaType.TEXT_PLAIN);
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withSuccess("foo", MediaType.TEXT_PLAIN);
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.OK, response.getStatusCode());
@@ -58,7 +58,7 @@ public class ResponseCreatorsTests {
@Test
public void successWithContentWithoutContentType() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withSuccess("foo", null);
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withSuccess("foo", null);
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.OK, response.getStatusCode());
@@ -69,7 +69,7 @@ public class ResponseCreatorsTests {
@Test
public void created() throws Exception {
URI location = new URI("/foo");
- DefaultResponseCreator responseCreator = ResponseCreators.withCreatedEntity(location);
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withCreatedEntity(location);
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.CREATED, response.getStatusCode());
@@ -79,7 +79,7 @@ public class ResponseCreatorsTests {
@Test
public void noContent() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withNoContent();
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withNoContent();
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
@@ -89,7 +89,7 @@ public class ResponseCreatorsTests {
@Test
public void badRequest() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withBadRequest();
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withBadRequest();
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode());
@@ -99,7 +99,7 @@ public class ResponseCreatorsTests {
@Test
public void unauthorized() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withUnauthorizedRequest();
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withUnauthorizedRequest();
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.UNAUTHORIZED, response.getStatusCode());
@@ -109,7 +109,7 @@ public class ResponseCreatorsTests {
@Test
public void serverError() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withServerError();
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withServerError();
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
@@ -119,7 +119,7 @@ public class ResponseCreatorsTests {
@Test
public void withStatus() throws Exception {
- DefaultResponseCreator responseCreator = ResponseCreators.withStatus(HttpStatus.FORBIDDEN);
+ DefaultResponseCreator responseCreator = MockRestResponseCreators.withStatus(HttpStatus.FORBIDDEN);
MockClientHttpResponse response = (MockClientHttpResponse) responseCreator.createResponse(null);
assertEquals(HttpStatus.FORBIDDEN, response.getStatusCode());
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/SampleTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/SampleTests.java
index 1b838cdc685..7d0c1b2ffa5 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/SampleTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/SampleTests.java
@@ -16,9 +16,9 @@
package org.springframework.test.web.mock.client.samples;
import static org.junit.Assert.assertTrue;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.method;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.requestTo;
-import static org.springframework.test.web.mock.client.response.ResponseCreators.withSuccess;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.method;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess;
import org.junit.Before;
import org.junit.Test;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/ContentRequestMatcherTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/ContentRequestMatcherTests.java
index 6f118f9f232..70c14e5fdfb 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/ContentRequestMatcherTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/ContentRequestMatcherTests.java
@@ -17,8 +17,8 @@ package org.springframework.test.web.mock.client.samples.matchers;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertTrue;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.content;
-import static org.springframework.test.web.mock.client.response.ResponseCreators.withSuccess;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content;
+import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI;
import java.util.ArrayList;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/HeaderRequestMatcherTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/HeaderRequestMatcherTests.java
index b69fec46ff2..df059841bdf 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/HeaderRequestMatcherTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/HeaderRequestMatcherTests.java
@@ -16,9 +16,9 @@
package org.springframework.test.web.mock.client.samples.matchers;
import static org.hamcrest.Matchers.containsString;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.header;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.requestTo;
-import static org.springframework.test.web.mock.client.response.ResponseCreators.withSuccess;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.header;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI;
import java.util.ArrayList;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/JsonPathRequestMatcherTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/JsonPathRequestMatcherTests.java
index 69242ebbb17..3ab8ad1788e 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/JsonPathRequestMatcherTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/JsonPathRequestMatcherTests.java
@@ -20,10 +20,10 @@ import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.isIn;
import static org.hamcrest.Matchers.startsWith;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.content;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.jsonPath;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.requestTo;
-import static org.springframework.test.web.mock.client.response.ResponseCreators.withSuccess;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.jsonPath;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI;
import java.util.ArrayList;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XmlContentRequestMatcherTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XmlContentRequestMatcherTests.java
index 6b76e7f3cd4..40354cf2d3d 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XmlContentRequestMatcherTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XmlContentRequestMatcherTests.java
@@ -16,9 +16,9 @@
package org.springframework.test.web.mock.client.samples.matchers;
import static org.hamcrest.Matchers.hasXPath;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.content;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.requestTo;
-import static org.springframework.test.web.mock.client.response.ResponseCreators.withSuccess;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI;
import java.util.ArrayList;
diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XpathRequestMatcherTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XpathRequestMatcherTests.java
index 8f4fed3d10f..3f8ab81ea2f 100644
--- a/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XpathRequestMatcherTests.java
+++ b/spring-test-mvc/src/test/java/org/springframework/test/web/mock/client/samples/matchers/XpathRequestMatcherTests.java
@@ -21,10 +21,10 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.startsWith;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.content;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.requestTo;
-import static org.springframework.test.web.mock.client.match.RequestMatchers.xpath;
-import static org.springframework.test.web.mock.client.response.ResponseCreators.withSuccess;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.xpath;
+import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI;
import java.util.ArrayList;