From 8acc5613345d9c50d0f33c3d74ae64e474b80724 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Thu, 4 Jan 2018 07:08:34 +0100 Subject: HONEYCOMB-424: bump ODL dependencies to Oxygen Change-Id: I3160e5df4e66b3b3c732619fc1fc7599459fda76 Signed-off-by: Marek Gradzki --- .../data/impl/ModifiableDataTreeDelegatorTest.java | 3 +- .../honeycomb/data/impl/ModificationBaseTest.java | 19 ++++++------ .../impl/ModificationDiffAugRewriteDeleteTest.java | 10 +++---- ...ModificationDiffNestedAugRewriteDeleteTest.java | 10 +++---- .../impl/ModificationDiffRewriteDeleteTest.java | 12 ++++---- .../honeycomb/data/impl/ModificationDiffTest.java | 34 +++++++++++----------- .../data/impl/PersistingDataTreeAdapterTest.java | 6 ++-- 7 files changed, 47 insertions(+), 47 deletions(-) (limited to 'infra/data-impl/src/test/java/io') diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegatorTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegatorTest.java index 56c0c610f..3065a94ff 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegatorTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegatorTest.java @@ -63,7 +63,8 @@ public class ModifiableDataTreeDelegatorTest extends ModifiableDataTreeDelegator assertEquals(normalizedNodeOptional, normalizedNodeOptional2); assertTrue(normalizedNodeOptional.isPresent()); assertEquals(topContainer, normalizedNodeOptional.get()); - assertEquals(dataTree.takeSnapshot().readNode(TOP_CONTAINER_ID), normalizedNodeOptional); + // FIXMe use toJavaUtil everywhere + assertEquals(dataTree.takeSnapshot().readNode(TOP_CONTAINER_ID), Optional.toJavaUtil(normalizedNodeOptional)); } @Test diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java index 7e9c34dfa..666386d43 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java @@ -36,11 +36,10 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateTip; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguration; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType; import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; @@ -63,8 +62,8 @@ abstract class ModificationBaseTest extends ModificationMetadata { dataTree.commit(prepare); } - protected TipProducingDataTree getDataTree() throws ReactorException { - final TipProducingDataTree dataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.CONFIGURATION); + protected DataTree getDataTree() throws ReactorException { + final DataTree dataTree = new InMemoryDataTreeFactory().create(DataTreeConfiguration.DEFAULT_CONFIGURATION); dataTree.setSchemaContext(getSchemaCtx()); return dataTree; } @@ -126,16 +125,16 @@ abstract class ModificationBaseTest extends ModificationMetadata { } SchemaContext getSchemaCtx() throws ReactorException { - return YangParserTestUtils.parseYangSources(Collections.singletonList("/test-diff.yang")); + return YangParserTestUtils.parseYangResource("/test-diff.yang"); } - DataTreeModification getModification(final TipProducingDataTree dataTree) { + DataTreeModification getModification(final DataTree dataTree) { final DataTreeSnapshot dataTreeSnapshot = dataTree.takeSnapshot(); return dataTreeSnapshot.newModification(); } - DataTreeCandidateTip prepareModification(final TipProducingDataTree dataTree, + DataTreeCandidateTip prepareModification(final DataTree dataTree, final DataTreeModification dataTreeModification) throws DataValidationFailedException { dataTreeModification.ready(); @@ -329,9 +328,9 @@ abstract class ModificationBaseTest extends ModificationMetadata { .build()).build()).build(); } - TipProducingDataTree prepareStateBeforeWithTopContainer(final NormalizedNode topContainerData) + DataTree prepareStateBeforeWithTopContainer(final NormalizedNode topContainerData) throws ReactorException, DataValidationFailedException { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModificationOriginal = getModification(dataTree); // non presence, but with valid child list dataTreeModificationOriginal.write(TOP_CONTAINER_ID, topContainerData); @@ -340,7 +339,7 @@ abstract class ModificationBaseTest extends ModificationMetadata { return dataTree; } - DataTreeCandidateTip prepareStateAfterEmpty(final TipProducingDataTree dataTree) + DataTreeCandidateTip prepareStateAfterEmpty(final DataTree dataTree) throws DataValidationFailedException { final NormalizedNode topContainerModified = Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffAugRewriteDeleteTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffAugRewriteDeleteTest.java index c2b959809..eeef85ecc 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffAugRewriteDeleteTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffAugRewriteDeleteTest.java @@ -22,9 +22,9 @@ import static org.hamcrest.MatcherAssert.assertThat; import com.google.common.collect.ImmutableSet; import org.junit.Test; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateTip; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree; import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.slf4j.Logger; @@ -37,7 +37,7 @@ public class ModificationDiffAugRewriteDeleteTest extends ModificationBaseTest { @Test public void testWriteNonPresenceNonEmptyContainerAugWithLeaf() throws ReactorException, DataValidationFailedException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithLeafUnderAug("val")) .build()); @@ -58,7 +58,7 @@ public class ModificationDiffAugRewriteDeleteTest extends ModificationBaseTest { @Test public void testWriteNonPresenceNonEmptyContainerAugWithList() throws ReactorException, DataValidationFailedException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithListUnderAug("val")) .build()); @@ -79,7 +79,7 @@ public class ModificationDiffAugRewriteDeleteTest extends ModificationBaseTest { @Test public void testWriteNonPresenceNonEmptyContainerAugWithNonPresenceContainer() throws ReactorException, DataValidationFailedException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithContUnderAug("val")) .build()); @@ -100,7 +100,7 @@ public class ModificationDiffAugRewriteDeleteTest extends ModificationBaseTest { @Test public void testWriteNonPresenceNonEmptyContainerAugWithLeafList() throws ReactorException, DataValidationFailedException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithLeafListUnderAug("val")) .build()); diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffNestedAugRewriteDeleteTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffNestedAugRewriteDeleteTest.java index 9c92b4f85..071701d94 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffNestedAugRewriteDeleteTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffNestedAugRewriteDeleteTest.java @@ -22,9 +22,9 @@ import static org.hamcrest.MatcherAssert.assertThat; import com.google.common.collect.ImmutableSet; import org.junit.Test; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateTip; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree; import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.slf4j.Logger; @@ -37,7 +37,7 @@ public class ModificationDiffNestedAugRewriteDeleteTest extends ModificationBase @Test public void testWriteNonPresenceNonEmptyContainerNestedAugWithContainer() throws DataValidationFailedException, ReactorException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithContainerUnderNestedAug("val")) .build()); @@ -58,7 +58,7 @@ public class ModificationDiffNestedAugRewriteDeleteTest extends ModificationBase @Test public void testWriteNonPresenceNonEmptyContainerNestedAugWithLeafList() throws DataValidationFailedException, ReactorException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithLeafListUnderNestedAug("val")) .build()); @@ -79,7 +79,7 @@ public class ModificationDiffNestedAugRewriteDeleteTest extends ModificationBase @Test public void testWriteNonPresenceNonEmptyContainerNestedAugWithList() throws DataValidationFailedException, ReactorException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithListUnderNestedAug("val")) .build()); @@ -100,7 +100,7 @@ public class ModificationDiffNestedAugRewriteDeleteTest extends ModificationBase @Test public void testWriteNonPresenceNonEmptyContainerNestedAugWithLeaf() throws DataValidationFailedException, ReactorException { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedContWithLeafUnderNestedAug("val")) .build()); diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffRewriteDeleteTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffRewriteDeleteTest.java index a1ede9691..0be681c66 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffRewriteDeleteTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffRewriteDeleteTest.java @@ -23,8 +23,8 @@ import com.google.common.collect.ImmutableSet; import org.junit.Test; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateTip; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree; import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +40,7 @@ public class ModificationDiffRewriteDeleteTest extends ModificationBaseTest { @Test public void testWriteNonPresenceNonEmptyContainerPreviousDataOverrideByEmpty() throws Exception { final MapEntryNode alreadyPresent = getNestedListEntry("value", "txt"); - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) .withChild(getNestedList(alreadyPresent)) .build()); @@ -66,7 +66,7 @@ public class ModificationDiffRewriteDeleteTest extends ModificationBaseTest { @Test public void testWriteNonPresenceMultipleNonEmptyContainerPreviousDataOverrideByEmpty() throws Exception { final MapEntryNode alreadyPresent = getNestedListInContainerEntry("key"); - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) // another non-presence container with list entry .withChild(Builders.containerBuilder() @@ -97,7 +97,7 @@ public class ModificationDiffRewriteDeleteTest extends ModificationBaseTest { */ @Test public void testWriteNonPresenceNonEmptyContainerLeaf() throws Exception { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) // another non-presence container with leaf .withChild(Builders.containerBuilder() @@ -127,7 +127,7 @@ public class ModificationDiffRewriteDeleteTest extends ModificationBaseTest { */ @Test public void testWriteNonPresenceNonEmptyContainerLeafList() throws Exception { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) // another non-presence container with leaf .withChild(getNestedContainerWithLeafList()) @@ -152,7 +152,7 @@ public class ModificationDiffRewriteDeleteTest extends ModificationBaseTest { */ @Test public void testWriteNonPresenceNonEmptyContainerWithChoice() throws Exception { - final TipProducingDataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() + final DataTree dataTree = prepareStateBeforeWithTopContainer(Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) // another non-presence container with leaf .withChild(getNestedContainerWithChoice("val")) diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffTest.java index cd980dd1e..546bb05e0 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationDiffTest.java @@ -22,19 +22,19 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; -import com.google.common.base.Optional; import com.google.common.collect.ImmutableSet; import java.util.Map; +import java.util.Optional; import org.junit.Test; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.MapNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateTip; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree; import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.slf4j.Logger; @@ -46,7 +46,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testInitialWrite() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); final NormalizedNode topContainer = getTopContainer("string1"); final YangInstanceIdentifier TOP_CONTAINER_ID = YangInstanceIdentifier.of(TOP_CONTAINER_QNAME); @@ -62,7 +62,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testLeafList() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); final ContainerNode topContainer = getTopContainerWithLeafList("string1", "string2"); final YangInstanceIdentifier TOP_CONTAINER_ID = YangInstanceIdentifier.of(TOP_CONTAINER_QNAME); @@ -80,7 +80,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testWritePresenceEmptyContainer() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); final NormalizedNode presenceContainer = Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(PRESENCE_CONTAINER_QNAME)) @@ -104,7 +104,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testInitialWriteForContainerWithChoice() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); final ContainerNode containerWithChoice = Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(WITH_CHOICE_CONTAINER_QNAME)) @@ -128,7 +128,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testWriteNonPresenceEmptyContainer() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); final NormalizedNode topContainer = ImmutableNodes.containerNode(TOP_CONTAINER_QNAME); dataTreeModification.write(TOP_CONTAINER_ID, topContainer); @@ -144,7 +144,7 @@ public class ModificationDiffTest extends ModificationBaseTest { */ @Test public void testWriteNonPresenceNonEmptyContainer() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); // non presence ,but with valid child list final NormalizedNode topContainer = Builders.containerBuilder() @@ -167,7 +167,7 @@ public class ModificationDiffTest extends ModificationBaseTest { */ @Test public void testWriteNonPresenceNonEmptyContainerPreviousData() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModificationOriginal = getModification(dataTree); // non presence, but with valid child list final MapEntryNode alreadyPresent = getNestedListEntry("value", "txt"); @@ -200,7 +200,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testWriteNonPresenceEmptyNestedContainer() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final DataTreeModification dataTreeModification = getModification(dataTree); final NormalizedNode topContainer = Builders.containerBuilder() .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TOP_CONTAINER_QNAME)) @@ -220,7 +220,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testUpdateWrite() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final ContainerNode topContainer = getTopContainer("string1"); addNodeToTree(dataTree, topContainer, TOP_CONTAINER_ID); @@ -239,7 +239,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testUpdateMerge() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final ContainerNode topContainer = getTopContainer("string1"); addNodeToTree(dataTree, topContainer, TOP_CONTAINER_ID); @@ -256,7 +256,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testUpdateDelete() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); final ContainerNode topContainer = getTopContainer("string1"); addNodeToTree(dataTree, topContainer, TOP_CONTAINER_ID); @@ -272,7 +272,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testWriteAndUpdateInnerList() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); DataTreeSnapshot dataTreeSnapshot = dataTree.takeSnapshot(); DataTreeModification dataTreeModification = dataTreeSnapshot.newModification(); @@ -316,7 +316,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testWriteTopContainerAndInnerList() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); DataTreeSnapshot dataTreeSnapshot = dataTree.takeSnapshot(); DataTreeModification dataTreeModification = dataTreeSnapshot.newModification(); @@ -353,7 +353,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testWriteDeepList() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); DataTreeSnapshot dataTreeSnapshot = dataTree.takeSnapshot(); DataTreeModification dataTreeModification = dataTreeSnapshot.newModification(); @@ -412,7 +412,7 @@ public class ModificationDiffTest extends ModificationBaseTest { @Test public void testDeleteInnerListItem() throws Exception { - final TipProducingDataTree dataTree = getDataTree(); + final DataTree dataTree = getDataTree(); DataTreeSnapshot dataTreeSnapshot = dataTree.takeSnapshot(); DataTreeModification dataTreeModification = dataTreeSnapshot.newModification(); diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java index 7e135a259..dba707785 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java @@ -27,10 +27,10 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.google.common.base.Optional; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Optional; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; @@ -83,7 +83,7 @@ public class PersistingDataTreeAdapterTest { public void testPersist() throws Exception { persistingDataTreeAdapter = new PersistingDataTreeAdapter(delegatingDataTree, persister); final DataTreeSnapshot snapshot = mock(DataTreeSnapshot.class); - when(snapshot.readNode(any())).thenReturn(Optional.absent()); + when(snapshot.readNode(any())).thenReturn(Optional.empty()); when(delegatingDataTree.takeSnapshot()).thenReturn(snapshot); persistingDataTreeAdapter.commit(mock(DataTreeCandidate.class)); verify(delegatingDataTree).takeSnapshot(); @@ -126,7 +126,7 @@ public class PersistingDataTreeAdapterTest { final PersistingDataTreeAdapter.JsonPersister jsonPersister = new PersistingDataTreeAdapter.JsonPersister(tmpPersistFile, schemaService); // Nothing - jsonPersister.persistCurrentData(Optional.absent()); + jsonPersister.persistCurrentData(Optional.empty()); // Exception jsonPersister.persistCurrentData(Optional.of(ImmutableNodes.leafNode(QName.create("namespace", "leaf"), "value"))); } -- cgit 1.2.3-korg