Update spring-boot to 2.2
[aai/traversal.git] / aai-traversal / src / test / java / org / onap / aai / rest / history / CQAllChildernFromPnfStateTest.java
index 472cffb..7442386 100644 (file)
 package org.onap.aai.rest.history;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
 
 import java.util.Arrays;
 import java.util.HashSet;
@@ -45,6 +42,11 @@ import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+
 @Ignore("The state format requires the history schema to be loaded.  "
     + "Because aaigraph is a singleton its very complicated to have 2 different schemas loaded for testing.  "
     + "This needs to be addressed.")
@@ -146,7 +148,7 @@ public class CQAllChildernFromPnfStateTest extends AbstractSpringHistoryRestTest
         httpEntity = new HttpEntity(payload.toString(), headers);
         ResponseEntity responseEntity =
             restTemplate.exchange(baseUrl + endpoint, HttpMethod.PUT, httpEntity, String.class);
-        JsonArray results = new JsonParser().parse(responseEntity.getBody().toString())
+        JsonArray results = JsonParser.parseString(responseEntity.getBody().toString())
             .getAsJsonObject().getAsJsonArray("results");
         LOGGER.debug("Response for PUT request with uri {} : {}", baseUrl + endpoint,
             responseEntity.getBody());
@@ -162,7 +164,7 @@ public class CQAllChildernFromPnfStateTest extends AbstractSpringHistoryRestTest
         httpEntity = new HttpEntity(payload.toString(), headers);
         ResponseEntity responseEntity =
             restTemplate.exchange(baseUrl + endpoint, HttpMethod.PUT, httpEntity, String.class);
-        JsonArray results = new JsonParser().parse(responseEntity.getBody().toString())
+        JsonArray results = JsonParser.parseString(responseEntity.getBody().toString())
             .getAsJsonObject().getAsJsonArray("results");
         LOGGER.debug("Response for PUT request with uri {} : {}", baseUrl + endpoint,
             responseEntity.getBody());