X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=dcae-analytics-cdap-tca%2Fsrc%2Ftest%2Fjava%2Forg%2Fopenecomp%2Fdcae%2Fapod%2Fanalytics%2Fcdap%2Ftca%2Futils%2FCDAPTCAUtilsTest.java;h=7b4f72b69816c159aab9430c25373e05c92d4346;hb=bff77d5302988e01a82bb3b224313cbb12123e5c;hp=2cb9002b25c4265174384973387cd310157432dc;hpb=294cba47b07654e90b6be22e9b59b308d100243d;p=dcaegen2%2Fanalytics%2Ftca.git 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);