aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2020-07-17 12:44:01 +0530
committerNiranjana <niranjana.y60@wipro.com>2020-07-22 11:06:29 +0530
commitc757df8e1ebba6f23659edfe77501eeed6df5424 (patch)
tree7c44c11a4f7595a23af20ab81b025b337f4a3069
parent77166d0a455957e3a713ef5dcaf103ef0ecff0fc (diff)
Upgrade son-handler to support Java-11
Issue-ID: DCAEGEN2-2284 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: I331babbe7c52b39c4f7d30921eff64996a85f3b4
-rw-r--r--pom.xml45
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/BufferNotificationComponentTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/ClusterDetailsComponentTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/DmaapNotificationsComponentTest.java2
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java9
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponentTest.java5
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/HoMetricsComponentTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java2
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java6
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyDmaapClientTest.java7
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyNotificationCallbackTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java2
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtilsTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/utils/SonHandlerRestTemplateTest.java4
-rw-r--r--version.properties4
18 files changed, 74 insertions, 44 deletions
diff --git a/pom.xml b/pom.xml
index 9ec00c6..fd9b1c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
<groupId>org.onap.dcaegen2.services.son-handler</groupId>
<artifactId>son-handler</artifactId>
<name>dcaegen2-services-son-handler</name>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version> </parent -->
@@ -43,8 +43,8 @@
<properties>
<sdk.version>1.1.4</sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
<docker.image.name>onap/org.onap.dcaegen2.services.son-handler</docker.image.name>
<!-- NEXUS RELATED SETTINGS -->
<nexusproxy>https://nexus.onap.org</nexusproxy>
@@ -150,7 +150,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.10.16</version>
+ <version>2.21.0</version>
<scope>test</scope>
</dependency>
@@ -161,19 +161,23 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
- <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
- <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito -->
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
+ <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito2 -->
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito2</artifactId>
+ <version>2.0.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
- <version>1.6.4</version>
+ <version>2.0.2</version>
<scope>test</scope>
</dependency>
@@ -231,7 +235,18 @@
<artifactId>bootstrap</artifactId>
<version>4.3.1</version>
</dependency>
-
+ <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.3.0</version>
+ </dependency>
+ <!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.24.1-GA</version>
+ </dependency>
</dependencies>
<build>
@@ -267,7 +282,7 @@
<imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
- <baseImage>openjdk:8-alpine</baseImage>
+ <baseImage>openjdk:11.0.6-jre-slim</baseImage>
<user>sonhms</user>
<resources>
<resource>
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/BufferNotificationComponentTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/BufferNotificationComponentTest.java
index 28ff185..04cb42e 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/BufferNotificationComponentTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/BufferNotificationComponentTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ import org.onap.dcaegen2.services.sonhms.dao.BufferedNotificationsRepository;
import org.onap.dcaegen2.services.sonhms.entity.BufferedNotifications;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -44,6 +45,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class })
@SpringBootTest(classes = BufferNotificationComponent.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/ClusterDetailsComponentTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/ClusterDetailsComponentTest.java
index e8b44bf..e07ecdf 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/ClusterDetailsComponentTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/ClusterDetailsComponentTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ import org.onap.dcaegen2.services.sonhms.dao.ClusterDetailsRepository;
import org.onap.dcaegen2.services.sonhms.entity.ClusterDetails;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -44,6 +45,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({BeanUtil.class})
@SpringBootTest(classes = ClusterDetailsComponent.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/DmaapNotificationsComponentTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/DmaapNotificationsComponentTest.java
index 4a3fb42..3100f70 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/DmaapNotificationsComponentTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/DmaapNotificationsComponentTest.java
@@ -44,6 +44,7 @@ import org.onap.dcaegen2.services.sonhms.model.Notification;
import org.onap.dcaegen2.services.sonhms.model.PmNotification;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -51,6 +52,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class, Configuration.class })
@SpringBootTest(classes = DmaapNotificationsComponentTest.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java
index 0972661..83fd795 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -127,7 +127,6 @@ public class EventHandlerTest {
Mockito.when(clusterutilsMock.getAllClusters()).thenReturn(clusterDetails);
Mockito.when(clusterutilsMock.getClustersForNotification(notification, clusterDetails)).thenReturn(mapping);
Mockito.when(clusterutilsMock.getClusterForCell(Mockito.any(), Mockito.any())).thenReturn(existingCluster);
- Mockito.when(threadUtilsMock.createNewThread(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(),Mockito.anyString())).thenReturn(true);
try {
Mockito.when(clusterutilsMock.createCluster(Mockito.any())).thenReturn(cluster);
@@ -162,8 +161,6 @@ public class EventHandlerTest {
Mockito.when(clusterutilsMock.getAllClusters()).thenReturn(clusterDetails);
Mockito.when(clusterutilsMock.getClustersForNotification(notification, clusterDetails)).thenReturn(mapping);
Mockito.when(clusterutilsMock.getClusterForCell(Mockito.any(), Mockito.any())).thenReturn(existingCluster);
- Mockito.when(threadUtilsMock.createNewThread(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(),
- Mockito.anyString())).thenReturn(true);
Mockito.when(clusterutilsMock.getClusterDetailsFromClusterId(Mockito.any(), Mockito.any()))
.thenReturn(clusterDetail);
@@ -224,9 +221,7 @@ public class EventHandlerTest {
try {
Mockito.when(clusterutilsMock.findClusterMap(Mockito.any())).thenReturn(clusterMap);
- Mockito.when(clusterutilsMock.createCluster(Mockito.any())).thenReturn(graph);
Mockito.when(clusterutilsMock.modifyCluster(Mockito.any(), Mockito.any())).thenReturn(graph);
- Mockito.when(clusterutilsMock.getClusterForCell(Mockito.any(), Mockito.any())).thenReturn(existingCluster);
} catch (ConfigDbNotFoundException e) {
e.printStackTrace();
@@ -285,8 +280,6 @@ public class EventHandlerTest {
try {
Mockito.when(clusterutilsMock.findClusterMap(Mockito.any())).thenReturn(clusterMap);
Mockito.when(clusterutilsMock.createCluster(Mockito.any())).thenReturn(graph);
- Mockito.when(clusterutilsMock.modifyCluster(Mockito.any(), Mockito.any())).thenReturn(graph);
- Mockito.when(clusterutilsMock.getClusterForCell(Mockito.any(), Mockito.any())).thenReturn(existingCluster);
} catch (ConfigDbNotFoundException e) {
e.printStackTrace();
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponentTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponentTest.java
index 17fd484..e511a43 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponentTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponentTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@ import org.mockito.Mock;
import org.onap.dcaegen2.services.sonhms.dao.FaultNotificationsRepository;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -46,10 +47,10 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class })
@SpringBootTest(classes = FaultNotificationComponentTest.class)
-
public class FaultNotificationComponentTest {
@Mock
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/HoMetricsComponentTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/HoMetricsComponentTest.java
index 56f1fba..a7f73d2 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/HoMetricsComponentTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/HoMetricsComponentTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,6 +44,7 @@ import org.onap.dcaegen2.services.sonhms.entity.HandOverMetrics;
import org.onap.dcaegen2.services.sonhms.model.HoDetails;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -51,6 +52,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class })
@SpringBootTest(classes = HoMetricsComponentTest.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java
index 18f9e02..5500808 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,6 +43,7 @@ import org.onap.dcaegen2.services.sonhms.model.Flag;
import org.onap.dcaegen2.services.sonhms.model.PmNotification;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -50,6 +51,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class })
@SpringBootTest(classes = PMNotificationHandlerTest.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java
index 5ea56ea..810e6ff 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java
@@ -36,6 +36,7 @@ import org.mockito.MockitoAnnotations;
import org.onap.dcaegen2.services.sonhms.exceptions.OofNotFoundException;
import org.onap.dcaegen2.services.sonhms.restclient.OofRestClient;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -43,6 +44,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({OofRestClient.class})
@SpringBootTest(classes = StateOof.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
index f8a6ae2..5f2e5b5 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,6 +63,7 @@ import org.onap.dcaegen2.services.sonhms.restclient.SdnrRestClient;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
import org.onap.dcaegen2.services.sonhms.utils.ClusterUtilsTest;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -70,6 +71,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class, SdnrRestClient.class })
@SpringBootTest(classes = TestChildThreadUtils.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java
index d74bff8..683d4f2 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,6 +53,7 @@ import org.onap.dcaegen2.services.sonhms.restclient.Solutions;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
import org.onap.dcaegen2.services.sonhms.utils.ClusterUtilsTest;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -61,6 +62,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({BeanUtil.class, SdnrRestClient.class })
@SpringBootTest(classes = PnfUtils.class)
@@ -186,4 +188,4 @@ public class TestPnfUtils {
}
return content;
}
-} \ No newline at end of file
+}
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyDmaapClientTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyDmaapClientTest.java
index 16f205f..25567cd 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyDmaapClientTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyDmaapClientTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -103,11 +103,6 @@ public class PolicyDmaapClientTest {
};
Mockito.when(configurationMock.getStreamsSubscribes()).thenReturn(streamsSubscribes);
Mockito.when(dmaapUtilsMock.buildConsumer(configurationMock, "DCAE_CL_RSP")).thenReturn(policyResponseCambriaConsumerMock);
- try {
- Mockito.when(policyResponseCambriaConsumerMock.fetch()).thenReturn(msgs);
- } catch (IOException e) {
- e.printStackTrace();
- }
assertTrue(policyDmaapClient.handlePolicyResponse("9d2d790e-a5f0-11e8-98d0-529269fb1459"));
}
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyNotificationCallbackTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyNotificationCallbackTest.java
index 8e2b0e9..4ce8e44 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyNotificationCallbackTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/dmaap/PolicyNotificationCallbackTest.java
@@ -3,7 +3,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ import org.onap.dcaegen2.services.sonhms.dao.FixedPciCellsRepository;
import org.onap.dcaegen2.services.sonhms.dao.PciUpdateRepository;
import org.onap.dcaegen2.services.sonhms.entity.FixedPciCells;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -45,6 +46,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@SpringBootTest(classes = PolicyNotificationCallbackDuplicate.class)
@PrepareForTest({ BeanUtil.class, PolicyNotificationCallbackDuplicate.class, Configuration.class })
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java
index 9e79dcb..4253d49 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java
@@ -37,6 +37,7 @@ import org.onap.dcaegen2.services.sonhms.exceptions.OofNotFoundException;
import org.onap.dcaegen2.services.sonhms.model.AnrInput;
import org.onap.dcaegen2.services.sonhms.utils.SonHandlerRestTemplate;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -46,6 +47,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ SonHandlerRestTemplate.class,Configuration.class })
@SpringBootTest(classes = OofRestClientTest.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java
index 59eacc9..6ce12df 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@ import org.onap.dcaegen2.services.sonhms.exceptions.ConfigDbNotFoundException;
import org.onap.dcaegen2.services.sonhms.model.CellPciPair;
import org.onap.dcaegen2.services.sonhms.utils.SonHandlerRestTemplate;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -49,6 +50,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ SonHandlerRestTemplate.class,Configuration.class })
@SpringBootTest(classes = SdnrRestClientTest.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtilsTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtilsTest.java
index 03305a1..53539c5 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtilsTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtilsTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,6 +57,7 @@ import org.onap.dcaegen2.services.sonhms.model.FapServiceList;
import org.onap.dcaegen2.services.sonhms.model.Notification;
import org.onap.dcaegen2.services.sonhms.restclient.SdnrRestClient;
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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -64,6 +65,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ SdnrRestClient.class, BeanUtil.class })
@SpringBootTest(classes = ClusterUtils.class)
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/utils/SonHandlerRestTemplateTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/utils/SonHandlerRestTemplateTest.java
index a1c9472..f1c2898 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/utils/SonHandlerRestTemplateTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/utils/SonHandlerRestTemplateTest.java
@@ -4,7 +4,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ 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;
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
@@ -46,6 +47,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
@PowerMockRunnerDelegate(SpringRunner.class)
@PrepareForTest({ BeanUtil.class })
@SpringBootTest(classes = SonHandlerRestTemplate.class)
diff --git a/version.properties b/version.properties
index 49429b8..d6b290a 100644
--- a/version.properties
+++ b/version.properties
@@ -19,8 +19,8 @@
#
###############################################################################
major=2
-minor=0
-patch=3
+minor=1
+patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT