@Test
public void testFinalizerCoverageException() throws SQLException, InterruptedException{

	ConnectionHandle mockConnectionHandle = createNiceMock(ConnectionHandle.class);
	Connection mockConnection = createNiceMock(Connection.class);
	expect(mockConnectionHandle.getInternalConnection()).andReturn(mockConnection).anyTimes();
	mockConnection.close();
	expectLastCall().andThrow(new SQLException("fake reason")).once();
	reset(this.mockPool);
	Map<Connection, Reference<ConnectionHandle>> refs = new HashMap<Connection, Reference<ConnectionHandle>>();
	expect(this.mockPool.getFinalizableRefs()).andReturn(refs).anyTimes();
	FinalizableReferenceQueue finalizableRefQueue = new FinalizableReferenceQueue();
	expect(this.mockPool.getFinalizableRefQueue()).andReturn(finalizableRefQueue).anyTimes();
	expect(mockConnectionHandle.getPool()).andReturn(this.mockPool).anyTimes();
	replay(mockConnectionHandle, mockConnection, this.mockPool);
	testClass.trackConnectionFinalizer(mockConnectionHandle);
	testClass.statsLock = null; // this makes it blow up.
	reset(mockLogger);
	mockLogger.error((String)anyObject());
	expectLastCall().anyTimes();
	replay(mockLogger);
	reset(mockConnectionHandle);
	mockConnectionHandle = null; // prompt GC to kick in
	for (int i=0; i < 100; i++){
		System.gc();System.gc();System.gc();
		Thread.sleep(20);
		try{
			verify(mockLogger);
			break; // we succeeded
		} catch (Throwable t){
			// do nothing, try again
			Thread.sleep(20);
		}
	}
}