### Question:
VisitorController { @GetMapping("/visitor/count") public Response getVisitorCount() { return ResponseUtil.success(countService.getVisitorCount()); }  @GetMapping("/visitor/count") Response getVisitorCount(); @GetMapping("/admin/visitor/page") Response page(@RequestParam(value = "count", required = false, defaultValue = "10") int count,
                         @RequestParam(value = "page", required = false, defaultValue = "1") int page,
                         @RequestParam(value = "showLocation", required = false, defaultValue = "false") boolean showLocation); @PostMapping("/visit") Response add(HttpServletRequest request); @GetMapping("/dayVisitCount") Response dayVisitCount(); @GetMapping("/ip/{ip}") Response ipLocation(@PathVariable("ip") String ip); @GetMapping("/ip") Response getIp(HttpServletRequest request);  }### Answer:
@Test public void getVisitorCount() throws Exception { mockMvc.perform(get("/visitor/count")).andDo(result -> { JSONObject object = JSONObject.fromObject(result.getResponse().getContentAsString()); assertEquals(SUCCESS.getCode(), object.getInt(Code)); assertTrue(object.containsKey(Result)); }); }