Mockito.verify(this.conn).shutdown();
}
@Test
public void testExchangeDone() throws Exception {
final State state = new HttpAsyncRequestExecutor.State();
final HttpRequest request = new BasicHttpRequest("GET", "/");
state.setRequest(request);
final BasicHttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
state.setResponse(response);
this.connContext.setAttribute(HttpAsyncRequestExecutor.HTTP_EXCHANGE_STATE, state);
this.connContext.setAttribute(HttpAsyncRequestExecutor.HTTP_HANDLER, this.exchangeHandler);
Mockito.when(this.exchangeHandler.isDone()).thenReturn(Boolean.TRUE);
Assert.assertEquals("request state: READY; request: GET / HTTP/1.1; " +
"response state: READY; response: HTTP/1.1 200 OK; valid: true;",
state.toString());
this.protocolHandler.requestReady(this.conn);
Assert.assertEquals(MessageState.READY, state.getRequestState());
Assert.assertEquals(MessageState.READY, state.getResponseState());
}