diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-10 09:21:49 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-10 09:31:12 +0000 |
commit | 5eb0e49534114edf8a76fef5b2a8e50c7bdaa812 (patch) | |
tree | b69c0e5d60fc48dd0c8084dfffb178b89566b83f /aai-schema-ingest/src/test/java/org/onap | |
parent | 8b504f6db32630ae4b6774efabc87ed76a950053 (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/onap')
-rw-r--r-- | aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java | 5 |
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; } |