### Question:
CancelServiceImpl implements CancelService { public Response<User> getAccount(String orderId, HttpHeaders headers) { CancelServiceImpl.LOGGER.info("[Cancel Order Service][Get By Id]"); HttpEntity requestEntity = new HttpEntity( headers); ResponseEntity<Response<User>> re = restTemplate.exchange( "http: HttpMethod.GET, requestEntity, new ParameterizedTypeReference<Response<User>>() { }); return re.getBody(); }  @Override Response cancelOrder(String orderId, String loginId, HttpHeaders headers); boolean sendEmail(NotifyInfo notifyInfo, HttpHeaders headers); @Override Response calculateRefund(String orderId, HttpHeaders headers); boolean drawbackMoney(String money, String userId, HttpHeaders headers); Response<User> getAccount(String orderId, HttpHeaders headers);  }### 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); Response<User> result = cancelServiceImpl.getAccount("orderId", headers); Assert.assertEquals(new Response<User>(null, null, null), result); }