Cache reflection operations in AbstractSchemaAwareTest
[controller.git] / opendaylight / md-sal / sal-binding-dom-it / src / test / java / org / opendaylight / controller / md / sal / binding / data / WildcardedDataChangeListenerTest.java
index 48872a865cb891c49fe625fafb1ce7fdf4b6b8ef..4f11c50e53ddd656749afd6e4913395ec5431ee7 100644 (file)
@@ -13,6 +13,7 @@ import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastor
 import com.google.common.collect.ImmutableSet;
 import com.google.common.util.concurrent.Uninterruptibles;
 import java.util.Collections;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -20,6 +21,7 @@ import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
+import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugmentBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.complex.from.grouping.ContainerWithUses;
@@ -32,7 +34,6 @@ 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.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
 
 /**
  * FIXME: THis test should be moved to compat test-suite
@@ -44,44 +45,43 @@ public class WildcardedDataChangeListenerTest extends AbstractDataTreeChangeList
 
     protected static final InstanceIdentifier<ListViaUses> DEEP_WILDCARDED_PATH = InstanceIdentifier
             .builder(Top.class)
-            .child(TopLevelList.class) //
-            .augmentation(TreeComplexUsesAugment.class) //
-            .child(ListViaUses.class) //
+            .child(TopLevelList.class)
+            .augmentation(TreeComplexUsesAugment.class)
+            .child(ListViaUses.class)
             .build();
 
     private static final InstanceIdentifier<TreeComplexUsesAugment> NODE_0_TCU_PATH = InstanceIdentifier
             .builder(Top.class)
-            .child(TopLevelList.class, TOP_LEVEL_LIST_0_KEY) //
-            .augmentation(TreeComplexUsesAugment.class) //
+            .child(TopLevelList.class, TOP_LEVEL_LIST_0_KEY)
+            .augmentation(TreeComplexUsesAugment.class)
             .build();
 
     private static final InstanceIdentifier<TreeComplexUsesAugment> NODE_1_TCU_PATH = InstanceIdentifier
             .builder(Top.class)
-            .child(TopLevelList.class, TOP_LEVEL_LIST_1_KEY) //
-            .augmentation(TreeComplexUsesAugment.class) //
+            .child(TopLevelList.class, TOP_LEVEL_LIST_1_KEY)
+            .augmentation(TreeComplexUsesAugment.class)
             .build();
 
 
     private static final ListViaUsesKey LIST_VIA_USES_KEY = new ListViaUsesKey("test");
 
-    private static final InstanceIdentifier<ListViaUses> NODE_0_LVU_PATH = NODE_0_TCU_PATH.child(ListViaUses.class, LIST_VIA_USES_KEY);
+    private static final InstanceIdentifier<ListViaUses> NODE_0_LVU_PATH = NODE_0_TCU_PATH.child(ListViaUses.class,
+        LIST_VIA_USES_KEY);
 
-    private static final InstanceIdentifier<ListViaUses> NODE_1_LVU_PATH = NODE_1_TCU_PATH.child(ListViaUses.class, LIST_VIA_USES_KEY);
+    private static final InstanceIdentifier<ListViaUses> NODE_1_LVU_PATH = NODE_1_TCU_PATH.child(ListViaUses.class,
+        LIST_VIA_USES_KEY);
 
     private static final InstanceIdentifier<ContainerWithUses> NODE_0_CWU_PATH =
             NODE_0_TCU_PATH.child(ContainerWithUses.class);
 
-    private static final ContainerWithUses CWU= new ContainerWithUsesBuilder()//
-            .setLeafFromGrouping("some container value") //
-            .build();
+    private static final ContainerWithUses CWU = new ContainerWithUsesBuilder()
+            .setLeafFromGrouping("some container value").build();
 
-    private static final ListViaUses LVU = new ListViaUsesBuilder() //
-            .setKey(LIST_VIA_USES_KEY) //
-            .setName("john")
-            .build();
+    private static final ListViaUses LVU = new ListViaUsesBuilder()
+            .withKey(LIST_VIA_USES_KEY).setName("john").build();
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }