### Question:
BasicServiceImpl implements BasicService { public TrainType queryTrainType(String trainTypeId, HttpHeaders headers) { BasicServiceImpl.LOGGER.info("[Basic Information Service][Query Train Type] Train Type: {}", trainTypeId); HttpEntity requestEntity = new HttpEntity( headers); ResponseEntity<Response> re = restTemplate.exchange( "http: HttpMethod.GET, requestEntity, Response.class); Response response = re.getBody(); return JsonUtils.conveterObject(response.getData(), TrainType.class); }  @Override Response queryForTravel(Travel info, HttpHeaders headers); @Override Response queryForStationId(String stationName, HttpHeaders headers); boolean checkStationExists(String stationName, HttpHeaders headers); TrainType queryTrainType(String trainTypeId, HttpHeaders headers);  }### Answer:
@Test public void testQueryTrainType() { Response response = new Response<>(); ResponseEntity<Response> re = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( "http: HttpMethod.GET, requestEntity, Response.class)).thenReturn(re); TrainType result = basicServiceImpl.queryTrainType("trainTypeId", headers); Assert.assertNull(result); }