ManagedConnectionPool ps = cm.getPoolingStrategy();
assertTrue("0: Initial check", ps.getConnectionCount() == 0);
// Get a connection
ConnectionListener cl = cm.getManagedConnection(null, null);
assertTrue("1: Got a null connection!", cl.getManagedConnection() != null);
assertTrue("1: One connection", ps.getConnectionCount() == 1);
// Get another connection
ConnectionListener cl2 = cm.getManagedConnection(null, null);
assertTrue("2: Got a null connection!", cl2.getManagedConnection() != null);
assertTrue("2: Two connections", ps.getConnectionCount() == 2);
// Return first
cm.returnManagedConnection(cl, true);
assertTrue("3: One connection", ps.getConnectionCount() == 1);