From a147158a52e48ff89381f826e5b2d84bf93ae8d2 Mon Sep 17 00:00:00 2001 From: Tomasz Gwozdecki Date: Wed, 13 Feb 2019 03:17:27 -0500 Subject: junits for PombaClientImpl -Create new test class for PombaClientImpl -Added new test for PombaClientImpl.verify Change-Id: I776df73d592a219c0aa266a8207c92c1f475f4da Issue-ID: VID-418 Signed-off-by: Tomasz Gwozdecki --- .../src/main/java/org/onap/vid/aai/PombaClientImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/aai/PombaClientImpl.java') diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/PombaClientImpl.java b/vid-app-common/src/main/java/org/onap/vid/aai/PombaClientImpl.java index 000628d8a..15fda829c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/PombaClientImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/PombaClientImpl.java @@ -1,13 +1,13 @@ + package org.onap.vid.aai; import com.fasterxml.jackson.databind.ObjectMapper; +import javax.servlet.ServletContext; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.model.PombaInstance.PombaRequest; +import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.beans.factory.annotation.Autowired; -import javax.servlet.ServletContext; - public class PombaClientImpl implements PombaClientInterface { protected String fromAppId = "VidAaiController"; @@ -19,13 +19,14 @@ public class PombaClientImpl implements PombaClientInterface { @Autowired PombaRestInterface pombaRestInterface; + @Autowired + SystemPropertiesWrapper systemPropertiesWrapper; @Override public void verify(PombaRequest request) { String methodName = "doAaiPost"; logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); - String uri = SystemProperties.getProperty("pomba.server.url"); - + String uri = systemPropertiesWrapper.getProperty("pomba.server.url"); try { pombaRestInterface.RestPost(fromAppId, uri, new ObjectMapper().writeValueAsString(request)); -- cgit 1.2.3-korg