X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-it%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Ftest%2Fsal%2Fbinding%2Fit%2FNotificationIT.java;h=db978dbeec8b8861441800713939bb0f6be3c531;hp=1a950a10623c5e9b7a5a2c5cdcf02460233bac3d;hb=e4550bea5b9d5589b1937d5a4496abde2f476b2e;hpb=1da4f8be48cca9621b790c486528bb28c1cae0c7 diff --git a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NotificationIT.java b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NotificationIT.java index 1a950a1062..db978dbeec 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NotificationIT.java +++ b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NotificationIT.java @@ -14,7 +14,6 @@ import java.util.ArrayList; import java.util.List; import org.junit.Test; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer; import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; @@ -64,13 +63,10 @@ public class NotificationIT extends AbstractIT { LOG.info("The registration of the Consumer 1. It retrieves Notification Service " + "from MD-SAL and registers OpendaylightTestNotificationListener as notification listener"); - BindingAwareConsumer consumer1 = new BindingAwareConsumer() { - @Override - public void onSessionInitialized(ConsumerContext session) { - NotificationService notificationService = session.getSALService(NotificationService.class); - assertNotNull(notificationService); - listener1Reg = notificationService.registerNotificationListener(listener1); - } + BindingAwareConsumer consumer1 = session -> { + NotificationService notificationService = session.getSALService(NotificationService.class); + assertNotNull(notificationService); + listener1Reg = notificationService.registerNotificationListener(listener1); }; // registerConsumer method calls onSessionInitialized method above broker.registerConsumer(consumer1); @@ -93,14 +89,8 @@ public class NotificationIT extends AbstractIT { LOG.info("The registration of the Consumer 2. SalFlowListener is registered " + "registered as notification listener."); - BindingAwareProvider provider = new BindingAwareProvider() { - - @Override - public void onSessionInitiated(ProviderContext session) { - listener2Reg = session.getSALService(NotificationProviderService.class).registerNotificationListener( - listener2); - } - }; + BindingAwareProvider provider = session -> listener2Reg = session.getSALService(NotificationProviderService.class).registerNotificationListener( + listener2); // registerConsumer method calls onSessionInitialized method above broker.registerProvider(provider);