@Override
  public void handleRequest(RestRequest request, RequestContext requestContext, Callback<RestResponse> callback)
  {
    //This code path cannot accept content types or accept types that contain
    //multipart/related. This is because these types of requests will usually have very large payloads and therefore
    //would degrade server performance since RestRequest reads everything into memory.
    if (!isMultipart(request, requestContext, callback))
    {
      _restRestLiServer.handleRequest(request, requestContext, callback);
    }
  }
@Test(dataProvider = "requestHandlersData")
  public void testRequestHandlers(URI uri, String expectedResponse)
  {
    RestLiConfig config = new RestLiConfig();
    config.addResourcePackageNames("com.linkedin.restli.server.twitter");
    config.setDocumentationRequestHandler(new DefaultDocumentationRequestHandler() {
      @Override
      public void initialize(RestLiConfig config, Map<String, ResourceModel> rootResources) {/* no-op */}
      @Override
      public void handleRequest(RestRequest req, RequestContext ctx, Callback<RestResponse> cb)
      {
        cb.onSuccess(new RestResponseBuilder().setEntity(toByteString(DOCUMENTATION_RESPONSE)).build());
      }
    });
    config.addCustomRequestHandlers(new CustomRequestHandler());
    config.addDebugRequestHandlers(new DebugRequestHandler("a", DEBUG_HANDLER_RESPONSE_A),
        new DebugRequestHandler("b", DEBUG_HANDLER_RESPONSE_B));

    RestLiServer server = new RestLiServer(config, new EasyMockResourceFactory(), createMock(Engine.class));

    RestRequest restReq = new RestRequestBuilder(uri).build();
    server.handleRequest(restReq, createMock(RequestContext.class), new RestResponseAssertionCallback(expectedResponse));

    StreamRequest streamReq = new StreamRequestBuilder(uri).build(EntityStreams.emptyStream());
    server.handleRequest(streamReq, createMock(RequestContext.class), new StreamResponseAssertionCallback(expectedResponse));
  }