diff options
Diffstat (limited to 'aai-traversal/src/test/java/org/onap/aai/rest/history/DslConsumerHistoryLifecycleSingleNodeTest.java')
-rw-r--r-- | aai-traversal/src/test/java/org/onap/aai/rest/history/DslConsumerHistoryLifecycleSingleNodeTest.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/history/DslConsumerHistoryLifecycleSingleNodeTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/history/DslConsumerHistoryLifecycleSingleNodeTest.java index 6d1a36c..88cc91c 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/history/DslConsumerHistoryLifecycleSingleNodeTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/history/DslConsumerHistoryLifecycleSingleNodeTest.java @@ -20,13 +20,16 @@ package org.onap.aai.rest.history; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.*; +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 com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonParser; - -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.janusgraph.core.JanusGraphTransaction; @@ -42,6 +45,10 @@ 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.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.") @@ -141,7 +148,7 @@ public class DslConsumerHistoryLifecycleSingleNodeTest extends AbstractSpringHis 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()); |