@Test public void testReserve01() { ReserveTourForm form = new ReserveTourForm(); ReserveTourOutput output = new ReserveTourOutput(); when(reserveService.reserve(any(ReserveTourInput.class))).thenReturn( output); ReserveTourOutput result = reserveHelper.reserve(userDetails, "123", form); assertThat(result, is(output)); }
public ReserveTourOutput reserve(ReservationUserDetails userDetails, String tourCode, ReserveTourForm tourReserveForm) throws BusinessException { ReserveTourInput input = beanMapper.map(tourReserveForm, ReserveTourInput.class); input.setTourCode(tourCode); Customer customer = userDetails.getCustomer(); input.setCustomer(customer); ReserveTourOutput tourReserveOutput = reserveService.reserve(input); return tourReserveOutput; }
ReserveTourHelper { public ReserveTourOutput reserve(ReservationUserDetails userDetails, String tourCode, ReserveTourForm tourReserveForm) throws BusinessException { ReserveTourInput input = beanMapper.map(tourReserveForm, ReserveTourInput.class); input.setTourCode(tourCode); Customer customer = userDetails.getCustomer(); input.setCustomer(customer); ReserveTourOutput tourReserveOutput = reserveService.reserve(input); return tourReserveOutput; } }
ReserveTourHelper { public ReserveTourOutput reserve(ReservationUserDetails userDetails, String tourCode, ReserveTourForm tourReserveForm) throws BusinessException { ReserveTourInput input = beanMapper.map(tourReserveForm, ReserveTourInput.class); input.setTourCode(tourCode); Customer customer = userDetails.getCustomer(); input.setCustomer(customer); ReserveTourOutput tourReserveOutput = reserveService.reserve(input); return tourReserveOutput; }  }
ReserveTourHelper { public ReserveTourOutput reserve(ReservationUserDetails userDetails, String tourCode, ReserveTourForm tourReserveForm) throws BusinessException { ReserveTourInput input = beanMapper.map(tourReserveForm, ReserveTourInput.class); input.setTourCode(tourCode); Customer customer = userDetails.getCustomer(); input.setCustomer(customer); ReserveTourOutput tourReserveOutput = reserveService.reserve(input); return tourReserveOutput; }  TourDetailOutput findTourDetail(ReservationUserDetails userDetails,
            String tourCode, ReserveTourForm form); ReserveTourOutput reserve(ReservationUserDetails userDetails,
            String tourCode,
            ReserveTourForm tourReserveForm); }
ReserveTourHelper { public ReserveTourOutput reserve(ReservationUserDetails userDetails, String tourCode, ReserveTourForm tourReserveForm) throws BusinessException { ReserveTourInput input = beanMapper.map(tourReserveForm, ReserveTourInput.class); input.setTourCode(tourCode); Customer customer = userDetails.getCustomer(); input.setCustomer(customer); ReserveTourOutput tourReserveOutput = reserveService.reserve(input); return tourReserveOutput; }  TourDetailOutput findTourDetail(ReservationUserDetails userDetails,
            String tourCode, ReserveTourForm form); ReserveTourOutput reserve(ReservationUserDetails userDetails,
            String tourCode,
            ReserveTourForm tourReserveForm);  }