sal-binding-it: use lambdas
[controller.git] / opendaylight / md-sal / sal-binding-it / src / test / java / org / opendaylight / controller / test / sal / binding / it / DataServiceIT.java
index 717aa63..fc92567 100644 (file)
@@ -13,7 +13,6 @@ import static org.junit.Assert.assertNull;
 import java.util.concurrent.Future;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer;
 import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
@@ -42,13 +41,7 @@ public class DataServiceIT extends AbstractIT {
      */
     @Test
     public void test() throws Exception {
-        BindingAwareConsumer consumer = new BindingAwareConsumer() {
-
-            @Override
-            public void onSessionInitialized(final ConsumerContext session) {
-                consumerDataService = session.getSALService(DataBrokerService.class);
-            }
-        };
+        BindingAwareConsumer consumer = session -> consumerDataService = session.getSALService(DataBrokerService.class);
 
         broker.registerConsumer(consumer);
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.