@Test
public void testGetCreatedConnections() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException{

	ReentrantReadWriteLock mockLock = createNiceMock(ReentrantReadWriteLock.class);
	ReadLock mockReadLock = createNiceMock(ReadLock.class);
	Field field = testClass.getClass().getDeclaredField("statsLock");
	field.setAccessible(true);
	ReentrantReadWriteLock oldLock = (ReentrantReadWriteLock) field.get(testClass);
	field.set(testClass, mockLock);
	expect(mockLock.readLock()).andThrow(new RuntimeException()).once().andReturn(mockReadLock).once();
	mockReadLock.lock();
	expectLastCall().once();
	replay(mockLock, mockReadLock);
	try{
		testClass.getCreatedConnections();
		fail("Should have thrown an exception");
	} catch (Throwable t){
		//do nothing
	}
	verify(mockLock);
	field.set(testClass, oldLock);
}