@Test public void testFindOne02() { when(reserveRepository.findById("foo")).thenReturn(Optional.empty()); when(tourInfoSharedService.findOneWithDetails(null)).thenReturn(null); Reserve result = reserveService.findOneWithTourInfo("foo"); assertThat(result, is(nullValue())); }
@Override public Reserve findOneWithTourInfo(String reserveNo) { Reserve reserve = authorizedReserveSharedService.findOne(reserveNo); if (reserve != null) { TourInfo tourInfo = tourInfoSharedService.findOneWithDetails(reserve .getTourInfo().getTourCode()); reserve.setTourInfo(tourInfo); } return reserve; }
ReserveServiceImpl implements ReserveService { @Override public Reserve findOneWithTourInfo(String reserveNo) { Reserve reserve = authorizedReserveSharedService.findOne(reserveNo); if (reserve != null) { TourInfo tourInfo = tourInfoSharedService.findOneWithDetails(reserve .getTourInfo().getTourCode()); reserve.setTourInfo(tourInfo); } return reserve; } }
ReserveServiceImpl implements ReserveService { @Override public Reserve findOneWithTourInfo(String reserveNo) { Reserve reserve = authorizedReserveSharedService.findOne(reserveNo); if (reserve != null) { TourInfo tourInfo = tourInfoSharedService.findOneWithDetails(reserve .getTourInfo().getTourCode()); reserve.setTourInfo(tourInfo); } return reserve; }  }
ReserveServiceImpl implements ReserveService { @Override public Reserve findOneWithTourInfo(String reserveNo) { Reserve reserve = authorizedReserveSharedService.findOne(reserveNo); if (reserve != null) { TourInfo tourInfo = tourInfoSharedService.findOneWithDetails(reserve .getTourInfo().getTourCode()); reserve.setTourInfo(tourInfo); } return reserve; }  @Override Reserve findOneWithTourInfo(String reserveNo); @Override List<Reserve> findAllWithTourInfoByCustomer(String customerCode); @Override ReserveTourOutput reserve(
            ReserveTourInput input); @Override void cancel(String reserveNo); @Override ReservationUpdateOutput update(
            ReservationUpdateInput input); }
ReserveServiceImpl implements ReserveService { @Override public Reserve findOneWithTourInfo(String reserveNo) { Reserve reserve = authorizedReserveSharedService.findOne(reserveNo); if (reserve != null) { TourInfo tourInfo = tourInfoSharedService.findOneWithDetails(reserve .getTourInfo().getTourCode()); reserve.setTourInfo(tourInfo); } return reserve; }  @Override Reserve findOneWithTourInfo(String reserveNo); @Override List<Reserve> findAllWithTourInfoByCustomer(String customerCode); @Override ReserveTourOutput reserve(
            ReserveTourInput input); @Override void cancel(String reserveNo); @Override ReservationUpdateOutput update(
            ReservationUpdateInput input);  }