### Question:
TravelPlanServiceImpl implements TravelPlanService { @Override public Response getTransferSearch(TransferTravelInfo info, HttpHeaders headers) { TripInfo queryInfoFirstSection = new TripInfo(); queryInfoFirstSection.setDepartureTime(info.getTravelDate()); queryInfoFirstSection.setStartingPlace(info.getFromStationName()); queryInfoFirstSection.setEndPlace(info.getViaStationName()); List<TripResponse> firstSectionFromHighSpeed; List<TripResponse> firstSectionFromNormal; firstSectionFromHighSpeed = tripsFromHighSpeed(queryInfoFirstSection, headers); firstSectionFromNormal = tripsFromNormal(queryInfoFirstSection, headers); TripInfo queryInfoSecondSectoin = new TripInfo(); queryInfoSecondSectoin.setDepartureTime(info.getTravelDate()); queryInfoSecondSectoin.setStartingPlace(info.getViaStationName()); queryInfoSecondSectoin.setEndPlace(info.getToStationName()); List<TripResponse> secondSectionFromHighSpeed; List<TripResponse> secondSectionFromNormal; secondSectionFromHighSpeed = tripsFromHighSpeed(queryInfoSecondSectoin, headers); secondSectionFromNormal = tripsFromNormal(queryInfoSecondSectoin, headers); List<TripResponse> firstSection = new ArrayList<>(); firstSection.addAll(firstSectionFromHighSpeed); firstSection.addAll(firstSectionFromNormal); List<TripResponse> secondSection = new ArrayList<>(); secondSection.addAll(secondSectionFromHighSpeed); secondSection.addAll(secondSectionFromNormal); TransferTravelResult result = new TransferTravelResult(); result.setFirstSectionResult(firstSection); result.setSecondSectionResult(secondSection); return new Response<>(1, "Success.", result); }  @Override Response getTransferSearch(TransferTravelInfo info, HttpHeaders headers); @Override Response getCheapest(TripInfo info, HttpHeaders headers); @Override Response getQuickest(TripInfo info, HttpHeaders headers); @Override Response getMinStation(TripInfo info, HttpHeaders headers);  }### Answer:
@Test public void testGetTransferSearch() { TransferTravelInfo info = new TransferTravelInfo("from_station", "", "to_station", new Date(), "G"); List<TripResponse> tripResponseList = new ArrayList<>(); Response<List<TripResponse>> response1 = new Response<>(null, null, tripResponseList); ResponseEntity<Response<List<TripResponse>>> re1 = new ResponseEntity<>(response1, HttpStatus.OK); Mockito.when(restTemplate.exchange( Mockito.anyString(), Mockito.any(HttpMethod.class), Mockito.any(HttpEntity.class), Mockito.any(ParameterizedTypeReference.class))) .thenReturn(re1); Response result = travelPlanServiceImpl.getTransferSearch(info, headers); Assert.assertEquals("Success.", result.getMsg()); }