aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dcaegen2/services/sonhms
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/dcaegen2/services/sonhms')
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java3
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java5
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtilsTest.java4
3 files changed, 5 insertions, 7 deletions
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 8baed64..ba3d4c0 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
@@ -201,8 +201,7 @@ public class TestChildThreadUtils {
}
PowerMockito.whenNew(SdnrRestClient.class).withAnyArguments().thenReturn(sdnr);
- PowerMockito.when(ConfigurationClient.configClient(config.getConfigClientType()))
- .thenReturn(sdnr);
+ PowerMockito.when(config.getConfigurationClient()).thenReturn(sdnr);
PowerMockito.doReturn(3).when(sdnr, "getPci", Mockito.anyString());
PowerMockito.doReturn("pnfName").when(sdnr, "getPnfName", Mockito.anyString());
when(policyDmaapClient.sendNotificationToPolicy(Mockito.anyString())).thenReturn(true);
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 e54748b..607f0c0 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
@@ -136,7 +136,7 @@ public class TestPnfUtils {
.thenReturn(cellInfoNull);
try {
PowerMockito.whenNew(SdnrRestClient.class).withAnyArguments().thenReturn(sdnr);
- PowerMockito.when(ConfigurationClient.configClient(config.getConfigClientType()))
+ PowerMockito.when(config.getConfigurationClient())
.thenReturn(sdnr);
PowerMockito.doReturn(pnfName).when(sdnr, "getPnfName", Mockito.anyString());
PowerMockito.when(cellInfoRepositoryMock.save(new CellInfo(cellId, pnfName))).thenReturn(new CellInfo());
@@ -169,8 +169,7 @@ public class TestPnfUtils {
try {
PowerMockito.whenNew(SdnrRestClient.class).withAnyArguments().thenReturn(sdnr);
- PowerMockito.when(ConfigurationClient.configClient(config.getConfigClientType()))
- .thenReturn(sdnr);
+ PowerMockito.when(config.getConfigurationClient()).thenReturn(sdnr);
PowerMockito.doReturn("ncServer1").when(sdnr, "getPnfName", Mockito.anyString());
actual = pnfUtils.getPnfsForAnrSolutions(anrSolutions);
} catch (ConfigDbNotFoundException e) {
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 32d2a47..104ec88 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
@@ -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.Configuration;
import org.onap.dcaegen2.services.sonhms.exceptions.CpsNotFoundException;
+import org.onap.dcaegen2.services.sonhms.restclient.ConfigInterface;
import org.onap.dcaegen2.services.sonhms.restclient.ConfigurationClient;
import org.onap.dcaegen2.services.sonhms.restclient.SdnrRestClient;
import org.powermock.api.mockito.PowerMockito;
@@ -172,8 +173,7 @@ public class ClusterUtilsTest {
Configuration config = Configuration.getInstance();
PowerMockito.whenNew(SdnrRestClient.class).withAnyArguments().thenReturn(sdnr);
- PowerMockito.when(ConfigurationClient.configClient(config.getConfigClientType()))
- .thenReturn(sdnr);
+ PowerMockito.when(config.getConfigurationClient()).thenReturn(sdnr);
PowerMockito.doReturn(nbrList).when(sdnr, "getNbrList", Mockito.anyString());
clusterMap.put(new CellPciPair("45", 310), (ArrayList<CellPciPair>) firstNbrList);