From e7a0775b21c2ea6b7bb8efb63b5384df26e27fbb Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 23 Sep 2016 07:21:11 +0200 Subject: 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 --- .../translate/v3po/vppclassifier/ClassifySessionReaderTest.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReaderTest.java') 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 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); -- cgit 1.2.3-korg