diff options
author | Liam Fallon <liam.fallon@ericsson.com> | 2017-12-14 07:40:18 -0800 |
---|---|---|
committer | Liam Fallon <liam.fallon@ericsson.com> | 2017-12-14 20:07:40 -0800 |
commit | fe4cd8e4c08a19ac543ca93c577b8b3a12a1524f (patch) | |
tree | 263a3c0dc2ad9504c6a891f6c5b9d025b0fa74b7 /controlloop/common/model-impl/so | |
parent | 5cfd3b7066e6a6305e140fa59b1fccb8e3c5f81b (diff) |
Cleanup of A&AI message model module.
Fields have been made fields private in POJOs, and wrote JUnit unit tests to bring up code coverage. AAIManager also changed to use non-static methods so that it can be stubbed with Mockito.
Change-Id: I871427ced5db8a1dfd6495fef4e6d84adf264e65
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
Issue-ID: POLICY-455
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
Diffstat (limited to 'controlloop/common/model-impl/so')
-rw-r--r-- | controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java index 4ac98054f..e4d8af883 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java @@ -61,7 +61,7 @@ public final class SOManager { // String requestJson = Serialization.gsonPretty.toJson(request); netLogger.info("[OUT|{}|{}|]{}{}", "SO", url, System.lineSeparator(), requestJson); - Pair<Integer, String> httpDetails = RESTManager.post(url, username, password, headers, "application/json", requestJson); + Pair<Integer, String> httpDetails = new RESTManager().post(url, username, password, headers, "application/json", requestJson); if (httpDetails == null) { return null; @@ -84,7 +84,7 @@ public final class SOManager { while(attemptsLeft-- > 0){ - Pair<Integer, String> httpDetailsGet = RESTManager.get(urlGet, username, password, headers); + Pair<Integer, String> httpDetailsGet = new RESTManager().get(urlGet, username, password, headers); responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.b, SOResponse.class); netLogger.info("[IN|{}|{}|]{}{}", "SO", urlGet, System.lineSeparator(), httpDetailsGet.b); @@ -163,7 +163,7 @@ public final class SOManager { SOResponse so = new SOResponse(); netLogger.info("[OUT|{}|{}|]{}{}", "SO", url, System.lineSeparator(), soJson); - Pair<Integer, String> httpResponse = RESTManager.post(url, "policy", "policy", headers, "application/json", soJson); + Pair<Integer, String> httpResponse = new RESTManager().post(url, "policy", "policy", headers, "application/json", soJson); if (httpResponse != null ) { if (httpResponse.b != null && httpResponse.a != null) { |