Skip to content

Instantly share code, notes, and snippets.

@zarinfam
Created December 16, 2019 07:11
Show Gist options
  • Save zarinfam/d3782a68399216b5a135faad8667186b to your computer and use it in GitHub Desktop.
Save zarinfam/d3782a68399216b5a135faad8667186b to your computer and use it in GitHub Desktop.
Created with Copy to Gist
@Autowired
private MockMvc mockMvc;
@Test
public void noParamGreetingShouldReturnDefaultMessage() throws Exception {
this.mockMvc.perform(get("/greeting")).andDo(print()).andExpect(status().isOk())
.andExpect(jsonPath("$.content").value("Hello, World!"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment