+ @Test
+ public void registerNotificationListener() {
+ final var domNotificationRouter = new DOMNotificationRouter(1024);
+ final var domNotificationListener = mock(DOMNotificationListener.class);
+
+ domNotificationRouter.registerNotificationListener(domNotificationListener,
+ List.of(Absolute.of(QName.create("urn:opendaylight:test-listener", "notif1"))));
+ assertEquals(1, domNotificationRouter.listeners().size());
+
+ domNotificationRouter.registerNotificationListener(domNotificationListener,
+ List.of(Absolute.of(QName.create("urn:opendaylight:test-listener", "notif2")),
+ Absolute.of(QName.create("urn:opendaylight:test-listener", "notif3"))));
+ assertEquals(3, domNotificationRouter.listeners().size());
+ }
+
+ @Test
+ public void registerNotificationListeners() {
+ final var domNotificationRouter = new DOMNotificationRouter(1024);
+ final var domNotificationListener1 = mock(DOMNotificationListener.class);
+ final var domNotificationListener2 = mock(DOMNotificationListener.class);
+
+ domNotificationRouter.registerNotificationListeners(
+ Map.of(Absolute.of(QName.create("urn:opendaylight:test-listener", "notif1")), domNotificationListener1,
+ Absolute.of(QName.create("urn:opendaylight:test-listener", "notif2")), domNotificationListener2));
+ assertEquals(2, domNotificationRouter.listeners().size());
+ }
+