BUG-5280: expand ShardDataTree to cover transaction mechanics
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / entityownership / DistributedEntityOwnershipServiceTest.java
index 6d092cf8692929098d9ee1207043a98ff2e3397f..52adc5af42c3fa3d0911055cf2d69b24f3df8d2a 100644 (file)
@@ -41,6 +41,7 @@ import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.datastore.DatastoreContext;
 import org.opendaylight.controller.cluster.datastore.DatastoreContextFactory;
 import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
+import org.opendaylight.controller.cluster.datastore.Shard;
 import org.opendaylight.controller.cluster.datastore.ShardDataTree;
 import org.opendaylight.controller.cluster.datastore.config.Configuration;
 import org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl;
@@ -220,7 +221,9 @@ public class DistributedEntityOwnershipServiceTest extends AbstractEntityOwnersh
         DistributedEntityOwnershipService service = spy(DistributedEntityOwnershipService.start(
             dataStore.getActorContext(), EntityOwnerSelectionStrategyConfig.newBuilder().build()));
 
-        ShardDataTree shardDataTree = new ShardDataTree(SchemaContextHelper.entityOwners(), TreeType.OPERATIONAL);
+        final Shard mockShard = Mockito.mock(Shard.class);
+        ShardDataTree shardDataTree = new ShardDataTree(mockShard, SchemaContextHelper.entityOwners(),
+            TreeType.OPERATIONAL);
 
         when(service.getLocalEntityOwnershipShardDataTree()).thenReturn(shardDataTree.getDataTree());