@Test public void listCcCourtDivisions() throws Exception { ResultActions actions = mockMvc.perform(get("/cc/courts/" + commonCourtId + "/courtDivisions/list") .accept(MediaType.APPLICATION_JSON)); actions .andExpect(status().isOk()) .andExpect(jsonPath("$.[0].id").value(equalsLong(simpleCcDivisions.get(0).getId()))) .andExpect(jsonPath("$.[0].name").value(simpleCcDivisions.get(0).getName())) .andExpect(jsonPath("$.[1].id").value(equalsLong(simpleCcDivisions.get(1).getId()))) .andExpect(jsonPath("$.[1].name").value(simpleCcDivisions.get(1).getName())); verify(ccListService, times(1)).findCcDivisions(commonCourtId); }
@RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody public List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId) { return ccListService.findCcDivisions(commonCourtId); }
CcListController { @RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody public List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId) { return ccListService.findCcDivisions(commonCourtId); } }
CcListController { @RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody public List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId) { return ccListService.findCcDivisions(commonCourtId); }  }
CcListController { @RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody public List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId) { return ccListService.findCcDivisions(commonCourtId); }  @RequestMapping("cc/courts/list") @ResponseBody List<SimpleCommonCourt> listCcCourts(); @RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId); }
CcListController { @RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody public List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId) { return ccListService.findCcDivisions(commonCourtId); }  @RequestMapping("cc/courts/list") @ResponseBody List<SimpleCommonCourt> listCcCourts(); @RequestMapping("cc/courts/{commonCourtId}/courtDivisions/list") @ResponseBody List<SimpleEntity> listCcCourtDivisions(@PathVariable("commonCourtId") long commonCourtId);  }