@Test
public void testCloseExpired() throws Exception {
IOSession iosession1 = Mockito.mock(IOSession.class);
Mockito.when(iosession1.isClosed()).thenReturn(Boolean.TRUE);
SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest1.getAttachment()).thenReturn("somehost");
Mockito.when(sessionRequest1.getSession()).thenReturn(iosession1);
IOSession iosession2 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest2.getAttachment()).thenReturn("somehost");
Mockito.when(sessionRequest2.getSession()).thenReturn(iosession2);
ConnectingIOReactor ioreactor = Mockito.mock(ConnectingIOReactor.class);
Mockito.when(ioreactor.connect(
Mockito.any(SocketAddress.class), Mockito.any(SocketAddress.class),
Mockito.any(), Mockito.any(SessionRequestCallback.class))).