final List calledMethods = new ArrayList();
final Object key = new Object();
// Test that the minIdle check doesn't add too many idle objects
final KeyedPoolableObjectFactory kpof = (KeyedPoolableObjectFactory)createProxy(KeyedPoolableObjectFactory.class, calledMethods);
final KeyedObjectPool kop = new GenericKeyedObjectPool(kpof);
PoolUtils.checkMinIdle(kop, key, 2, 100);
Thread.sleep(400);
assertEquals(2, kop.getNumIdle(key));
assertEquals(2, kop.getNumIdle());
kop.close();
int makeObjectCount = 0;
final Iterator iter = calledMethods.iterator();
while (iter.hasNext()) {
final String methodName = (String)iter.next();
if ("makeObject".equals(methodName)) {