public void testSuccessfulConnect() throws Exception {
IOSession iosession = Mockito.mock(IOSession.class);
SessionRequest sessionRequest = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest.getAttachment()).thenReturn("somehost");
Mockito.when(sessionRequest.getSession()).thenReturn(iosession);
ConnectingIOReactor ioreactor = Mockito.mock(ConnectingIOReactor.class);
Mockito.when(ioreactor.connect(
Mockito.any(SocketAddress.class),
Mockito.any(SocketAddress.class),
Mockito.any(), Mockito.any(SessionRequestCallback.class))).
thenReturn(sessionRequest);
LocalSessionPool pool = new LocalSessionPool(ioreactor, 2, 10);