AdminController { @GetMapping public SearchResult symbols(String code) throws IOException { return adminService.search(code); }  @GetMapping SearchResult symbols(String code); @PostMapping("/{provider}/{code}") Response add(Locale l, @PathVariable String code, @PathVariable String provider); @DeleteMapping("/{provider}/{symbol}") Response delete(Locale l, @PathVariable String symbol, @PathVariable String provider);  }
@Test public void testSymbols() throws Exception { SearchResult result = new SearchResult(asList(), asList()); when(adminService.search(eq("volks"))).thenReturn(result); mvc.perform(get("/api/admin") .param("code", "volks")) .andExpect(status().is2xxSuccessful()); }