source: class MockMvcControllerTest {
  
      private final static ObjectMapper objectMapper;
      @Autowired
      private MockMvc mockMvc;
      @MockBean
      private RoleRepository roleRepository;
  
      @Test
      public void testGet() throws Exception{
  
target:         mockMvc.perform(get("/mock/get?method=testGet"))
                  .andExpect(status().is(200))
                  .andExpect(content().string("success"));
      }
  
  }