- final DataTree source = setupInMemorySnapshotStore();
- final DataTreeModification writeMod = source.takeSnapshot().newModification();
- ContainerNode node = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
+ final DataTree store = InMemoryDataTreeFactory.getInstance().create(TreeType.OPERATIONAL);
+ store.setSchemaContext(SCHEMA_CONTEXT);
+ writeToStore(store, TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME));
+
+ final NormalizedNode<?, ?> root = readStore(store, YangInstanceIdentifier.EMPTY);
+ final Snapshot snapshot = Snapshot.create(new MetadataShardDataTreeSnapshot(root).serialize(),
+ Collections.<ReplicatedLogEntry> emptyList(), 1, 2, 3, 4);
+
+ shard.tell(new ApplySnapshot(snapshot), ActorRef.noSender());
+
+ final DataTreeModification writeMod = store.takeSnapshot().newModification();
+ final ContainerNode node = ImmutableNodes.containerNode(TestModel.TEST_QNAME);