@Test
public void testGetConnectionWithTimeout() throws SQLException, InterruptedException, IllegalArgumentException, IllegalAccessException, SecurityException, NoSuchFieldException {

	expect(mockPartition.isUnableToCreateMoreTransactions()).andReturn(true).once();
	expect(mockPartition.getFreeConnections()).andReturn(mockConnectionHandles).anyTimes();
	expect(mockConnectionHandles.poll()).andReturn(null).anyTimes();
	replay(mockPartition, mockConnectionHandles, mockConnection);
	try{
		testClass.getConnection();
		fail("Should have thrown an exception");
	} catch (SQLException e){
		// do nothing
	}
	verify(mockPartition, mockConnectionHandles, mockConnection);
}