use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.TwoLevelListChanged in project controller by opendaylight.
the class ForwardedNotificationAdapterTest method testNotifSubscription.
@Test
public void testNotifSubscription() throws InterruptedException {
final CountDownLatch latch = new CountDownLatch(1);
final TwoLevelListChanged testData = createTestData();
final TestNotifListener testNotifListener = new TestNotifListener(latch);
final ListenerRegistration<TestNotifListener> listenerRegistration = getNotificationService().registerNotificationListener(testNotifListener);
getNotificationPublishService().putNotification(testData);
latch.await();
assertTrue(testNotifListener.getReceivedNotifications().size() == 1);
assertEquals(testData, testNotifListener.getReceivedNotifications().get(0));
listenerRegistration.close();
}
Aggregations