aboutsummaryrefslogtreecommitdiffstats
path: root/aai-schema-ingest/src/test/java/org
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-10 09:21:49 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-10 09:31:12 +0000
commit5eb0e49534114edf8a76fef5b2a8e50c7bdaa812 (patch)
treeb69c0e5d60fc48dd0c8084dfffb178b89566b83f /aai-schema-ingest/src/test/java/org
parent8b504f6db32630ae4b6774efabc87ed76a950053 (diff)
Replace deprecated methods in aai-common
Issue-ID: AAI-3589 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I9e32b879ee0d143a6b66e06d425bed7412139e58
Diffstat (limited to 'aai-schema-ingest/src/test/java/org')
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java
index 74d254b1..57988f0b 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java
@@ -179,14 +179,11 @@ public class MockRestClient extends RestClient {
public JsonObject getPayload(String filename) throws IOException {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(filename);
- // InputStream inputStream = new FileInputStream(filename);
-
String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
String message = String.format("Unable to find the %s in src/test/resources", filename);
assertNotNull(message, inputStream);
- JsonParser parser = new JsonParser();
- JsonObject payload = parser.parse(result).getAsJsonObject();
+ JsonObject payload = JsonParser.parseString(result).getAsJsonObject();
return payload;
}