final HttpException httpex = new HttpException();
this.protocolHandler.exception(this.conn, httpex);
Assert.assertEquals(MessageState.READY, state.getRequestState());
Assert.assertEquals(MessageState.BODY_STREAM, state.getResponseState());
final Outgoing outgoing = state.getOutgoing();
Assert.assertNotNull(outgoing);
Assert.assertNotNull(outgoing.getProducer());
Assert.assertNotNull(outgoing.getResponse());
Assert.assertEquals(500, outgoing.getResponse().getStatusLine().getStatusCode());
Mockito.verify(this.requestConsumer).failed(httpex);
Mockito.verify(this.requestConsumer).close();
Mockito.verify(this.cancellable).cancel();
Mockito.verify(this.conn, Mockito.never()).shutdown();