source: class ReserveServiceImplTest {
  
       ReserveServiceImpl reserveService;
       ReserveRepository reserveRepository;
       TourInfoSharedService tourInfoSharedService;
       PriceCalculateSharedService priceCalculateSerivce;
       JodaTimeDateFactory dateFactory;
       Sequencer<String> sequencer;
       Mapper beanMapper;
       DateTime now;
  
      @Test
      public void testUpdate01() {
  
target:         PriceCalculateOutput priceCalculateOutput = new PriceCalculateOutput();
          priceCalculateOutput.setSumPrice(100000);
          priceCalculateOutput.setAdultCount(1);
          priceCalculateOutput.setChildCount(2);
          when(priceCalculateSerivce.calculatePrice(10000, 1, 2)).thenReturn(
                  priceCalculateOutput);
  
          ReservationUpdateInput input = new ReservationUpdateInput();
          input.setReserveNo("foo");
          input.setAdultCount(1);
          input.setChildCount(2);
  
          Reserve reserve = new Reserve();
          TourInfo tour = new TourInfo("aaa");
          tour.setArrival(new Arrival());
          tour.setDeparture(new Departure());
          tour.setBasePrice(10000);
          reserve.setTourInfo(tour);
  
          when(reserveRepository.findById("foo")).thenReturn(Optional.of(
                  reserve));
          when(reserveRepository.findOneForUpdate("foo")).thenReturn(reserve);
          when(reserveRepository.save(reserve)).thenReturn(reserve);
          // run
          ReservationUpdateOutput output = reserveService.update(input);
          assertThat(output, is(output));
      }
  
  }