@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
  public void testRestRequestAttemptVerifyParseFailed() throws Exception
  {
    //This test verifies that a RestRequest sent to the RestLiServer throws an exception if the content type or accept types
    //fail to parse properly. This occurs when we try to verify that the request's content type or accept types do
    //not include multipart/related.
    RestRequest invalidContentTypeRequest = new RestRequestBuilder(new URI("/statuses/abcd"))
        .setHeader(RestConstants.HEADER_CONTENT_TYPE, "©").build();

    Callback<RestResponse> callback = new Callback<RestResponse>()
    {
      @Override
      public void onSuccess(RestResponse restResponse)
      {
        fail();
      }

      @Override
      public void onError(Throwable e)
      {
        assertTrue(e instanceof RestException);
        RestException restException = (RestException)e;
        RestResponse restResponse = restException.getResponse();

        assertEquals(restResponse.getStatus(), 400);
        assertTrue(restResponse.getEntity().length() > 0);
        assertEquals(restResponse.getEntity().asString(Charset.defaultCharset()), "Unable to parse content or accept types.");
      }
    };

    _server.handleRequest(invalidContentTypeRequest, new RequestContext(), callback);
  }