@Test public void testUpdate() { NodeBulletinProcessingStrategy nBulletinProcessingStrategy = new NodeBulletinProcessingStrategy(); nBulletinProcessingStrategy.update(new ComponentBulletin(1)); nBulletinProcessingStrategy.update(new ComponentBulletin(2)); nBulletinProcessingStrategy.update(new ComponentBulletin(3)); nBulletinProcessingStrategy.update(new ComponentBulletin(4)); nBulletinProcessingStrategy.update(new ComponentBulletin(5)); assertEquals(5, nBulletinProcessingStrategy.getBulletins().size()); nBulletinProcessingStrategy.update(new ComponentBulletin(1)); nBulletinProcessingStrategy.update(new ComponentBulletin(2)); nBulletinProcessingStrategy.update(new ComponentBulletin(3)); nBulletinProcessingStrategy.update(new ComponentBulletin(4)); nBulletinProcessingStrategy.update(new ComponentBulletin(5)); nBulletinProcessingStrategy.update(new ComponentBulletin(6)); nBulletinProcessingStrategy.update(new ComponentBulletin(7)); assertEquals(NodeBulletinProcessingStrategy.MAX_ENTRIES, nBulletinProcessingStrategy.getBulletins().size()); }
@Override public synchronized void update(final Bulletin bulletin) { ringBuffer.add(bulletin); }
NodeBulletinProcessingStrategy implements BulletinProcessingStrategy { @Override public synchronized void update(final Bulletin bulletin) { ringBuffer.add(bulletin); } }
NodeBulletinProcessingStrategy implements BulletinProcessingStrategy { @Override public synchronized void update(final Bulletin bulletin) { ringBuffer.add(bulletin); }  }
NodeBulletinProcessingStrategy implements BulletinProcessingStrategy { @Override public synchronized void update(final Bulletin bulletin) { ringBuffer.add(bulletin); }  @Override synchronized void update(final Bulletin bulletin); synchronized Set<Bulletin> getBulletins(); }
NodeBulletinProcessingStrategy implements BulletinProcessingStrategy { @Override public synchronized void update(final Bulletin bulletin) { ringBuffer.add(bulletin); }  @Override synchronized void update(final Bulletin bulletin); synchronized Set<Bulletin> getBulletins();  }