@Override
  public void shutdown(final Callback<None> callback)
  {
    info(_log, "shutting down dynamic client");

    _balancer.shutdown(() -> {
      info(_log, "dynamic client shutdown complete");

      callback.onSuccess(None.none());
    });
    TimingKey.unregisterKey(TIMING_KEY);
  }
@Test(groups = { "small", "back-end" })
  public void testShutdown() throws URISyntaxException,
      InterruptedException
  {
    LoadBalancerMock balancer = new LoadBalancerMock(true);
    DynamicClient client = new DynamicClient(balancer, null, true);
    final CountDownLatch latch = new CountDownLatch(1);

    assertFalse(balancer.shutdown);

    client.shutdown(new Callback<None>()
    {
      @Override
      public void onError(Throwable e)
      {
      }

      @Override
      public void onSuccess(None t)
      {
        latch.countDown();
      }
    });

    if (!latch.await(5, TimeUnit.SECONDS))
    {
      fail("unable to shut down dynamic client");
    }

    assertTrue(balancer.shutdown);
  }