diff --git a/framework-docs/modules/ROOT/pages/testing/spring-mvc-test-client.adoc b/framework-docs/modules/ROOT/pages/testing/spring-mvc-test-client.adoc index 81fca95595b..bc186b83514 100644 --- a/framework-docs/modules/ROOT/pages/testing/spring-mvc-test-client.adoc +++ b/framework-docs/modules/ROOT/pages/testing/spring-mvc-test-client.adoc @@ -151,7 +151,7 @@ Kotlin:: [source,kotlin,indent=0,subs="verbatim,quotes"] ---- val mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build() - restTemplate = RestTemplate(MockMvcClientHttpRequestFactory(mockMvc)) + this.restTemplate = RestTemplate(MockMvcClientHttpRequestFactory(mockMvc)) // Test code that uses the above RestTemplate ... ---- @@ -188,7 +188,7 @@ Kotlin:: val restTemplate = RestTemplate() // Create ExecutingResponseCreator with the original request factory - val withActualResponse = new ExecutingResponseCreator(restTemplate.getRequestFactory()) + val withActualResponse = ExecutingResponseCreator(restTemplate.getRequestFactory()) val mockServer = MockRestServiceServer.bindTo(restTemplate).build() mockServer.expect(requestTo("/profile")).andRespond(withSuccess())