public void awaitCallback() throws InterruptedException, TimeoutException {
    if (!latch.await(1, TimeUnit.SECONDS)) {
      throw new TimeoutException("Timed out waiting for callback to trigger");
    }
  }
Waits for the callback to be received.
@throws InterruptedException if there was any intteruption while waiting for the callback.
@throws TimeoutException if the callback did not arrive within a particular timeout.
ambry-rest/src/test/java/com/github/ambry/rest/NettyRequestTest.java