@Test public void ensureCanSendMessagesWhenNoListeners() { final EntityChangeBroker broker = new EntityChangeBroker(); final EntityChangeEmitter emitter = broker.getEmitter(); emitter.entityAdded( new A() ); emitter.entityRemoved( new A() ); emitter.attributeChanged( new A(), ATTR_KEY, 42 ); emitter.relatedAdded( new A(), REL_KEY, new B() ); emitter.relatedRemoved( new A(), REL_KEY, new B() ); assertTrue( true ); }
@Nonnull EntityChangeEmitter getEmitter() { return _emitter; }
EntityChangeBroker { @Nonnull EntityChangeEmitter getEmitter() { return _emitter; } }
EntityChangeBroker { @Nonnull EntityChangeEmitter getEmitter() { return _emitter; } EntityChangeBroker(); }
EntityChangeBroker { @Nonnull EntityChangeEmitter getEmitter() { return _emitter; } EntityChangeBroker(); void addChangeListener( @Nonnull final EntityChangeListener listener ); void addChangeListener( @Nonnull final Class<?> clazz,
                                 @Nonnull final EntityChangeListener listener ); void addChangeListener( @Nonnull final Object entity, @Nonnull final EntityChangeListener listener ); void removeChangeListener( @Nonnull final EntityChangeListener listener ); void removeChangeListener( @Nonnull final Object entity, @Nonnull final EntityChangeListener listener ); void removeAllChangeListeners( @Nonnull final Object object ); void removeChangeListener( @Nonnull final Class<?> clazz,
                                    @Nonnull final EntityChangeListener listener ); void purgeChangeListener( @Nonnull final EntityChangeListener listener ); @Nonnull EntityBrokerLock pause(); boolean isPaused(); boolean isEnabled(); }
EntityChangeBroker { @Nonnull EntityChangeEmitter getEmitter() { return _emitter; } EntityChangeBroker(); void addChangeListener( @Nonnull final EntityChangeListener listener ); void addChangeListener( @Nonnull final Class<?> clazz,
                                 @Nonnull final EntityChangeListener listener ); void addChangeListener( @Nonnull final Object entity, @Nonnull final EntityChangeListener listener ); void removeChangeListener( @Nonnull final EntityChangeListener listener ); void removeChangeListener( @Nonnull final Object entity, @Nonnull final EntityChangeListener listener ); void removeAllChangeListeners( @Nonnull final Object object ); void removeChangeListener( @Nonnull final Class<?> clazz,
                                    @Nonnull final EntityChangeListener listener ); void purgeChangeListener( @Nonnull final EntityChangeListener listener ); @Nonnull EntityBrokerLock pause(); boolean isPaused(); boolean isEnabled();  }