Mockito.verify(this.conn).shutdown();
}
@Test
public void testBasicRequest() throws Exception {
final State state = new HttpAsyncRequestExecutor.State();
this.connContext.setAttribute(HttpAsyncRequestExecutor.HTTP_EXCHANGE_STATE, state);
this.connContext.setAttribute(HttpAsyncRequestExecutor.HTTP_HANDLER, this.exchangeHandler);
final HttpRequest request = new BasicHttpRequest("GET", "/");
Mockito.when(this.exchangeHandler.generateRequest()).thenReturn(request);
this.protocolHandler.requestReady(this.conn);
Mockito.verify(this.exchangeHandler).generateRequest();
Assert.assertSame(request, state.getRequest());
Mockito.verify(this.conn).submitRequest(request);
Mockito.verify(this.exchangeHandler).requestCompleted();
Assert.assertEquals(MessageState.COMPLETED, state.getRequestState());
}