aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/clamp/clds/client/req/SdcReqTest.java4
-rw-r--r--src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java2
-rw-r--r--src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesIT.java14
-rw-r--r--src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java2
4 files changed, 13 insertions, 9 deletions
diff --git a/src/test/java/org/onap/clamp/clds/client/req/SdcReqTest.java b/src/test/java/org/onap/clamp/clds/client/req/SdcReqTest.java
index 20b85d6f6..a283f43d4 100644
--- a/src/test/java/org/onap/clamp/clds/client/req/SdcReqTest.java
+++ b/src/test/java/org/onap/clamp/clds/client/req/SdcReqTest.java
@@ -40,11 +40,11 @@ import org.onap.clamp.clds.model.prop.ModelProperties;
public class SdcReqTest {
- String baseUrl = "AYBABTU";
+ String baseUrl = "AYBABTU";
String serviceInvariantUUID = "serviceInvariantUUID";
@Test
- public void getSdcReqUrlsListNoGlobalPropTest() throws Exception {
+ public void getSdcReqUrlsListNoGlobalPropTest() {
ModelProperties prop = mock(ModelProperties.class);
SdcCatalogServices sdcCatalogServices = mock(SdcCatalogServices.class);
DelegateExecution delegateExecution = mock(DelegateExecution.class);
diff --git a/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java b/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java
index 19fad4805..69df97212 100644
--- a/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java
+++ b/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java
@@ -119,7 +119,7 @@ public class PolicyClientIT extends AbstractIT {
try {
responseMessage = policyClient.sendMicroServiceInJson(policyJson, prop, tcaPolicyRequestUuid);
} catch (Exception e) {
- assertTrue(e.getMessage().contains("Policy send failed: PE500 "));
+ assertTrue(e.getMessage().contains("Exception while communicating with Policy"));
}
System.out.println(responseMessage);
}
diff --git a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesIT.java b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesIT.java
index 5d08e5ec0..a12d6b7d5 100644
--- a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesIT.java
+++ b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesIT.java
@@ -202,9 +202,10 @@ public class SdcCatalogServicesIT extends AbstractIT {
@Test
public void getServiceUuidFromServiceInvariantIdTest() throws Exception {
SdcCatalogServices spy = Mockito.spy(sdcCatalogWired);
- Mockito.when(spy.getSdcServicesInformation(null)).thenReturn(IOUtils.toString(
- SdcCatalogServicesIT.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"), "UTF-8"));
+ Mockito.doReturn(IOUtils.toString(
+ SdcCatalogServicesIT.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"), "UTF-8"))
+ .when(spy).getSdcServicesInformation(null);
// Try the vcts4 version 1.0, this one should be replaced by 1.1 so it
// should not exist, returning empty string
String resUuidVcts4Null = spy.getServiceUuidFromServiceInvariantId("a33ed748-3477-4434-b3f3-b5560f5e7d9b");
@@ -228,8 +229,10 @@ public class SdcCatalogServicesIT extends AbstractIT {
@Test
public void getCldsServiceDataWithAlarmConditionsTest() throws Exception {
SdcCatalogServices spy = Mockito.spy(sdcCatalogWired);
- Mockito.when(spy.getSdcServicesInformation(null)).thenReturn(IOUtils.toString(
- SdcCatalogServicesIT.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"), "UTF-8"));
+
+ Mockito.doReturn(IOUtils.toString(
+ SdcCatalogServicesIT.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"), "UTF-8"))
+ .when(spy).getSdcServicesInformation(null);
// This invariant uuid is the one from vcts4 v1.1
String serviceResourceDetailUrl = refProp.getStringValue("sdc.serviceUrl")
@@ -286,7 +289,8 @@ public class SdcCatalogServicesIT extends AbstractIT {
assertTrue("29018914-966c-442d-9d08-251b9dc45b8f".equals(cldsServiceData.getServiceUUID()));
assertTrue(cldsServiceData.getCldsVfs().size() == 1);
- List<CldsAlarmCondition> alarmsList = spy.getAllAlarmConditionsFromCldsServiceData(cldsServiceData, "alarmCondition");
+ List<CldsAlarmCondition> alarmsList = spy.getAllAlarmConditionsFromCldsServiceData(cldsServiceData,
+ "alarmCondition");
assertTrue(alarmsList.size() == 6);
}
diff --git a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java
index c6b19d0f9..03d7d65da 100644
--- a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java
+++ b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java
@@ -28,7 +28,7 @@ import com.fasterxml.jackson.databind.JsonNode;
/**
* A CustomModelElement to test the capability to add new elements on the fly.
*/
-public class CustomModelElement extends ModelElement {
+public class CustomModelElement extends AbstractModelElement {
private static final String CUSTOM_TYPE = "customType";