ManageReservationController { @RequestMapping(value = "me", method = RequestMethod.GET) public String list( @AuthenticationPrincipal ReservationUserDetails userDetails, Model model) { List<ReserveRowOutput> rows = manageReservationHelper.list(userDetails); model.addAttribute("rows", rows); return "managereservation/list"; }  @ModelAttribute ManageReservationForm setUpManageReservationForm(); @RequestMapping(value = "me", method = RequestMethod.GET) String list(
            @AuthenticationPrincipal ReservationUserDetails userDetails,
            Model model); @RequestMapping(value = "{reserveNo}", method = RequestMethod.GET) String detailForm(@PathVariable("reserveNo") String reserveNo,
            Model model); @RequestMapping(value = "{reserveNo}/update", method = RequestMethod.GET, params = "form") String updateForm(@PathVariable("reserveNo") String reserveNo,
            ManageReservationForm form, Model model); @RequestMapping(value = "{reserveNo}/update", method = RequestMethod.POST, params = "redo") String updateRedo(@PathVariable("reserveNo") String reserveNo,
            ManageReservationForm form, Model model); @TransactionTokenCheck(value = "update", type = TransactionTokenType.BEGIN) @RequestMapping(value = "{reserveNo}/update", method = RequestMethod.POST, params = "confirm") String updateConfirm(@PathVariable("reserveNo") String reserveNo,
            @Validated ManageReservationForm form, BindingResult result,
            Model model); @TransactionTokenCheck(value = "update", type = TransactionTokenType.IN) @RequestMapping(value = "{reserveNo}/update", method = RequestMethod.POST) String update(@PathVariable("reserveNo") String reserveNo,
            @Validated ManageReservationForm form, BindingResult result,
            Model model, RedirectAttributes redirectAttr); @RequestMapping(value = "{reserveNo}/update", method = RequestMethod.GET, params = "complete") String updateComplete(); @RequestMapping(value = "{reserveNo}/update", method = RequestMethod.POST, params = "backTolist") String updateBackList(); @TransactionTokenCheck(value = "cancel", type = TransactionTokenType.BEGIN) @RequestMapping(value = "{reserveNo}/cancel", method = RequestMethod.GET) String cancelConfirm(@PathVariable("reserveNo") String reserveNo,
            Model model); @TransactionTokenCheck(value = "cancel", type = TransactionTokenType.IN) @RequestMapping(value = "{reserveNo}/cancel", method = RequestMethod.POST) String cancel(@PathVariable("reserveNo") String reserveNo,
            Model model, RedirectAttributes redirectAttr); @RequestMapping(value = "{reserveNo}/cancel", method = RequestMethod.GET, params = "complete") String cancelComplete(@PathVariable("reserveNo") String reserveNo,
            Model model); @RequestMapping(value = "{reserveNo}/cancel", method = RequestMethod.POST, params = "backTolist") String backList(); @RequestMapping(value = "{reserveNo}/pdf", method = RequestMethod.GET) String downloadPDF(@PathVariable("reserveNo") String reserveNo,
            Model model, Locale locale);  }
@Test public void testManageReservationListSuccess() { MockHttpServletRequestBuilder getRequest = MockMvcRequestBuilders.get( "/reservations/me"); when(manageReservationHelper.list(userDetails)).thenReturn( new ArrayList<ReserveRowOutput>()); try { ResultActions results = mockMvc.perform(getRequest); results.andExpect(status().isOk()); results.andExpect(view().name("managereservation/list")); results.andExpect(model().attribute("rows", notNullValue())); return; } catch (Exception e) { e.printStackTrace(); } fail(); }