diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-04-01 11:39:35 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-04-08 13:39:49 +0200 |
commit | d726d0f173544c8d0078c5f918b5d086f6e85f79 (patch) | |
tree | 640e65411731b3a25abc2e7949de68dc625cf60e /vpp-common/vpp-translate-utils/src/test/java/io/fd | |
parent | 89eeb336aebc92cd34c27b3fa325803c6478a461 (diff) |
HC2VPP-406: fix build errors after ODL bump to neon
This fixes build issues after ODL bump in Honeycomb (HONEYCOMB-443).
Change-Id: I3bf203dd60d12057595b15ce1ad59302dc14e2a0
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'vpp-common/vpp-translate-utils/src/test/java/io/fd')
2 files changed, 6 insertions, 6 deletions
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java index d6bd15735..bedbf8e5d 100644 --- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java +++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java @@ -24,7 +24,7 @@ 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.util.Optional; import io.fd.honeycomb.test.tools.HoneycombTestRunner; import io.fd.honeycomb.test.tools.annotations.InjectTestData; import io.fd.honeycomb.test.tools.annotations.InjectablesProcessor; @@ -102,7 +102,7 @@ public class MultiNamingContextTest implements InjectablesProcessor { .child(MultiNaming.class, new MultiNamingKey("context")); when(mappingContext.read(multiNamingContextIid.child(Mappings.class))).thenReturn(Optional.of(mappings)); - when(mappingContext.read(parentKey(NON_EXISTING_PARENT))).thenReturn(Optional.absent()); + when(mappingContext.read(parentKey(NON_EXISTING_PARENT))).thenReturn(Optional.empty()); when(mappingContext.read(parentKey(PARENT_1))).thenReturn(Optional.of(filterForParent(PARENT_1))); when(mappingContext.read(parentKey(PARENT_2))).thenReturn(Optional.of(filterForParent(PARENT_2))); when(mappingContext.read(parentKey(PARENT_3))).thenReturn(Optional.of(filterForParent(PARENT_3))); diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java index 9c9b0e297..93ae8c9bd 100644 --- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java +++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java @@ -23,7 +23,7 @@ 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.util.Optional; import com.google.common.collect.Lists; import io.fd.honeycomb.test.tools.HoneycombTestRunner; import io.fd.honeycomb.test.tools.annotations.InjectTestData; @@ -110,7 +110,7 @@ public class NamingContextTest implements InjectablesProcessor { @Test public void addNameNoMapings() throws Exception { - when(mappingContext.read(namingContextIid.child(Mappings.class))).thenReturn(Optional.absent()); + when(mappingContext.read(namingContextIid.child(Mappings.class))).thenReturn(Optional.empty()); namingContext.addName("name-0", mappingContext); verify(mappingContext, times(1)) @@ -125,7 +125,7 @@ public class NamingContextTest implements InjectablesProcessor { @Test(expected = IllegalArgumentException.class) public void getAndThrow() { - when(mappingContext.read(any())).thenReturn(Optional.absent()); + when(mappingContext.read(any())).thenReturn(Optional.empty()); namingContext .getIndex("non-existing", mappingContext, () -> new IllegalArgumentException("Non existing index")); } @@ -146,7 +146,7 @@ public class NamingContextTest implements InjectablesProcessor { final Mappings mappings = new MappingsBuilder().setMapping(Lists.newArrayList(mapping1)).build(); when(mappingContext.read(namingContextIid.child(Mappings.class))).thenReturn(Optional.of(mappings)); - assertEquals(Optional.absent(), namingContext.getNameIfPresent(0, mappingContext)); + assertEquals(Optional.empty(), namingContext.getNameIfPresent(0, mappingContext)); } @Test |