@Test
public void testRefreshConnection() throws SQLException{

	Connection mockInternalConnection =  createNiceMock(Connection.class); 
	this.testClass.connection = mockInternalConnection;
	mockInternalConnection.close();
	expectLastCall().once();
	replay(mockInternalConnection);
	this.testClass.refreshConnection();
	assertNotSame(mockInternalConnection, this.testClass.getInternalConnection());
	verify(mockInternalConnection);
	this.testClass.connection = mockInternalConnection;
	reset(this.mockPool, mockInternalConnection);
	mockInternalConnection.close();
	expectLastCall().once();
	expect(this.mockPool.obtainRawInternalConnection()).andThrow(new SQLException("foo", "1234")).once();
	replay(this.mockPool, mockInternalConnection);
	try{
		this.testClass.refreshConnection();
		fail("Should throw exception");
	} catch(SQLException e){
		// do nothing
	}
}