TCA: Get DMaaP pub/sub info from preferences
[dcaegen2/analytics/tca.git] / dcae-analytics-cdap-tca / src / test / java / org / openecomp / dcae / apod / analytics / cdap / tca / utils / CDAPTCAUtilsTest.java
index 2cb9002..7b4f72b 100644 (file)
@@ -28,6 +28,8 @@ import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
 import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
 import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
 \r
+import java.util.Map;\r
+\r
 import static org.hamcrest.CoreMatchers.is;\r
 import static org.junit.Assert.assertEquals;\r
 import static org.junit.Assert.assertThat;\r
@@ -42,7 +44,10 @@ public class CDAPTCAUtilsTest extends BaseAnalyticsCDAPTCAUnitTest {
     @Test\r
     public void testGetValidatedTCAAppPreferences() throws Exception {\r
         RuntimeContext runtimeContext = mock(RuntimeContext.class);\r
-        when(runtimeContext.getRuntimeArguments()).thenReturn(getPreferenceMap());\r
+        final Map<String, String> preferenceMap = getPreferenceMap();\r
+        preferenceMap.remove("subscriberHostName");\r
+        preferenceMap.remove("publisherHostName");\r
+        when(runtimeContext.getRuntimeArguments()).thenReturn(preferenceMap);\r
         ApplicationSpecification mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);\r
         when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));\r
         when(runtimeContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);\r