diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-09 12:41:32 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-09 15:58:51 +0000 |
commit | 2c9ee21f2cf8fc230decfc48e3f652fe11862216 (patch) | |
tree | adbae7caa43364c0003cafdf668e1446266333b5 /aai-schema-ingest/src/test | |
parent | fbb02159b84435cf37221ae8ae5e0045167be15a (diff) |
Reduce the number of raw-type related warnings in aai-common
Issue-ID: AAI-3586
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: If4affb02cfe40b4b82ecbdbb1a25d919d88be25c
Diffstat (limited to 'aai-schema-ingest/src/test')
-rw-r--r-- | aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java | 14 | ||||
-rw-r--r-- | aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java | 2 |
2 files changed, 9 insertions, 7 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..9715f0ea 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 @@ -191,7 +191,7 @@ public class MockRestClient extends RestClient { } @Override - public ResponseEntity execute(String uri, HttpMethod method, Map<String, String> headers, String body) { + public ResponseEntity<String> execute(String uri, HttpMethod method, Map<String, String> headers, String body) { String url = "https://localhost:8447/aai/v14/" + uri; @@ -227,16 +227,17 @@ public class MockRestClient extends RestClient { headersMap.add("X-FromAppId", "JUNIT"); headersMap.add("X-TransactionId", "JUNIT"); - HttpEntity httpEntity = new HttpEntity(headers); + HttpEntity<String> httpEntity = new HttpEntity(headers); - ResponseEntity responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, String.class); + ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, String.class); // mockRestServiceServer.verify(); return responseEntity; } @Override - public ResponseEntity executeResource(String uri, HttpMethod method, Map<String, String> headers, String body) { + public ResponseEntity<Resource> executeResource(String uri, HttpMethod method, Map<String, String> headers, + String body) { String url = "https://localhost:8447/aai/v14/" + uri; @@ -272,9 +273,10 @@ public class MockRestClient extends RestClient { headersMap.add("X-FromAppId", "JUNIT"); headersMap.add("X-TransactionId", "JUNIT"); - HttpEntity httpEntity = new HttpEntity(headers); + HttpEntity<String> httpEntity = new HttpEntity(headers); - ResponseEntity responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, Resource.class); + ResponseEntity<Resource> responseEntity = + restTemplate.exchange(url, HttpMethod.GET, httpEntity, Resource.class); // mockRestServiceServer.verify(); return responseEntity; diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java index cbbc63d3..4b12936e 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java @@ -50,7 +50,7 @@ public class SchemaRestClientTest { @Test public void testGetRequestToSchemaService() { - ResponseEntity aaiResponse; + ResponseEntity<String> aaiResponse; RestClient restClient = null; restClient = restClientFactory.getRestClient(SCHEMA_SERVICE); |