final LinkedList<HttpResponse> responses = new LinkedList<HttpResponse>();
Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when(
handler).responseReceived(Mockito.<NHttpClientConnection>any());
Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when(
handler).inputReady(Mockito.<NHttpClientConnection>any(), Mockito.<ContentDecoder>any());
Assert.assertEquals(0, conn.getMetrics().getResponseCount());
conn.consumeInput(handler);