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;
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;
;
/**
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);
}