diff options
author | Stern, Ittay (is9613) <ittay.stern@att.com> | 2018-11-27 13:22:35 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2018-11-27 18:53:16 +0200 |
commit | f22f824ea86725f85b2e1c3636b69489dee9943d (patch) | |
tree | ec21d6ac6c6734d975c5d26481c65b52c75e3cb8 /vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java | |
parent | d0e33a075713cb711d97a4186f858b931ff793ef (diff) |
Upgrade mockito to v2; drop incompatible powermock
Note that anyString() is not matching null values, therefore replaced
with any() where relevant.
Change-Id: If64944e1edc62013953e41b2645a2b78c578bbe8
Issue-ID: VID-359
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java index 4e0e70e89..f281e84b6 100644 --- a/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientTest.java @@ -21,20 +21,23 @@ package org.onap.vid.aai; import com.google.common.collect.ImmutableMap; -import java.util.Collections; -import java.util.Map; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.vid.aai.model.AaiNodeQueryResponse; import org.onap.vid.aai.model.ResourceType; import org.onap.vid.client.SyncRestClient; import org.onap.vid.model.SubscriberList; +import java.util.Collections; +import java.util.Map; + +import static org.mockito.ArgumentMatchers.contains; +import static org.mockito.ArgumentMatchers.eq; + @RunWith(MockitoJUnitRunner.class) public class AaiOverTLSClientTest { @@ -57,8 +60,8 @@ public class AaiOverTLSClientTest { mockPropertyReader(); aaiRestClient.searchNodeTypeByName("name", ResourceType.GENERIC_VNF); - Mockito.verify(syncRestClient).get(Matchers.contains(SEARCH_NODES_QUERY_SEARCH_NODE_TYPE), - Matchers.eq(getHeaders()), Matchers.eq(Collections.emptyMap()), Matchers.eq(AaiNodeQueryResponse.class)); + Mockito.verify(syncRestClient).get(contains(SEARCH_NODES_QUERY_SEARCH_NODE_TYPE), + eq(getHeaders()), eq(Collections.emptyMap()), eq(AaiNodeQueryResponse.class)); } @Test @@ -66,8 +69,8 @@ public class AaiOverTLSClientTest { mockPropertyReader(); aaiRestClient.getAllSubscribers(); - Mockito.verify(syncRestClient).get(Matchers.contains(SUBSCRIBERS), - Matchers.eq(getHeaders()), Matchers.eq(Collections.emptyMap()), Matchers.eq(SubscriberList.class)); + Mockito.verify(syncRestClient).get(contains(SUBSCRIBERS), + eq(getHeaders()), eq(Collections.emptyMap()), eq(SubscriberList.class)); } private void mockPropertyReader() { |