aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/test/java/org')
-rw-r--r--common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java b/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java
index 7a4af7808e..5af84fdb86 100644
--- a/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java
+++ b/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java
@@ -20,10 +20,16 @@
package org.onap.so.serviceinstancebeans;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
import org.junit.Test;
import org.onap.so.openpojo.rules.HasToStringRule;
import org.onap.so.openpojo.rules.ToStringTester;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.PojoClassFilter;
import com.openpojo.reflection.filters.FilterEnum;
@@ -43,6 +49,17 @@ public class ServiceInstanceBeansTest {
public void pojoStructure() {
test("org.onap.so.serviceinstancebeans");
}
+
+ @Test
+ public void cloudConfigurationkeepDefaultValues() throws IOException {
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ cloudConfiguration.setLcpCloudRegionId("myRegionId");
+ ObjectMapper mapper = new ObjectMapper();
+
+ assertEquals("{\"cloudOwner\":\"att-aic\",\"lcpCloudRegionId\":\"myRegionId\"}", mapper.writeValueAsString(cloudConfiguration));
+
+
+ }
private void test(String pojoPackage) {
Validator validator = ValidatorBuilder.create()