pool.setMaxActive(getMaxActive());
pool.setMaxWait(getMaxWait());
Properties props = new Properties();
props.setProperty("user", "username");
props.setProperty("password", "password");
NonDelegatingPoolableConnectionFactory factory = new NonDelegatingPoolableConnectionFactory(new DriverConnectionFactory(new TesterDriver(), "jdbc:apache:commons:testdriver", props), pool);
pool.setFactory(factory);
ds = new PoolingDataSource(pool);
checkManagedConnectionEqualsReflexive();
}