Browse Source

Merge pull request #476 from platan/master

Update MockRestServiceServer example in reference manual
pull/477/head
Sam Brannen 11 years ago
parent
commit
a60b34fd9e
  1. 2
      src/asciidoc/index.adoc

2
src/asciidoc/index.adoc

@ -20618,7 +20618,7 @@ requests and provide "stub" responses: @@ -20618,7 +20618,7 @@ requests and provide "stub" responses:
RestTemplate restTemplate = new RestTemplate();
MockRestServiceServer mockServer = MockRestServiceServer.createServer(restTemplate);
mockServer.expect(requestTo("/greeting")).andRespond(withSuccess("Hello world", "text/plain"));
mockServer.expect(requestTo("/greeting")).andRespond(withSuccess("Hello world", MediaType.TEXT_PLAIN));
// use RestTemplate ...

Loading…
Cancel
Save