private ReadableStreamChannel sendRequestGetResponse(RestRequest restRequest, RestResponseChannel restResponseChannel)
      throws Exception {
    final CountDownLatch latch = new CountDownLatch(1);
    final AtomicReference<Exception> exceptionRef = new AtomicReference<>();
    final AtomicReference<ReadableStreamChannel> channelRef = new AtomicReference<>();
    getPeersHandler.handle(restRequest, restResponseChannel, new Callback<ReadableStreamChannel>() {
      @Override
      public void onCompletion(ReadableStreamChannel result, Exception exception) {
        channelRef.set(result);
        exceptionRef.set(exception);
        latch.countDown();
      }
    });
    assertTrue("Latch did not count down in time", latch.await(1, TimeUnit.SECONDS));
    if (exceptionRef.get() != null) {
      throw exceptionRef.get();
    }
    return channelRef.get();
  }
Sends the given {@link RestRequest} to the {@link GetPeersHandler} and waits for the response and returns it.
@param restRequest the {@link RestRequest} to send.
@param restResponseChannel the {@link RestResponseChannel} where headers will be set.
@return the response body as a {@link ReadableStreamChannel}.
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/GetPeersHandlerTest.java