### Question:
BasicServiceImpl implements BasicService { public boolean checkStationExists(String stationName, HttpHeaders headers) { BasicServiceImpl.LOGGER.info("[Basic Information Service][Check Station Exists] Station Name: {}", stationName); HttpEntity requestEntity = new HttpEntity( headers); ResponseEntity<Response> re = restTemplate.exchange( "http: HttpMethod.GET, requestEntity, Response.class); Response exist = re.getBody(); return exist.getStatus() == 1; }  @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 testCheckStationExists() { Response response = new Response<>(1, null, null); ResponseEntity<Response> re = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( "http: HttpMethod.GET, requestEntity, Response.class)).thenReturn(re); Boolean result = basicServiceImpl.checkStationExists("stationName", headers); Assert.assertTrue(result); }