DOMNotificationRouter implements AutoCloseable, DOMNotificationPublishService,
        DOMNotificationService, DOMNotificationSubscriptionListenerRegistry { @Override public void close() { observer.shutdown(); executor.shutdown(); } @VisibleForTesting  DOMNotificationRouter(int maxQueueCapacity); static DOMNotificationRouter create(int maxQueueCapacity); @Override synchronized ListenerRegistration<T> registerNotificationListener(
            final T listener, final Collection<Absolute> types); @Override ListenerRegistration<L> registerSubscriptionListener(
            final L listener); @Override ListenableFuture<? extends Object> putNotification(final DOMNotification notification); @Override ListenableFuture<? extends Object> offerNotification(final DOMNotification notification); @Override ListenableFuture<? extends Object> offerNotification(final DOMNotification notification, final long timeout,
            final TimeUnit unit); @Override void close();  }
@Test public void close() throws Exception { final DOMNotificationRouter domNotificationRouter = DOMNotificationRouter.create(1024); final ExecutorService executor = domNotificationRouter.executor(); final ExecutorService observer = domNotificationRouter.observer(); assertFalse(executor.isShutdown()); assertFalse(observer.isShutdown()); domNotificationRouter.close(); assertTrue(executor.isShutdown()); assertTrue(observer.isShutdown()); }