@Override
  public void handleStreamRequest(StreamRequest req, Map<String, String> wireAttrs,
      RequestContext requestContext, TransportCallback<StreamResponse> callback)
  {
    _transportDispatcher.handleStreamRequest(req, wireAttrs, requestContext,
        new RequestFinalizerTransportCallback<>(callback, requestContext, req));
  }
@Test(dataProvider = "throwTransportCallbackException")
  public void testHandleStreamRequestOrdering(boolean throwTransportCallbackException)
  {
    when(_streamTransportResponse.getResponse())
        .thenReturn(_streamResponse);
    when(_streamResponse.getEntityStream())
        .thenReturn(_entityStream);

    final TestTransportCallback<StreamResponse> transportCallback = new TestTransportCallback<>(throwTransportCallbackException);
    _outerDispatcher.handleStreamRequest(null, null, new RequestContext(), transportCallback);

    Assert.assertEquals(_outerDispatcher._executionOrder, 1);
    Assert.assertEquals(_innerDispatcher._executionOrder, 2);
    Assert.assertEquals(_innerDispatcher._transportCallback._executionOrder, 3);
    Assert.assertEquals(_outerDispatcher._transportCallback._executionOrder, 4);
    Assert.assertEquals(transportCallback._executionOrder, 5);
    verify(_entityStream).addObserver(any());
    if (throwTransportCallbackException)
    {
      Assert.assertEquals(_requestFinalizer._executionOrder, 6, "Expected request to be finalized after the callback threw an exception.");
    }
  }