@Test
  public void noRequestHandlersTest() throws Exception {
    AsyncRequestResponseHandler requestResponseHandler = getAsyncRequestResponseHandler(0);
    // ok for start
    requestResponseHandler.start();
    try {
      // using for responses OK.
      MockRestRequest restRequest = createRestRequest(RestMethod.GET, "/", null, null);
      restRequest.getMetricsTracker().scalingMetricsTracker.markRequestReceived();
      MockRestResponseChannel restResponseChannel = new MockRestResponseChannel();
      awaitResponse(requestResponseHandler, restRequest, restResponseChannel, null, null);
      if (restResponseChannel.getException() != null) {
        throw restResponseChannel.getException();
      }

      // using for request is not OK.
      try {
        doHandleRequestSuccessTest(RestMethod.GET, requestResponseHandler);
        fail("Handling request should have failed because no RestRequestService was set.");
      } catch (RestServiceException e) {
        assertEquals("Unexpected RestServiceErrorCode", RestServiceErrorCode.ServiceUnavailable, e.getErrorCode());
      }
    } finally {
      requestResponseHandler.shutdown();
    }
  }
Uses the {@code requestResponseHandler} with zero request workers and one response worker and verifies that
responses are sent, but requests are not served.
@throws Exception
ambry-rest/src/test/java/com/github/ambry/rest/AsyncRequestResponseHandlerTest.java