@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 = "validClientProtocolVersionDataStreamOnly")
  public void testValidUnstructuredDataRequestMissingHeader(RestLiServer server,
                                                            ProtocolVersion clientProtocolVersion,
                                                            String headerConstant)
    throws URISyntaxException, IOException
  {
    StreamRequest streamRequest = new StreamRequestBuilder(new URI("/feedDownloads/1")).setHeader(headerConstant,
                                                                                                  clientProtocolVersion.toString())
                                                                                       .build(EntityStreams.emptyStream());

    final FeedDownloadResource resource = getMockResource(FeedDownloadResource.class);
    resource.get(eq(1L), anyObject(UnstructuredDataWriter.class));
    EasyMock.expectLastCall().andDelegateTo(new FeedDownloadResource() {
      @Override
      public void get(Long key, UnstructuredDataWriter writer)
      {
        // do nothing here, this should cause error
      }
    }).once();
    replay(resource);

    @SuppressWarnings("unchecked")
    Callback<StreamResponse> r2Callback = createMock(Callback.class);
    r2Callback.onError(anyObject());
    expectLastCall().once();
    replay(r2Callback);

    RequestContext requestContext = new RequestContext();
    server.handleRequest(streamRequest, requestContext, r2Callback);

    verify(resource);
    verify(r2Callback);
  }