@Test
public void testSailChangedListeners() throws Exception {
if (sail instanceof NotifyingSail) {
final Collection<SailChangedEvent> events = new LinkedList<SailChangedEvent>();
SailChangedListener listener = new SailChangedListener() {
public void sailChanged(final SailChangedEvent event) {
events.add(event);
}
};
((NotifyingSail) sail).addSailChangedListener(listener);