AsyncEventQueueMBean extends NotificationBroadcasterSupport implements AsyncEventQueueMXBean { @Override public boolean isDispatchingPaused() { return bridge.isDispatchingPaused(); } AsyncEventQueueMBean(AsyncEventQueueMBeanBridge bridge); @Override String getAsyncEventListener(); @Override int getBatchSize(); @Override long getBatchTimeInterval(); @Override boolean isBatchConflationEnabled(); @Override String getId(); @Override int getMaximumQueueMemory(); @Override String getOverflowDiskStoreName(); @Override boolean isPersistent(); @Override boolean isPrimary(); @Override boolean isParallel(); @Override int getDispatcherThreads(); @Override String getOrderPolicy(); @Override boolean isDiskSynchronous(); AsyncEventQueueMBeanBridge getBridge(); @Override int getEventQueueSize(); @Override float getLRUEvictionsRate(); @Override long getEntriesOverflowedToDisk(); @Override long getBytesOverflowedToDisk(); void stopMonitor(); @Override boolean isDispatchingPaused();  }
@Test public void asyncEvenQueueCreatedWithDispatcherNotPaused() { asyncEventQueueMBeanBridge = mock(AsyncEventQueueMBeanBridge.class); asyncEventQueueMBean = new AsyncEventQueueMBean(asyncEventQueueMBeanBridge); when(asyncEventQueueMBeanBridge.isDispatchingPaused()).thenReturn(false); assertThat(asyncEventQueueMBean.isDispatchingPaused()).isFalse(); }
@Test public void asyncEvenQueueCreatedWithDispatcherPaused() { asyncEventQueueMBeanBridge = mock(AsyncEventQueueMBeanBridge.class); asyncEventQueueMBean = new AsyncEventQueueMBean(asyncEventQueueMBeanBridge); when(asyncEventQueueMBeanBridge.isDispatchingPaused()).thenReturn(true); assertThat(asyncEventQueueMBean.isDispatchingPaused()).isTrue(); }