public void setUp() throws Exception { super.setUp(); pool = new StackKeyedObjectPool( new KeyedPoolableObjectFactory() { int counter = 0; public Object makeObject(Object key) { return String.valueOf(key) + String.valueOf(counter++); } public void destroyObject(Object key, Object obj) {} public boolean validateObject(Object key, Object obj) { return true; } public void activateObject(Object key, Object obj) {} public void passivateObject(Object key, Object obj) {} }); }
public void tearDown() throws Exception { super.tearDown(); pool = null; }