expect(mockConfig.getConnectionHook()).andReturn(hook).anyTimes();
expect(mockConfig.clone()).andReturn(mockConfig).anyTimes();
replay(mockConfig);
poolClass = new BoneCP(mockConfig);
poolClass.getConnection().close();
poolClass.close();
reset(mockConfig);
expect(mockConfig.getPartitionCount()).andReturn(1).anyTimes();
expect(mockConfig.getMaxConnectionsPerPartition()).andReturn(5).anyTimes();
expect(mockConfig.getMinConnectionsPerPartition()).andReturn(5).anyTimes();
expect(mockConfig.getIdleConnectionTestPeriodInMinutes()).andReturn(10000L).anyTimes();
expect(mockConfig.getUsername()).andReturn(CommonTestUtils.username).anyTimes();
expect(mockConfig.getPassword()).andReturn(CommonTestUtils.password).anyTimes();
expect(mockConfig.getReleaseHelperThreads()).andReturn(0).anyTimes();
expect(mockConfig.getConnectionHook()).andReturn(hook).anyTimes();
expect(mockConfig.isDisableConnectionTracking()).andReturn(true).anyTimes();
expect(mockConfig.getJdbcUrl()).andReturn("something-bad").anyTimes();
replay(mockConfig);
try{
poolClass = new BoneCP(mockConfig);
// should throw an exception
} catch (Exception e){
// do nothing
}