+ assertNotEquals(DOMNotificationPublishService.REJECTED,
+ testRouter.offerNotification(domNotification, 3, TimeUnit.SECONDS));
+ assertTrue("Listener was not notified", latch.await(5, TimeUnit.SECONDS));
+ assertEquals("Received notifications", 1, testListener.getReceivedNotifications().size());
+
+ assertEquals(DOMNotificationPublishService.REJECTED,
+ testRouter.offerNotification(domNotification, 1, TimeUnit.SECONDS));
+ assertEquals("Received notifications", 1, testListener.getReceivedNotifications().size());
+ }
+ }
+
+ @Test
+ public void close() throws Exception {
+ final DOMNotificationRouter domNotificationRouter = DOMNotificationRouter.create(1024);
+ final ExecutorService executor = domNotificationRouter.executor();
+ final ExecutorService observer = domNotificationRouter.observer();