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

	mockConnection.logicallyClosed = new AtomicBoolean(false);
	reset(mockConnection,mockPartition, mockConnectionHandles);
	expect(mockConnection.getOriginatingPartition()).andReturn(mockPartition).anyTimes();
	Connection mockRealConnection = EasyMock.createNiceMock(Connection.class);
	expect(mockConnection.getInternalConnection()).andReturn(mockRealConnection).anyTimes();
	mockConnection.internalClose();
	expectLastCall().once();
	replay(mockPartition, mockConnection);
	testClass.poolShuttingDown = true;
	testClass.internalReleaseConnection(mockConnection);
	testClass.poolShuttingDown = false;
	verify(mockPartition, mockConnection);
}