Migrate from YangInstanceIdentifier.EMPTY
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / utils / MockConfiguration.java
index b5b880265f471a27bb8da9093595000997a8749c..76f1ec20f2f5322c55fe648d5ff6e9a028137ce5 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.datastore.utils;
 
 import java.util.Arrays;
@@ -17,6 +16,8 @@ import java.util.stream.Collectors;
 import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl;
 import org.opendaylight.controller.cluster.datastore.config.ModuleConfig;
+import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategy;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
 
 public class MockConfiguration extends ConfigurationImpl {
     public MockConfiguration() {
@@ -26,7 +27,7 @@ public class MockConfiguration extends ConfigurationImpl {
     public MockConfiguration(final Map<String, List<String>> shardMembers) {
         super(configuration -> {
             Map<String, ModuleConfig.Builder> retMap = new HashMap<>();
-            for(Map.Entry<String, List<String>> e : shardMembers.entrySet()) {
+            for (Map.Entry<String, List<String>> e : shardMembers.entrySet()) {
                 String shardName = e.getKey();
                 retMap.put(shardName,
                     ModuleConfig.builder(shardName).shardConfig(
@@ -36,4 +37,9 @@ public class MockConfiguration extends ConfigurationImpl {
             return retMap;
         });
     }
+
+    @Override
+    public ShardStrategy getStrategyForPrefix(final DOMDataTreeIdentifier prefix) {
+        return null;
+    }
 }