});
// =====================================================================
// Test Expectations
// =====================================================================
RemovalListenerList list = new RemovalListenerList();
list.addListener(listenerMock1);
list.addListener(listenerMock2);
list.addListener(listenerMock3);
// Make sure that they have been added properly.
list.dispatchRemovedEntryEvent(entryMock);
// Remove the middle one and make sure that the content are correct.
list.removeListener(listenerMock2);
list.dispatchRemovedEntryEvent(entryMock);
// Remove the last one and make sure that the content are correct.
list.removeListener(listenerMock3);
list.dispatchRemovedEntryEvent(entryMock);
// Remove the remaining one and make sure that the content are correct.
list.removeListener(listenerMock1);
list.dispatchRemovedEntryEvent(entryMock);
}