### Question:
PreserveServiceImpl implements PreserveService { public User getAccount(String accountId, HttpHeaders httpHeaders) { PreserveServiceImpl.LOGGER.info("[Cancel Order Service][Get Order By Id]"); HttpEntity requestEntitySendEmail = new HttpEntity(httpHeaders); ResponseEntity<Response<User>> getAccount = restTemplate.exchange( "http: HttpMethod.GET, requestEntitySendEmail, new ParameterizedTypeReference<Response<User>>() { }); Response<User> result = getAccount.getBody(); return result.getData(); }  @Override Response preserve(OrderTicketsInfo oti, HttpHeaders headers); Ticket dipatchSeat(Date date, String tripId, String startStationId, String endStataionId, int seatType, HttpHeaders httpHeaders); boolean sendEmail(NotifyInfo notifyInfo, HttpHeaders httpHeaders); User getAccount(String accountId, HttpHeaders httpHeaders);  }### Answer:
@Test public void testGetAccount() { Response<User> response = new Response<>(); ResponseEntity<Response<User>> re = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( "http: HttpMethod.GET, requestEntity, new ParameterizedTypeReference<Response<User>>() { })).thenReturn(re); User result = preserveServiceImpl.getAccount("1", headers); Assert.assertNull(result); }