<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 -->
<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>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.10.16</version>
+ <version>2.21.0</version>
<scope>test</scope>
</dependency>
<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>
<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>
<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>
* ============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.
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;
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)
* ============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.
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;
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)
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;
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)
* ============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.
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);
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);
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();
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();
* ============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.
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;
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
* ============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.
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;
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)
* ============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.
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;
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)
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;
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)
* ============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.
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;
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)
* ============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.
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;
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)
}
return content;
}
-}
\ No newline at end of file
+}
* ============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.
};
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"));
}
* ============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.
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;
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 })
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;
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)
* ============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.
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;
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)
* ============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.
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;
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)
* ============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.
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;
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)
#
###############################################################################
major=2
-minor=0
-patch=3
+minor=1
+patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT