Update spring-boot to 2.2
[aai/traversal.git] / aai-traversal / src / test / java / org / onap / aai / rest / history / DslConsumerHistoryLifecycleEdgeTest.java
index d26eff2..3411c2a 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 java.util.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -44,6 +48,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 lifecycle 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.")
@@ -148,7 +157,7 @@ public class DslConsumerHistoryLifecycleEdgeTest extends AbstractSpringHistoryRe
         httpEntity = new HttpEntity(payload, 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());