summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-22 11:56:59 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-24 18:02:10 -0500
commit58709fc696d250f4f4358c036bc8dfd7d7ef1fab (patch)
tree0588aff0f12d85d4d596254b0eb59b119791d23b /mso-api-handlers/mso-api-handler-infra/src
parent303b11fd56f09afea5ae125ee0bdc69c6ceac141 (diff)
Removed deprecated Matcher imports
replaced org.mockito.Matchers with ArgumentMatchers Change-Id: I2feb4d4fb314cd14aca0719c4cc29b1a0510cbf7 Issue-ID: SO-1413 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java2
3 files changed, 19 insertions, 19 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java
index f7e605bcc5..45fadb540a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java
@@ -24,10 +24,10 @@ 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.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.anyObject;
+import static org.mockito.ArgumentMatchers.anyString;
import java.net.URI;
import java.util.Collections;
import java.util.List;
@@ -46,7 +46,7 @@ import org.json.JSONException;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.InjectMocks;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.Spy;
@@ -74,10 +74,10 @@ public class GlobalHealthcheckHandlerTest {
ReflectionTestUtils.setField(globalhealth, "actuatorContextPath", "/manage");
ReflectionTestUtils.setField(globalhealth, "endpointBpmn", "http://localhost:8080");
- Mockito.when(restTemplate.exchange(Matchers.any(URI.class),
- Matchers.any(HttpMethod.class),
- Matchers.<HttpEntity<?>> any(),
- Matchers.<Class<Object>> any())).thenReturn(null);
+ Mockito.when(restTemplate.exchange(ArgumentMatchers.any(URI.class),
+ ArgumentMatchers.any(HttpMethod.class),
+ ArgumentMatchers.<HttpEntity<?>> any(),
+ ArgumentMatchers.<Class<Object>> any())).thenReturn(null);
String result = globalhealth.querySubsystemHealth(MsoSubsystems.BPMN);
System.out.println(result);
@@ -93,10 +93,10 @@ public class GlobalHealthcheckHandlerTest {
subSystemResponse.setStatus("UP");
ResponseEntity<Object> r = new ResponseEntity<>(subSystemResponse,HttpStatus.OK);
- Mockito.when(restTemplate.exchange(Matchers.any(URI.class),
- Matchers.any(HttpMethod.class),
- Matchers.<HttpEntity<?>> any(),
- Matchers.<Class<Object>> any())).thenReturn(r);
+ Mockito.when(restTemplate.exchange(ArgumentMatchers.any(URI.class),
+ ArgumentMatchers.any(HttpMethod.class),
+ ArgumentMatchers.<HttpEntity<?>> any(),
+ ArgumentMatchers.<Class<Object>> any())).thenReturn(r);
String result = globalhealth.querySubsystemHealth(MsoSubsystems.ASDC);
System.out.println(result);
@@ -117,10 +117,10 @@ public class GlobalHealthcheckHandlerTest {
subSystemResponse.setStatus(status);
ResponseEntity<Object> r = new ResponseEntity<>(subSystemResponse,HttpStatus.OK);
- Mockito.when(restTemplate.exchange(Matchers.any(URI.class),
- Matchers.any(HttpMethod.class),
- Matchers.<HttpEntity<?>> any(),
- Matchers.<Class<Object>> any())).thenReturn(r);
+ Mockito.when(restTemplate.exchange(ArgumentMatchers.any(URI.class),
+ ArgumentMatchers.any(HttpMethod.class),
+ ArgumentMatchers.<HttpEntity<?>> any(),
+ ArgumentMatchers.<Class<Object>> any())).thenReturn(r);
Mockito.when(requestContext.getProperty(anyString())).thenReturn("1234567890");
Response response = globalhealth.globalHealthcheck(true, requestContext);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
index afcf0f54c8..9a8f4880f7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
@@ -26,8 +26,8 @@ import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.contains;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.contains;
import static org.mockito.Mockito.doNothing;
import javax.inject.Provider;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
index f9e3ec6498..0a57b4f245 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
@@ -29,7 +29,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;