@Override
  public Future<RestResponse> restRequest(RestRequest request)
  {
    return restRequest(request, new RequestContext());
  }
@Test
  public void testRestException() throws Exception
  {
    SimpleLoadBalancer balancer = prepareLoadBalancer(Arrays.asList("http://test.linkedin.com/retry1", "http://test.linkedin.com/bad"),
        HttpClientFactory.UNLIMITED_CLIENT_REQUEST_RETRY_RATIO);

    DynamicClient dynamicClient = new DynamicClient(balancer, null);
    RetryClient client = new RetryClient(
        dynamicClient,
        balancer,
        D2ClientConfig.DEFAULT_RETRY_LIMIT,
        RetryClient.DEFAULT_UPDATE_INTERVAL_MS,
        RetryClient.DEFAULT_AGGREGATED_INTERVAL_NUM,
        SystemClock.instance(),
        true,
        false);
    URI uri = URI.create("d2://retryService?arg1=empty&arg2=empty");
    RestRequest restRequest = new RestRequestBuilder(uri).build();
    DegraderTrackerClientTest.TestCallback<RestResponse> restCallback = new DegraderTrackerClientTest.TestCallback<>();

    RequestContext context = new RequestContext();
    KeyMapper.TargetHostHints.setRequestContextTargetHost(context, URI.create("http://test.linkedin.com/bad"));
    client.restRequest(restRequest, context, restCallback);

    assertNull(restCallback.t);
    assertNotNull(restCallback.e);
    assertTrue(restCallback.e.getMessage().contains("exception happens"));
  }