From fe4cd8e4c08a19ac543ca93c577b8b3a12a1524f Mon Sep 17 00:00:00 2001 From: Liam Fallon Date: Thu, 14 Dec 2017 07:40:18 -0800 Subject: 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 Issue-ID: POLICY-455 Signed-off-by: Liam Fallon --- .../model-impl/so/src/main/java/org/onap/policy/so/SOManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'controlloop/common/model-impl/so/src/main') 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 httpDetails = RESTManager.post(url, username, password, headers, "application/json", requestJson); + Pair 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 httpDetailsGet = RESTManager.get(urlGet, username, password, headers); + Pair 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 httpResponse = RESTManager.post(url, "policy", "policy", headers, "application/json", soJson); + Pair httpResponse = new RESTManager().post(url, "policy", "policy", headers, "application/json", soJson); if (httpResponse != null ) { if (httpResponse.b != null && httpResponse.a != null) { -- cgit 1.2.3-korg