diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java b/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java index 1a1e57c4388..b3bcfd9ff6d 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,7 +127,7 @@ public class ContentResultMatchers { * Assert the response body content with a Hamcrest {@link Matcher}. *
* mockMvc.perform(get("/path"))
- * .andExpect(content(containsString("text")));
+ * .andExpect(content().string(containsString("text")));
*
*/
public ResultMatcher string(final Matcher super String> matcher) {