BUG-5626: use Identifier instead of String
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / compat / PreLithiumShardTest.java
index 1cf45cef01e888504af95dbe4675dcb67d3f858a..79beb15a5abb4e3f43de89f9e7e77bb6e4c129ed 100644 (file)
@@ -16,6 +16,7 @@ import java.util.HashSet;
 import java.util.Set;
 import org.junit.Test;
 import org.opendaylight.controller.cluster.datastore.AbstractShardTest;
+import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
 import org.opendaylight.controller.cluster.datastore.Shard;
 import org.opendaylight.controller.cluster.datastore.ShardTestKit;
 import org.opendaylight.controller.cluster.datastore.modification.MergeModification;
@@ -34,6 +35,7 @@ import org.opendaylight.controller.cluster.raft.utils.InMemoryJournal;
 import org.opendaylight.controller.cluster.raft.utils.InMemorySnapshotStore;
 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
 import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages;
+import org.opendaylight.yangtools.util.StringIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
@@ -49,7 +51,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFac
 public class PreLithiumShardTest extends AbstractShardTest {
 
     private static CompositeModificationPayload newLegacyPayload(final Modification... mods) {
-        MutableCompositeModification compMod = new MutableCompositeModification();
+        MutableCompositeModification compMod = new MutableCompositeModification(DataStoreVersions.HELIUM_2_VERSION);
         for(Modification mod: mods) {
             compMod.addModification(mod);
         }
@@ -58,7 +60,7 @@ public class PreLithiumShardTest extends AbstractShardTest {
     }
 
     private static CompositeModificationByteStringPayload newLegacyByteStringPayload(final Modification... mods) {
-        MutableCompositeModification compMod = new MutableCompositeModification();
+        MutableCompositeModification compMod = new MutableCompositeModification(DataStoreVersions.HELIUM_2_VERSION);
         for(Modification mod: mods) {
             compMod.addModification(mod);
         }
@@ -105,7 +107,8 @@ public class PreLithiumShardTest extends AbstractShardTest {
 
             NormalizedNode<?, ?> node = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
 
-            ApplyState applyState = new ApplyState(null, "test", new ReplicatedLogImplEntry(1, 2,
+            ApplyState applyState = new ApplyState(null, new StringIdentifier("test"),
+                new ReplicatedLogImplEntry(1, 2,
                     newLegacyByteStringPayload(new WriteModification(TestModel.TEST_PATH, node))));
 
             shard.underlyingActor().onReceiveCommand(applyState);