diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-10-28 13:12:19 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-11-01 20:59:57 +0100 |
commit | b8f86e7069a67031514c43caf8022e8553159fa7 (patch) | |
tree | d112017e36341e114fea4cdefdc5b2a8a90b2030 /infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java | |
parent | 80804f713cdd8d3c30c7e2dd19cbc2a61a1a70c0 (diff) |
HONEYCOMB-272: bump mockito version to 2.2.9
ArgumentMatchers.any() does not match null anymore,
so some of the tests has been updated.
Change-Id: I5de0fdfe87fc8e5c8ce24bfae8daeaba032195ff
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java')
-rw-r--r-- | infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java index ca2872139..738e715b0 100644 --- a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java +++ b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapperTest.java @@ -18,6 +18,7 @@ package io.fd.honeycomb.translate.util.read; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Matchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -41,6 +42,7 @@ public class KeepaliveReaderWrapperTest { @Mock private ReadContext ctx; + private InstanceIdentifier<DataObject> iid = InstanceIdentifier.create(DataObject.class); @Mock private Reader<DataObject, Builder<DataObject>> delegate; @Mock @@ -53,7 +55,8 @@ public class KeepaliveReaderWrapperTest { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); exec = Executors.newScheduledThreadPool(1); - when(delegate.read(any(InstanceIdentifier.class), any(ReadContext.class))).thenThrow(TestingException.class); + when(delegate.getManagedDataObjectType()).thenReturn(iid); + when(delegate.read(eq(iid), any(ReadContext.class))).thenThrow(TestingException.class); } @After |