diff options
Diffstat (limited to 'testsuites/performance/performance-benchmark-test/src')
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(); |