diff options
author | 2016-09-23 07:21:11 +0200 | |
---|---|---|
committer | 2016-09-23 07:21:14 +0200 | |
commit | 08cd3ae5fd61d60ec07996179146c956459c084f (patch) | |
tree | 2596a04ee8854a595c8e1808e0b4504352b79150 /v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java | |
parent | 723170e52190110fd21b86177373f8f22223b760 (diff) |
HONEYCOMB-116: utility for stubbing jvpp methods
- introduces FutureProducer (inspired by https://gerrit.fd.io/r/#/c/2650/)
- updates unit tests for v3po and lisp
Change-Id: I56488bb1dcd6fcaf6821a58f99b528677e095662
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java index ee05d284f..f45367098 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java @@ -30,7 +30,6 @@ import io.fd.honeycomb.vpp.test.read.ListReaderCustomizerTest; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.CompletableFuture; import org.junit.Test; import org.mockito.Mock; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.HexString; @@ -112,10 +111,7 @@ public class ClassifySessionReaderTest extends new byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x07, 0x00, 0x00, 0x00, 0x00}; dump.classifySessionDetails = Arrays.asList(details1, details2); - - final CompletableFuture<ClassifySessionDetailsReplyDump> replyFuture = new CompletableFuture<>(); - replyFuture.complete(dump); - doReturn(replyFuture).when(api).classifySessionDump(any(ClassifySessionDump.class)); + doReturn(future(dump)).when(api).classifySessionDump(any(ClassifySessionDump.class)); when(classifierContext.containsTable(TABLE_NAME, mappingContext)).thenReturn(true); when(classifierContext.getTableIndex(TABLE_NAME, mappingContext)).thenReturn(TABLE_INDEX); |