summaryrefslogtreecommitdiffstats
path: root/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp')
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java4
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java8
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