X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2Ftest%2FForwardedNotificationAdapterTest.java;h=cd67d5a4701440fc00e38b0bc0d61d07827e77f9;hp=cf7ad16ad3afdc7c0a340cb646ecda9d2ae8ef25;hb=3ec97cd0a86ad1b79f6854dc6924eb7b06e359a3;hpb=0f518a7ba2c8ceb3b4e9d038faca7c9b315db7d4 diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ForwardedNotificationAdapterTest.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ForwardedNotificationAdapterTest.java index cf7ad16ad3..cd67d5a470 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ForwardedNotificationAdapterTest.java +++ b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ForwardedNotificationAdapterTest.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.util.ArrayList; import java.util.List; +import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; @@ -23,6 +24,7 @@ import org.junit.Assert; import org.junit.Test; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.controller.md.sal.binding.test.AbstractNotificationBrokerTest; +import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.OpendaylightMdsalListTestListener; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.TwoLevelListChanged; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.TwoLevelListChangedBuilder; @@ -30,23 +32,23 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controll import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelListKey; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.binding.YangModuleInfo; -import org.opendaylight.yangtools.yang.binding.util.BindingReflections; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Deprecated public class ForwardedNotificationAdapterTest extends AbstractNotificationBrokerTest { private static final Logger LOG = LoggerFactory.getLogger(ForwardedNotificationAdapterTest.class); @Override - protected Iterable getModuleInfos() throws Exception { + protected Set getModuleInfos() throws Exception { return ImmutableSet.of(BindingReflections.getModuleInfo(TwoLevelListChanged.class)); } - private TwoLevelListChanged createTestData() { + private static TwoLevelListChanged createTestData() { final TwoLevelListChangedBuilder tb = new TwoLevelListChangedBuilder(); - tb.setTopLevelList(ImmutableList.of(new TopLevelListBuilder().setKey(new TopLevelListKey("test")).build())); + tb.setTopLevelList(ImmutableList.of(new TopLevelListBuilder().withKey(new TopLevelListKey("test")).build())); return tb.build(); } @@ -108,15 +110,15 @@ public class ForwardedNotificationAdapterTest extends AbstractNotificationBroker } private static class TestNotifListener implements OpendaylightMdsalListTestListener { - private List receivedNotifications = new ArrayList<>(); - private CountDownLatch latch; + private final List receivedNotifications = new ArrayList<>(); + private final CountDownLatch latch; - public TestNotifListener(CountDownLatch latch) { + TestNotifListener(final CountDownLatch latch) { this.latch = latch; } @Override - public void onTwoLevelListChanged(TwoLevelListChanged notification) { + public void onTwoLevelListChanged(final TwoLevelListChanged notification) { receivedNotifications.add(notification); latch.countDown(); }