X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2FModificationMetadataTreeTest.java;h=0445c47c6bcb29fa3825f9971bd8e50a8b7f9d45;hp=e14699311bd33da365e923c6d76a66c4c6d17009;hb=3f10df4865b301abdeff3d916c0eff22156a6eac;hpb=8baeda4ab8d240f847cd530ef6af7c7c1c2d4d13 diff --git a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/ModificationMetadataTreeTest.java b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/ModificationMetadataTreeTest.java index e14699311b..0445c47c6b 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/ModificationMetadataTreeTest.java +++ b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/ModificationMetadataTreeTest.java @@ -137,11 +137,9 @@ public class ModificationMetadataTreeTest { @Test public void basicReadWrites() { - MutableDataTree modificationTree = MutableDataTree.from( - DataAndMetadataSnapshot.builder() // - .setMetadataTree(StoreMetadataNode.createRecursively(createDocumentOne(), UnsignedLong.valueOf(5))) // - .setSchemaContext(schemaContext) // - .build(), new SchemaAwareApplyOperationRoot(schemaContext)); + MutableDataTree modificationTree = MutableDataTree.from(new DataTree.Snapshot(schemaContext, + StoreMetadataNode.createRecursively(createDocumentOne(), UnsignedLong.valueOf(5))), + new SchemaAwareApplyOperationRoot(schemaContext)); Optional> originalBarNode = modificationTree.read(OUTER_LIST_2_PATH); assertTrue(originalBarNode.isPresent()); assertSame(BAR_NODE, originalBarNode.get()); @@ -166,7 +164,7 @@ public class ModificationMetadataTreeTest { /** * Creates empty Snapshot with associated schema context. */ - DataAndMetadataSnapshot emptySnapshot = DataAndMetadataSnapshot.createEmpty(schemaContext); + DataTree t = DataTree.create(schemaContext); /** * @@ -174,7 +172,7 @@ public class ModificationMetadataTreeTest { * context. * */ - MutableDataTree modificationTree = MutableDataTree.from(emptySnapshot, new SchemaAwareApplyOperationRoot( + MutableDataTree modificationTree = MutableDataTree.from(t.takeSnapshot(), new SchemaAwareApplyOperationRoot( schemaContext)); return modificationTree; }