// close events on shutdown.
@Test
public void testMultipleSessionEndings() {
ISession mockSession = mockHelper.createMock("mockSession", ISession.class);
SessionPanel mockSessionPanel = mockHelper.createMock("mockSessionPanel", SessionPanel.class);
ISQLPanelAPI mockSQLPanelAPI = mockHelper.createMock("mockSQLPanelAPI", ISQLPanelAPI.class);
EasyMock.makeThreadSafe(mockSQLPanelAPI, true);
expect(mockSession.getSessionSheet()).andStubReturn(mockSessionPanel);
expect(mockSessionPanel.getSQLPaneAPI()).andStubReturn(mockSQLPanelAPI);
mockSQLPanelAPI.addSQLExecutionListener(isA(ISQLExecutionListener.class));
expectLastCall().anyTimes();
mockSQLPanelAPI.removeSQLExecutionListener(isA(ISQLExecutionListener.class));
expectLastCall().anyTimes();