BUG-5280: switch transactionIdentifier
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / entityownership / EntityOwnerChangeListenerTest.java
index e13f45640cc73287338b52a3e46007c3f17510e4..0385496cac09c597e218e10071dde164dcc87c1b 100644 (file)
@@ -19,6 +19,7 @@ import static org.opendaylight.controller.cluster.datastore.entityownership.Enti
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.entityPath;
 import org.junit.Before;
 import org.junit.Test;
+import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.datastore.ShardDataTree;
 import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
 import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
@@ -26,6 +27,7 @@ import org.opendaylight.yangtools.yang.common.QName;
 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.DataValidationFailedException;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
 ;
 
 /**
@@ -45,13 +47,14 @@ public class EntityOwnerChangeListenerTest {
     private static final Entity ENTITY1 = new Entity(ENTITY_TYPE, ENTITY_ID1);
     private static final Entity ENTITY2 = new Entity(ENTITY_TYPE, ENTITY_ID2);
 
-    private final ShardDataTree shardDataTree = new ShardDataTree(SchemaContextHelper.entityOwners());
+    private final ShardDataTree shardDataTree = new ShardDataTree(SchemaContextHelper.entityOwners(),
+        TreeType.OPERATIONAL);
     private final EntityOwnershipListenerSupport mockListenerSupport = mock(EntityOwnershipListenerSupport.class);
     private EntityOwnerChangeListener listener;
 
     @Before
     public void setup() {
-        listener = new EntityOwnerChangeListener(LOCAL_MEMBER_NAME, mockListenerSupport);
+        listener = new EntityOwnerChangeListener(MemberName.forName(LOCAL_MEMBER_NAME), mockListenerSupport);
         listener.init(shardDataTree);
     }