From cc1dc6e6b8a79d9341b71af93a03c5d21c0dd50a Mon Sep 17 00:00:00 2001 From: "david.mcweeney" Date: Fri, 26 Mar 2021 14:01:00 +0000 Subject: [DMAAP-MR] - Uplift to Java 11 Signed-off-by: david.mcweeney Change-Id: I4cef8d427c8d9dcbae171a6660e6c0bbcb64b522 Issue-ID: DMAAP-1563 --- src/test/java/org/onap/dmaap/DMaaPCambriaExceptionMapperTest.java | 2 ++ src/test/java/org/onap/dmaap/DMaaPWebExceptionMapperTest.java | 2 ++ src/test/java/org/onap/dmaap/filemonitor/ServicePropertiesMapTest.java | 2 ++ src/test/java/org/onap/dmaap/mmagent/UpdateMirrorMakerTest.java | 2 ++ src/test/java/org/onap/dmaap/service/AdminRestServiceTest.java | 2 ++ src/test/java/org/onap/dmaap/service/ApiKeysRestServiceTest.java | 2 ++ src/test/java/org/onap/dmaap/service/EventsRestServiceTest.java | 3 +++ src/test/java/org/onap/dmaap/service/MMRestServiceTest.java | 2 ++ src/test/java/org/onap/dmaap/service/MetricsRestServiceTest.java | 2 ++ src/test/java/org/onap/dmaap/service/TopicRestServiceTest.java | 2 ++ src/test/java/org/onap/dmaap/service/TransactionRestServiceTest.java | 2 ++ src/test/java/org/onap/dmaap/util/ContentLengthInterceptorTest.java | 2 ++ 12 files changed, 25 insertions(+) (limited to 'src/test') diff --git a/src/test/java/org/onap/dmaap/DMaaPCambriaExceptionMapperTest.java b/src/test/java/org/onap/dmaap/DMaaPCambriaExceptionMapperTest.java index a66da07..b9c399f 100644 --- a/src/test/java/org/onap/dmaap/DMaaPCambriaExceptionMapperTest.java +++ b/src/test/java/org/onap/dmaap/DMaaPCambriaExceptionMapperTest.java @@ -30,12 +30,14 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; import org.onap.dmaap.dmf.mr.CambriaApiException; import org.onap.dmaap.dmf.mr.exception.DMaaPErrorMessages; import org.onap.dmaap.dmf.mr.exception.ErrorResponse; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") public class DMaaPCambriaExceptionMapperTest { @InjectMocks diff --git a/src/test/java/org/onap/dmaap/DMaaPWebExceptionMapperTest.java b/src/test/java/org/onap/dmaap/DMaaPWebExceptionMapperTest.java index 78f67c2..4b1fb74 100644 --- a/src/test/java/org/onap/dmaap/DMaaPWebExceptionMapperTest.java +++ b/src/test/java/org/onap/dmaap/DMaaPWebExceptionMapperTest.java @@ -36,11 +36,13 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; import org.onap.dmaap.dmf.mr.exception.DMaaPErrorMessages; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") public class DMaaPWebExceptionMapperTest { @InjectMocks diff --git a/src/test/java/org/onap/dmaap/filemonitor/ServicePropertiesMapTest.java b/src/test/java/org/onap/dmaap/filemonitor/ServicePropertiesMapTest.java index 1e8c9d7..7028521 100644 --- a/src/test/java/org/onap/dmaap/filemonitor/ServicePropertiesMapTest.java +++ b/src/test/java/org/onap/dmaap/filemonitor/ServicePropertiesMapTest.java @@ -35,12 +35,14 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") public class ServicePropertiesMapTest { @InjectMocks diff --git a/src/test/java/org/onap/dmaap/mmagent/UpdateMirrorMakerTest.java b/src/test/java/org/onap/dmaap/mmagent/UpdateMirrorMakerTest.java index 6fceff1..5bf8cdd 100644 --- a/src/test/java/org/onap/dmaap/mmagent/UpdateMirrorMakerTest.java +++ b/src/test/java/org/onap/dmaap/mmagent/UpdateMirrorMakerTest.java @@ -31,9 +31,11 @@ import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.onap.dmaap.dmf.mr.CambriaApiException; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") public class UpdateMirrorMakerTest { @Rule diff --git a/src/test/java/org/onap/dmaap/service/AdminRestServiceTest.java b/src/test/java/org/onap/dmaap/service/AdminRestServiceTest.java index b766581..8ba69f3 100644 --- a/src/test/java/org/onap/dmaap/service/AdminRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/AdminRestServiceTest.java @@ -43,6 +43,7 @@ import org.onap.dmaap.dmf.mr.beans.DMaaPContext; import org.onap.dmaap.dmf.mr.service.AdminService; import org.onap.dmaap.dmf.mr.utils.ConfigurationReader; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -50,6 +51,7 @@ import com.att.nsa.configs.ConfigDbException; import com.att.nsa.security.ReadWriteSecuredResource.AccessDeniedException; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ ServiceUtil.class }) public class AdminRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/service/ApiKeysRestServiceTest.java b/src/test/java/org/onap/dmaap/service/ApiKeysRestServiceTest.java index 20438f3..b66ccc1 100644 --- a/src/test/java/org/onap/dmaap/service/ApiKeysRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/ApiKeysRestServiceTest.java @@ -44,6 +44,7 @@ import org.mockito.MockitoAnnotations; import org.json.JSONException; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -59,6 +60,7 @@ import com.att.nsa.configs.ConfigDbException; import com.att.nsa.security.db.NsaApiDb.KeyExistsException; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ ServiceUtil.class }) public class ApiKeysRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/service/EventsRestServiceTest.java b/src/test/java/org/onap/dmaap/service/EventsRestServiceTest.java index f7e701a..44cc1a3 100644 --- a/src/test/java/org/onap/dmaap/service/EventsRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/EventsRestServiceTest.java @@ -31,6 +31,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import static org.mockito.Matchers.any; + +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.powermock.api.mockito.PowerMockito; @@ -62,6 +64,7 @@ import org.onap.dmaap.dmf.mr.exception.ErrorResponse; import org.onap.dmaap.dmf.mr.metabroker.Broker.TopicExistsException; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ PropertiesMapBean.class }) public class EventsRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/service/MMRestServiceTest.java b/src/test/java/org/onap/dmaap/service/MMRestServiceTest.java index 9ae3674..eb4ec57 100644 --- a/src/test/java/org/onap/dmaap/service/MMRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/MMRestServiceTest.java @@ -65,6 +65,7 @@ import org.onap.dmaap.mmagent.CreateMirrorMaker; import org.onap.dmaap.mmagent.MirrorMaker; import org.onap.dmaap.mmagent.UpdateMirrorMaker; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -78,6 +79,7 @@ import com.att.nsa.security.db.simple.NsaSimpleApiKey; //@RunWith(MockitoJUnitRunner.class) @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ PropertiesMapBean.class, AJSCPropertiesMap.class }) public class MMRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/service/MetricsRestServiceTest.java b/src/test/java/org/onap/dmaap/service/MetricsRestServiceTest.java index 1188945..a7e88ca 100644 --- a/src/test/java/org/onap/dmaap/service/MetricsRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/MetricsRestServiceTest.java @@ -28,6 +28,7 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -37,6 +38,7 @@ import org.onap.dmaap.dmf.mr.service.MetricsService; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ PropertiesMapBean.class }) public class MetricsRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/service/TopicRestServiceTest.java b/src/test/java/org/onap/dmaap/service/TopicRestServiceTest.java index 0c563b4..2f3098d 100644 --- a/src/test/java/org/onap/dmaap/service/TopicRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/TopicRestServiceTest.java @@ -46,6 +46,7 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -72,6 +73,7 @@ import com.att.nsa.security.db.simple.NsaSimpleApiKey; //@RunWith(MockitoJUnitRunner.class) @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ PropertiesMapBean.class }) public class TopicRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/service/TransactionRestServiceTest.java b/src/test/java/org/onap/dmaap/service/TransactionRestServiceTest.java index b849daa..a7ac8de 100644 --- a/src/test/java/org/onap/dmaap/service/TransactionRestServiceTest.java +++ b/src/test/java/org/onap/dmaap/service/TransactionRestServiceTest.java @@ -33,6 +33,7 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -47,6 +48,7 @@ import com.att.aft.dme2.internal.jettison.json.JSONException; import org.powermock.api.mockito.PowerMockito; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ PropertiesMapBean.class }) public class TransactionRestServiceTest { diff --git a/src/test/java/org/onap/dmaap/util/ContentLengthInterceptorTest.java b/src/test/java/org/onap/dmaap/util/ContentLengthInterceptorTest.java index 26c9305..06f3fe6 100644 --- a/src/test/java/org/onap/dmaap/util/ContentLengthInterceptorTest.java +++ b/src/test/java/org/onap/dmaap/util/ContentLengthInterceptorTest.java @@ -34,10 +34,12 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @RunWith(PowerMockRunner.class) +@PowerMockIgnore("jdk.internal.reflect.*") @PrepareForTest({ System.class }) public class ContentLengthInterceptorTest { @InjectMocks -- cgit 1.2.3-korg