summaryrefslogtreecommitdiffstats
path: root/testsuites/performance/performance-benchmark-test/src
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-08-10 16:58:48 +0100
committeradheli.tavares <adheli.tavares@est.tech>2023-09-22 16:01:00 +0100
commita3a032d5b902c3e125dccd2bc2b41f22861decc1 (patch)
tree481b0faa916f39da096fe5c935c630b1598f0f7d /testsuites/performance/performance-benchmark-test/src
parent097618956f681eee12a23d7d9dc4f4f22f5347cc (diff)
Java 17 Upgrade
Updated dependencies to latest versions Made Java 17 changes Moved apex dependencies versions to main apex pom Issue-ID: POLICY-4675 Change-Id: Ia5cd5670a1f024f5402cbd7371162ce3313930ef Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'testsuites/performance/performance-benchmark-test/src')
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java14
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java10
2 files changed, 13 insertions, 11 deletions
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
index 53e57f295..8e8a699c6 100644
--- a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,14 +23,14 @@
package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
import com.google.gson.Gson;
+import jakarta.inject.Inject;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
-import javax.inject.Inject;
-import javax.inject.Provider;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
index 44a06ee54..75d6d65f3 100644
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,14 +24,15 @@ package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import javax.inject.Provider;
-import javax.ws.rs.core.Response;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.core.Response;
import org.glassfish.grizzly.http.server.Request;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
@@ -38,6 +40,7 @@ import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.even
* Test the EventGeneratorEndpoint class.
*
*/
+@RunWith(MockitoJUnitRunner.class)
public class EventGeneratorEndpointTest {
@Mock
private Provider<Request> httpRequestProviderMock;
@@ -52,7 +55,6 @@ public class EventGeneratorEndpointTest {
*/
@Before
public void initializeMocking() throws ApexException {
- MockitoAnnotations.initMocks(this);
Mockito.doReturn(httpRequestMock).when(httpRequestProviderMock).get();