Code example for MockMvc

Methods: perform

0
        this.mockMvc = MockMvcBuilders.standaloneSetup(new HomeController()).build();
    } 
 
    @Test
    public void testTOSPage() throws Exception {
        mockMvc.perform(get("/tos"))
                .andExpect(status().isOk());
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java