Changes for Checkstyle 8.32
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / simple / serialization / MonitoringPolicySerializationTest.java
index f6f1b2c..aa48b0a 100644 (file)
@@ -29,9 +29,7 @@ import static org.junit.Assert.fail;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
-
 import java.util.Map;
-
 import org.junit.Test;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
@@ -57,7 +55,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 +276,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 +293,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 +310,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();