@Test
public void testLeaseReleaseStateful() throws Exception {
LocalRoutePool pool = new LocalRoutePool();
IOSession session1 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
BasicFuture<LocalPoolEntry> future1 = new BasicFuture<LocalPoolEntry>(null);
pool.addPending(sessionRequest1, future1);
IOSession session2 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
BasicFuture<LocalPoolEntry> future2 = new BasicFuture<LocalPoolEntry>(null);
pool.addPending(sessionRequest2, future2);
IOSession session3 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
BasicFuture<LocalPoolEntry> future3 = new BasicFuture<LocalPoolEntry>(null);
pool.addPending(sessionRequest3, future3);