TOSCA Compliant Guard Policies
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / simple / serialization / MonitoringPolicySerializationTest.java
index f6f1b2c..318eaee 100644 (file)
@@ -57,7 +57,7 @@ public class MonitoringPolicySerializationTest {
 
     private static final String VERSION = "version";
 
-    private static final String YAML_VERSION = "tosca_simple_yaml_1_0_0";
+    private static final String YAML_VERSION = "tosca_simple_yaml_1_1_0";
 
     private static final String DEFINITION_VERSION = "tosca_definitions_version";
 
@@ -278,7 +278,7 @@ public class MonitoringPolicySerializationTest {
 
     private void verifyVcpeMonitoringOutputserialization(String serializedServiceTemplate) {
 
-        JsonObject serviceTemplateJsonObject = new JsonParser().parse(serializedServiceTemplate).getAsJsonObject();
+        JsonObject serviceTemplateJsonObject = JsonParser.parseString(serializedServiceTemplate).getAsJsonObject();
         assertEquals(YAML_VERSION, serviceTemplateJsonObject.get(DEFINITION_VERSION).getAsString());
         JsonObject topologyTemplateJsonObject = serviceTemplateJsonObject.get(TOPOLOGY_TEMPLATE).getAsJsonObject();
         JsonArray policiesJsonArray = topologyTemplateJsonObject.get(POLICIES).getAsJsonArray();
@@ -295,7 +295,7 @@ public class MonitoringPolicySerializationTest {
 
     private void verifyVdnsMonitoringOutputserialization(String serializedServiceTemplate) {
 
-        JsonObject serviceTemplateJsonObject = new JsonParser().parse(serializedServiceTemplate).getAsJsonObject();
+        JsonObject serviceTemplateJsonObject = JsonParser.parseString(serializedServiceTemplate).getAsJsonObject();
         assertEquals(YAML_VERSION, serviceTemplateJsonObject.get(DEFINITION_VERSION).getAsString());
         JsonObject topologyTemplateJsonObject = serviceTemplateJsonObject.get(TOPOLOGY_TEMPLATE).getAsJsonObject();
         JsonArray policiesJsonArray = topologyTemplateJsonObject.get(POLICIES).getAsJsonArray();
@@ -312,7 +312,7 @@ public class MonitoringPolicySerializationTest {
 
     private void verifyVfwMonitoringOutputserialization(String serializedServiceTemplate) {
 
-        JsonObject serviceTemplateJsonObject = new JsonParser().parse(serializedServiceTemplate).getAsJsonObject();
+        JsonObject serviceTemplateJsonObject = JsonParser.parseString(serializedServiceTemplate).getAsJsonObject();
         assertEquals(YAML_VERSION, serviceTemplateJsonObject.get(DEFINITION_VERSION).getAsString());
         JsonObject topologyTemplateJsonObject = serviceTemplateJsonObject.get(TOPOLOGY_TEMPLATE).getAsJsonObject();
         JsonArray policiesJsonArray = topologyTemplateJsonObject.get(POLICIES).getAsJsonArray();