aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-06-18 15:12:56 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-06-19 17:25:08 +0100
commita23bd8c218d7044e1d79e240fdb74f00947a3108 (patch)
tree064323adf3c19a5346c108d905495363cce45adf /plugins
parent6040233dcbe4a64b977ee750c6d0d12b2d513c4c (diff)
Convert junit4 to junit5
- clean up any references to junit4 - clean up some sonar complaints - remove not used integration tests Issue-ID: POLICY-5041 Change-Id: I67e7a8f00df5b6c5ba514f4ea2ecd96bf942d4c7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java4
2 files changed, 4 insertions, 6 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
index ec454af00..928b1c72b 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
@@ -35,10 +35,8 @@ import java.util.Properties;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.apex.service.engine.event.ApexEventConsumer;
import org.onap.policy.apex.service.engine.event.ApexEventException;
@@ -214,7 +212,7 @@ class ApexRestClientProducerTest {
properties.put("tag", "exist");
properties.put("key", "that");
Mockito.doReturn(Response.Status.ACCEPTED.getStatusCode()).when(responseMock).getStatus();
- Mockito.doReturn(responseMock).when(builderMock).put(Mockito.any());
+ closeable = Mockito.doReturn(responseMock).when(builderMock).put(Mockito.any());
Mockito.doReturn(builderMock).when(targetMock).request("application/json");
Mockito.doReturn(builderMock).when(builderMock).headers(Mockito.any());
Mockito.doReturn(targetMock).when(httpClientMock).target("http://some.place.that.does.not/exist");
@@ -246,7 +244,7 @@ class ApexRestClientProducerTest {
rcctp.setUrl("http://some.place.that.does.not/exist");
Mockito.doReturn(Response.Status.OK.getStatusCode()).when(responseMock).getStatus();
- Mockito.doReturn(responseMock).when(builderMock).post(Mockito.any());
+ closeable = Mockito.doReturn(responseMock).when(builderMock).post(Mockito.any());
Mockito.doReturn(builderMock).when(targetMock).request("application/json");
Mockito.doReturn(builderMock).when(builderMock).headers(Mockito.any());
Mockito.doReturn(targetMock).when(httpClientMock).target(rcctp.getUrl());
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java
index f82add13f..2bbc7b9ef 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java
@@ -21,8 +21,8 @@
package org.onap.policy.apex.plugins.event.carrier.restrequestor;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.google.gson.Gson;
import jakarta.ws.rs.DELETE;