Assert the response body content with a Hamcrest Matcher
.
mockMvc.perform(get("/path")) .andExpect(content().string(containsString("text")));
Assert the response body content with a Hamcrest Matcher
.
mockMvc.perform(get("/path")) .andExpect(content().string(containsString("text")));