summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/lisp2vpp/src/test/java')
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutorTest.java116
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutorTest.java99
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutorTest.java88
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutorTest.java133
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutorTest.java83
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/trait/MappingReaderTest.java (renamed from lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/trait/MappingFilterProviderTest.java)2
6 files changed, 1 insertions, 520 deletions
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutorTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutorTest.java
deleted file mode 100644
index c2cd99490..000000000
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutorTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import static io.fd.honeycomb.lisp.translate.read.dump.executor.params.LocatorDumpParams.LocatorDumpParamsBuilder;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import com.google.common.collect.ImmutableList;
-import io.fd.honeycomb.lisp.translate.read.dump.executor.params.LocatorDumpParams;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.vpp.test.read.JvppDumpExecutorTest;
-import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDump;
-import java.util.concurrent.TimeoutException;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mockito;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.locator.sets.grouping.locator.sets.LocatorSet;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class LocatorDumpExecutorTest extends JvppDumpExecutorTest<LocatorDumpExecutor> {
-
- @Captor
- private ArgumentCaptor<LispLocatorDump> requestCaptor;
-
- private InstanceIdentifier identifier;
- private LispLocatorDetailsReplyDump validDump;
-
- @Before
- public void init() {
- identifier = InstanceIdentifier.create(LocatorSet.class);
- validDump = new LispLocatorDetailsReplyDump();
- LispLocatorDetails detail = new LispLocatorDetails();
-
- detail.swIfIndex = 1;
- detail.priority = 2;
- detail.local = 1;
- detail.weight = 3;
- detail.isIpv6 = 0;
- detail.context = 8;
- detail.ipAddress = new byte[]{-64, -88, 4, 2};
-
- validDump.lispLocatorDetails = ImmutableList.of(detail);
- }
-
- @Test
- public void testExecuteDumpTimeout() throws Exception {
- doThrowTimeoutExceptionWhen().lispLocatorDump(Mockito.any());
- try {
- getExecutor().executeDump(identifier, new LocatorDumpParamsBuilder().build());
- } catch (Exception e) {
- assertTrue(e instanceof ReadFailedException);
- assertTrue(e.getCause() instanceof TimeoutException);
- assertEquals(identifier, ((ReadFailedException) e).getFailedId());
- return;
- }
- fail("Test should have thrown exception");
- }
-
- @Test
- public void testExecuteDumpHalted() throws ReadFailedException {
- doThrowFailExceptionWhen().lispLocatorDump(Mockito.any());
- try {
- getExecutor().executeDump(identifier, new LocatorDumpParamsBuilder().build());
- } catch (ReadFailedException e) {
- assertTrue(e.getCause() instanceof VppCallbackException);
- assertEquals(identifier, ((ReadFailedException) e).getFailedId());
- return;
- }
- fail("Test should have thrown ReadFailedException");
- }
-
- @Test
- public void testExecuteDump() throws ReadFailedException {
- doReturnResponseWhen(validDump).lispLocatorDump(Mockito.any());
-
- final LocatorDumpParams params = new LocatorDumpParamsBuilder().setLocatorSetIndex(5).build();
-
- final LispLocatorDetailsReplyDump reply = getExecutor().executeDump(identifier, params);
- verify(api, times(1)).lispLocatorDump(requestCaptor.capture());
-
- final LispLocatorDump request = requestCaptor.getValue();
-
- //check passed params
- assertNotNull(request);
- assertEquals(5, request.lsIndex);
-
- //check result
- assertNotNull(reply);
- assertEquals(1, reply.lispLocatorDetails.size());
-
- final LispLocatorDetails details = reply.lispLocatorDetails.get(0);
- assertEquals(1, details.swIfIndex);
- assertEquals(2, details.priority);
- assertEquals(1, details.local);
- assertEquals(3, details.weight);
- assertEquals(0, details.isIpv6);
- assertEquals(8, details.context);
- assertArrayEquals(new byte[]{-64, -88, 4, 2}, details.ipAddress);
- }
-
- @Override
- protected LocatorDumpExecutor initExecutor() {
- return new LocatorDumpExecutor(api);
- }
-} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutorTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutorTest.java
deleted file mode 100644
index 3b47e9b9c..000000000
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutorTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import com.google.common.collect.ImmutableList;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.vpp.test.read.JvppDumpExecutorTest;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDump;
-import java.nio.charset.StandardCharsets;
-import java.util.concurrent.TimeoutException;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.locator.sets.grouping.locator.sets.LocatorSet;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class LocatorSetsDumpExecutorTest extends JvppDumpExecutorTest<LocatorSetsDumpExecutor> {
-
- public static final byte[] LOCATOR_SET_NAME_BYTES = "loc-set".getBytes(StandardCharsets.UTF_8);
-
- private LispLocatorSetDetailsReplyDump validDump;
-
- @Captor
- private ArgumentCaptor<LispLocatorSetDump> requestCaptor;
-
- private InstanceIdentifier identifier;
-
- @Before
- public void init() {
- identifier = InstanceIdentifier.create(LocatorSet.class);
- validDump = new LispLocatorSetDetailsReplyDump();
- LispLocatorSetDetails detail = new LispLocatorSetDetails();
- detail.lsIndex = 2;
- detail.lsName = LOCATOR_SET_NAME_BYTES;
- detail.context = 4;
-
- validDump.lispLocatorSetDetails = ImmutableList.of(detail);
- }
-
- @Test
- public void testExecuteDumpTimeout() throws Exception {
- doThrowTimeoutExceptionWhen().lispLocatorSetDump(any());
- try {
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- } catch (Exception e) {
- assertTrue(e instanceof ReadFailedException);
- assertTrue(e.getCause() instanceof TimeoutException);
- return;
- }
- fail("Test should have thrown exception");
- }
-
- @Test(expected = ReadFailedException.class)
- public void testExecuteDumpHalted() throws ReadFailedException {
- doThrowFailExceptionWhen().lispLocatorSetDump(any());
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- }
-
- @Test
- public void testExecuteDump() throws ReadFailedException {
- doReturnResponseWhen(validDump).lispLocatorSetDump(any());
-
- final LispLocatorSetDetailsReplyDump replyDump =
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- verify(api, times(1)).lispLocatorSetDump(requestCaptor.capture());
-
- final LispLocatorSetDump request = requestCaptor.getValue();
-
- assertNotNull(request);
- assertEquals(1, request.filter);
-
- assertNotNull(replyDump);
- assertNotNull(replyDump.lispLocatorSetDetails);
- assertEquals(1, replyDump.lispLocatorSetDetails.size());
- final LispLocatorSetDetails detail = replyDump.lispLocatorSetDetails.get(0);
-
- assertNotNull(detail);
- assertEquals(4, detail.context);
- assertEquals(2, detail.lsIndex);
- assertEquals(LOCATOR_SET_NAME_BYTES, detail.lsName);
- }
-
- @Override
- protected LocatorSetsDumpExecutor initExecutor() {
- return new LocatorSetsDumpExecutor(api);
- }
-} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutorTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutorTest.java
deleted file mode 100644
index a3c6cbe45..000000000
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutorTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import com.google.common.collect.ImmutableList;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.vpp.test.read.JvppDumpExecutorTest;
-import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetails;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetailsReplyDump;
-import java.util.concurrent.TimeoutException;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.map.resolvers.grouping.map.resolvers.MapResolver;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class MapResolversDumpExecutorTest extends JvppDumpExecutorTest<MapResolversDumpExecutor> {
-
- private LispMapResolverDetailsReplyDump validDump;
-
- private InstanceIdentifier identifier;
-
- @Before
- public void init() {
- identifier = InstanceIdentifier.create(MapResolver.class);
- validDump = new LispMapResolverDetailsReplyDump();
- final LispMapResolverDetails details = new LispMapResolverDetails();
- details.isIpv6 = 0;
- details.ipAddress = new byte[]{-64, -88, 5, 4};
- details.context = 7;
-
- validDump.lispMapResolverDetails = ImmutableList.of(details);
- }
-
- @Test
- public void testExecuteDumpTimeout() throws Exception {
- doThrowTimeoutExceptionWhen().lispMapResolverDump(Mockito.any());
- try {
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- } catch (ReadFailedException e) {
- assertTrue(e.getCause() instanceof TimeoutException);
- assertEquals(identifier, ((ReadFailedException) e).getFailedId());
- return;
- }
- fail("Test should have thrown ReadFailedException");
- }
-
- @Test
- public void testExecuteDumpHalted() throws ReadFailedException {
- doThrowFailExceptionWhen().lispMapResolverDump(Mockito.any());
- try {
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- } catch (ReadFailedException e) {
- assertTrue(e.getCause() instanceof VppCallbackException);
- assertEquals(identifier, ((ReadFailedException) e).getFailedId());
- return;
- }
- fail("Test should have thrown ReadFailedException");
- }
-
- @Test
- public void testExecuteDump() throws ReadFailedException {
- doReturnResponseWhen(validDump).lispMapResolverDump(Mockito.any());
- final LispMapResolverDetailsReplyDump reply =
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
-
- assertNotNull(reply);
- assertEquals(1, reply.lispMapResolverDetails.size());
-
- final LispMapResolverDetails detail = reply.lispMapResolverDetails.get(0);
- assertEquals(7, detail.context);
- assertEquals(0, detail.isIpv6);
- assertArrayEquals(new byte[]{-64, -88, 5, 4}, detail.ipAddress);
- }
-
- @Override
- protected MapResolversDumpExecutor initExecutor() {
- return new MapResolversDumpExecutor(api);
- }
-} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutorTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutorTest.java
deleted file mode 100644
index 6c1ccfac0..000000000
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutorTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-import static io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams.EidType;
-import static io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams.FilterType;
-import static io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams.MappingsDumpParamsBuilder;
-import static io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams.QuantityType;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import com.google.common.collect.ImmutableList;
-import io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.vpp.test.read.JvppDumpExecutorTest;
-import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDump;
-import java.util.concurrent.TimeoutException;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.dp.subtable.grouping.local.mappings.LocalMapping;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-public class MappingsDumpExecutorTest extends JvppDumpExecutorTest<MappingsDumpExecutor> {
-
- private static final byte[] EID = {-64, -88, 2, 1};
-
- @Captor
- private ArgumentCaptor<LispEidTableDump> requestCaptor;
-
- private InstanceIdentifier identifier;
-
- private LispEidTableDetailsReplyDump validDump;
- private MappingsDumpParams emptyParams;
- private MappingsDumpParams validParams;
-
- @Before
- public void init() {
- identifier = InstanceIdentifier.create(LocalMapping.class);
- validDump = new LispEidTableDetailsReplyDump();
-
- LispEidTableDetails detail = new LispEidTableDetails();
- detail.action = 0;
- detail.authoritative = 1;
- detail.context = 4;
- detail.eid = new byte[]{-64, -88, 2, 1};
- detail.eidPrefixLen = 32;
- detail.isLocal = 1;
- detail.locatorSetIndex = 2;
- detail.ttl = 7;
- detail.vni = 2;
-
- validDump.lispEidTableDetails = ImmutableList.of(detail);
-
- emptyParams = MappingsDumpParamsBuilder.newInstance().build();
- validParams =
- MappingsDumpParamsBuilder.newInstance().setVni(2).setPrefixLength((byte) 32).setEidSet(QuantityType.ALL)
- .setEid(EID)
- .setEidType(EidType.IPV4).setFilter(FilterType.LOCAL).build();
- }
-
- @Test
- public void testExecuteDumpTimeout() throws Exception {
- doThrowTimeoutExceptionWhen().lispEidTableDump(any());
- try {
- getExecutor().executeDump(identifier, emptyParams);
- } catch (Exception e) {
- assertTrue(e instanceof ReadFailedException);
- assertTrue(e.getCause() instanceof TimeoutException);
- assertEquals(identifier, ((ReadFailedException) e).getFailedId());
- return;
- }
- fail("Test should have thrown exception");
- }
-
- @Test
- public void testExecuteDumpHalted() throws Exception {
- doThrowFailExceptionWhen().lispEidTableDump(any());
- try {
- getExecutor().executeDump(identifier, emptyParams);
- } catch (ReadFailedException e) {
- assertTrue(e.getCause() instanceof VppCallbackException);
- assertEquals(identifier, ((ReadFailedException) e).getFailedId());
- return;
- }
- fail("Test should have thrown ReadFailedException");
- }
-
- @Test
- public void testExecuteDump() throws ReadFailedException {
- doReturnResponseWhen(validDump).lispEidTableDump(any());
- final LispEidTableDetailsReplyDump reply = getExecutor().executeDump(identifier, validParams);
- verify(api, times(1)).lispEidTableDump(requestCaptor.capture());
-
- final LispEidTableDump request = requestCaptor.getValue();
- assertNotNull(request);
- assertEquals(2, request.vni);
- assertEquals(QuantityType.ALL.getValue(), request.eidSet);
- assertArrayEquals(EID, request.eid);
- assertEquals(EidType.IPV4.getValue(), request.eidType);
- assertEquals(FilterType.LOCAL.getValue(), request.filter);
- assertEquals(32, request.prefixLength);
-
- assertNotNull(reply);
- assertEquals(1, reply.lispEidTableDetails.size());
-
- final LispEidTableDetails detail = reply.lispEidTableDetails.get(0);
-
- assertNotNull(detail);
- assertEquals(0, detail.action);
- assertEquals(1, detail.authoritative);
- assertEquals(4, detail.context);
- assertArrayEquals(EID, detail.eid);
- assertEquals(32, detail.eidPrefixLen);
- assertEquals(1, detail.isLocal);
- assertEquals(2, detail.locatorSetIndex);
- assertEquals(7, detail.ttl);
- assertEquals(2, detail.vni);
- }
-
- @Override
- protected MappingsDumpExecutor initExecutor() {
- return new MappingsDumpExecutor(api);
- }
-} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutorTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutorTest.java
deleted file mode 100644
index 305fa9677..000000000
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutorTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import com.google.common.collect.ImmutableList;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.vpp.test.read.JvppDumpExecutorTest;
-import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetailsReplyDump;
-import java.util.concurrent.TimeoutException;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.eid.table.grouping.eid.table.VniTable;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class VniTableDumpExecutorTest extends JvppDumpExecutorTest<VniTableDumpExecutor> {
-
- private LispEidTableVniDetailsReplyDump validDump;
- private InstanceIdentifier<VniTable> identifier;
-
- @Before
- public void init() {
- validDump = new LispEidTableVniDetailsReplyDump();
- identifier = InstanceIdentifier.create(VniTable.class);
- LispEidTableVniDetails detail = new LispEidTableVniDetails();
- detail.vni = 2;
- detail.context = 4;
- validDump.lispEidTableVniDetails = ImmutableList.of(detail);
- }
-
- @Test
- public void testExecuteDumpFail() throws Exception {
- doThrowFailExceptionWhen().lispEidTableVniDump(Mockito.any());
- try {
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- } catch (ReadFailedException e) {
- assertTrue(e.getCause() instanceof VppCallbackException);
- return;
- }
-
- fail("Test should have thrown ReadFailedException");
- }
-
- @Test
- public void testExecuteDumpTimeout() throws Exception {
- doThrowTimeoutExceptionWhen().lispEidTableVniDump(Mockito.any());
- try {
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
- } catch (ReadFailedException e) {
- assertTrue(e.getCause() instanceof TimeoutException);
- return;
- }
- fail("Test should have thrown ReadFailedException");
- }
-
- @Test
- public void testExecuteDump() throws Exception {
-
- doReturnResponseWhen(validDump).lispEidTableVniDump(Mockito.any());
- final LispEidTableVniDetailsReplyDump reply =
- getExecutor().executeDump(identifier, EntityDumpExecutor.NO_PARAMS);
-
- assertNotNull(reply);
- assertEquals(1, reply.lispEidTableVniDetails.size());
- final LispEidTableVniDetails detail = reply.lispEidTableVniDetails.get(0);
-
- assertEquals(4, detail.context);
- assertEquals(2, detail.vni);
- }
-
- @Override
- protected VniTableDumpExecutor initExecutor() {
- return new VniTableDumpExecutor(api);
- }
-} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/trait/MappingFilterProviderTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/trait/MappingReaderTest.java
index 9a4836d63..84d8543ff 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/trait/MappingFilterProviderTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/read/trait/MappingReaderTest.java
@@ -13,7 +13,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.eid.table.grouping.eid.table.vni.table.VrfSubtable;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class MappingFilterProviderTest implements MappingFilterProvider {
+public class MappingReaderTest implements MappingReader {
private InstanceIdentifier<LocalMapping> validVrfLocal;
private InstanceIdentifier<LocalMapping> validBdLocal;