@Test void initialize() { verify(this.blockingQueueProvider).initBlockingQueue(); verify(this.jmxRegistration).registerMBean(any(JMXMentions.class), eq("name=mentions")); }
@Override public void initialize() throws InitializationException { try { this.queue = this.blockingQueueProvider.initBlockingQueue(); } catch (Exception e) { throw new InitializationException("Failed to initialize the queue", e); } this.consumers = new ArrayList<>(); JMXMentionsMBean mbean = new JMXMentions(this::getQueueSize, this::clearQueue, () -> this.consumers.size()); this.jmxRegistration.registerMBean(mbean, MBEAN_NAME); }
DefaultMentionsEventExecutor implements MentionsEventExecutor, Initializable, Disposable { @Override public void initialize() throws InitializationException { try { this.queue = this.blockingQueueProvider.initBlockingQueue(); } catch (Exception e) { throw new InitializationException("Failed to initialize the queue", e); } this.consumers = new ArrayList<>(); JMXMentionsMBean mbean = new JMXMentions(this::getQueueSize, this::clearQueue, () -> this.consumers.size()); this.jmxRegistration.registerMBean(mbean, MBEAN_NAME); } }
DefaultMentionsEventExecutor implements MentionsEventExecutor, Initializable, Disposable { @Override public void initialize() throws InitializationException { try { this.queue = this.blockingQueueProvider.initBlockingQueue(); } catch (Exception e) { throw new InitializationException("Failed to initialize the queue", e); } this.consumers = new ArrayList<>(); JMXMentionsMBean mbean = new JMXMentions(this::getQueueSize, this::clearQueue, () -> this.consumers.size()); this.jmxRegistration.registerMBean(mbean, MBEAN_NAME); }  }
DefaultMentionsEventExecutor implements MentionsEventExecutor, Initializable, Disposable { @Override public void initialize() throws InitializationException { try { this.queue = this.blockingQueueProvider.initBlockingQueue(); } catch (Exception e) { throw new InitializationException("Failed to initialize the queue", e); } this.consumers = new ArrayList<>(); JMXMentionsMBean mbean = new JMXMentions(this::getQueueSize, this::clearQueue, () -> this.consumers.size()); this.jmxRegistration.registerMBean(mbean, MBEAN_NAME); }  @Override void initialize(); @Override void startThreads(); @Override void dispose(); @Override void execute(DocumentReference documentReference, DocumentReference authorReference, String version); @Override long getQueueSize(); List<MentionsConsumer> getConsumers(); }
DefaultMentionsEventExecutor implements MentionsEventExecutor, Initializable, Disposable { @Override public void initialize() throws InitializationException { try { this.queue = this.blockingQueueProvider.initBlockingQueue(); } catch (Exception e) { throw new InitializationException("Failed to initialize the queue", e); } this.consumers = new ArrayList<>(); JMXMentionsMBean mbean = new JMXMentions(this::getQueueSize, this::clearQueue, () -> this.consumers.size()); this.jmxRegistration.registerMBean(mbean, MBEAN_NAME); }  @Override void initialize(); @Override void startThreads(); @Override void dispose(); @Override void execute(DocumentReference documentReference, DocumentReference authorReference, String version); @Override long getQueueSize(); List<MentionsConsumer> getConsumers();  }