diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-03-26 11:28:49 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-03-26 11:28:49 +0100 |
commit | 19f034b2554895285f12979b0f36c1629f9af984 (patch) | |
tree | 21384448dfb9fd91a2cbb4d499897230e73c1bb7 /src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java | |
parent | 277fb3d9331b8a5c7fbdd8cf72cb623963a1ff4b (diff) |
Use more dependency injection in model-loader
- use more dependency injection
- make class variables final if possible
- simplify mock creation in some tests using @Mock
Issue-ID: AAI-3811
Change-Id: I7a7ccba02df78e6fd3bf082c23aac0968137661b
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java')
-rw-r--r-- | src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java b/src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java index 289015c..88967b2 100644 --- a/src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java +++ b/src/main/java/org/onap/aai/modelloader/restclient/HttpsBabelServiceClient.java @@ -224,7 +224,8 @@ public class HttpsBabelServiceClient implements BabelServiceClient { MdcOverride override = new MdcOverride(); override.addAttribute(MdcContext.MDC_START_TIME, ZonedDateTime.now().format(formatter)); - WebResource webResource = client.resource(config.getBabelBaseUrl() + config.getBabelGenerateArtifactsUrl()); + String resourceUrl = config.getBabelBaseUrl() + config.getBabelGenerateArtifactsUrl(); + WebResource webResource = client.resource(resourceUrl); ClientResponse response = webResource.type("application/json") .header(AaiRestClient.HEADER_TRANS_ID, Collections.singletonList(transactionId)) .header(AaiRestClient.HEADER_FROM_APP_ID, Collections.singletonList(AaiRestClient.ML_APP_NAME)) |