From bff77d5302988e01a82bb3b224313cbb12123e5c Mon Sep 17 00:00:00 2001 From: "Singla, Rajiv (rs153v)" Date: Wed, 4 Oct 2017 16:32:12 -0400 Subject: TCA: Get DMaaP pub/sub info from preferences Change-Id: Ifb300fbd50dfe329590f74f6933118cab44b196c Signed-off-by: Singla, Rajiv (rs153v) Issue-Id: DCAEGEN2-123 --- .../dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dcae-analytics-cdap-tca/src/test/java') diff --git a/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java b/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java index 2cb9002..7b4f72b 100644 --- a/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java +++ b/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java @@ -28,6 +28,8 @@ import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest; import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences; import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy; +import java.util.Map; + import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -42,7 +44,10 @@ public class CDAPTCAUtilsTest extends BaseAnalyticsCDAPTCAUnitTest { @Test public void testGetValidatedTCAAppPreferences() throws Exception { RuntimeContext runtimeContext = mock(RuntimeContext.class); - when(runtimeContext.getRuntimeArguments()).thenReturn(getPreferenceMap()); + final Map preferenceMap = getPreferenceMap(); + preferenceMap.remove("subscriberHostName"); + preferenceMap.remove("publisherHostName"); + when(runtimeContext.getRuntimeArguments()).thenReturn(preferenceMap); ApplicationSpecification mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class); when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION)); when(runtimeContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification); -- cgit 1.2.3-korg