diff options
author | Steve Smokowski <ss835w@att.com> | 2019-01-25 13:53:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-25 13:53:23 +0000 |
commit | d62389df8c10d46609c5770b45697f7ac401dc82 (patch) | |
tree | 03b652b0cb302c1b4bb2e276dc44d039c34c9546 /mso-api-handlers/mso-api-handler-infra | |
parent | 68ca4b48868787579b20dd6440a92eb59d0b4c59 (diff) | |
parent | 58709fc696d250f4f4358c036bc8dfd7d7ef1fab (diff) |
Merge "Removed deprecated Matcher imports"
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra')
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; |