@Test(timeout = 60000)
public void testPooledSessionStats() throws Exception {

    PooledConnection connection = (PooledConnection) pooledFactory.createConnection();
    assertEquals(0, connection.getNumActiveSessions());
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    assertEquals(1, connection.getNumActiveSessions());
    session.close();
    assertEquals(0, connection.getNumActiveSessions());
    assertEquals(1, connection.getNumtIdleSessions());
    assertEquals(1, connection.getNumSessions());
    connection.close();
}