}
@Test
public void testLeaseRelease() throws Exception {
LocalRoutePool pool = new LocalRoutePool();
IOSession session1 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
pool.addPending(sessionRequest1, new BasicPoolEntryCallback());
IOSession session2 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
pool.addPending(sessionRequest2, new BasicPoolEntryCallback());
IOSession session3 = Mockito.mock(IOSession.class);
SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
pool.addPending(sessionRequest3, new BasicPoolEntryCallback());
Assert.assertEquals(3, pool.getAllocatedCount());