diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-04-19 08:39:27 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-04-22 16:52:20 +0200 |
commit | 93a7defb8a10ac29f97d3cfd860ca12a629bdc41 (patch) | |
tree | 969680e552f89bac017018e07ea776df9b3fb065 /src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java | |
parent | 8204d232f8cc37e28561ee18b60806c7b3f5f783 (diff) |
Use RestTemplate in AaiRestClient
- brings tracing support for the requests towards aai-resources
- leverage automatic object mapping done by Jackson in the background
- add model related entities
Issue-ID: AAI-3833
Change-Id: I4f6ec65c80a6dcc1e1e3fa10786a119996c3bc79
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java')
-rw-r--r-- | src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java b/src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java index 0985790..eb31688 100644 --- a/src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java +++ b/src/test/java/org/onap/aai/modelloader/notification/ArtifactDownloadManagerTest.java @@ -33,7 +33,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.ArrayList; import java.util.List; -import org.apache.http.entity.ContentType; import org.junit.jupiter.api.Test; import org.onap.aai.modelloader.DistributionClientTestConfiguration; import org.onap.aai.modelloader.entity.Artifact; @@ -66,11 +65,11 @@ public class ArtifactDownloadManagerTest { notificationData.setServiceVersion("2.0"); stubFor(get(urlEqualTo("/sdc/v1/catalog/services/DemovlbCds/1.0/artifacts/service-TestSvc-csar.csar")) - .withHeader("Accept", equalTo(ContentType.APPLICATION_OCTET_STREAM.toString())) + .withHeader("Accept", equalTo(MediaType.APPLICATION_OCTET_STREAM_VALUE)) .withHeader("X-ECOMP-RequestID", matching(".+")) .withHeader("X-ECOMP-InstanceID", equalTo("aai-ml-id-test")) .willReturn(aResponse() - .withHeader("Content-Type", MediaType.APPLICATION_OCTET_STREAM.toString()) + .withHeader("Content-Type", MediaType.APPLICATION_OCTET_STREAM_VALUE) .withBodyFile("service-TestSvc-csar.csar"))); stubFor( @@ -83,7 +82,7 @@ public class ArtifactDownloadManagerTest { .withRequestBody(matchingJsonPath("$.csar", matching(".*"))) .willReturn( aResponse() - .withHeader("Content-Type", "application/json") + .withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE) .withBodyFile("service-TestSvc-csar-babel-response.json"))); ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl(); |