TCA: Replace any openecomp reference by onap 23/28823/1
authoran4828 <nekrassov@att.com>
Mon, 22 Jan 2018 22:17:34 +0000 (17:17 -0500)
committeran4828 <nekrassov@att.com>
Mon, 22 Jan 2018 22:20:00 +0000 (17:20 -0500)
Change-Id: I7c6d812ab5c1d7b30c63653d1974b0b1abc099be
Signed-off-by: an4828 <nekrassov@att.com>
Issue-ID: DCAEGEN2-224
Signed-off-by: an4828 <nekrassov@att.com>
370 files changed:
.gitignore
LICENSE.txt
README.md
cpd-exclude.properties
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/AAIClientFactory.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/AAIClientFactory.java with 88% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/domain/config/AAIEnrichmentConfig.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/domain/config/AAIEnrichmentConfig.java with 95% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/domain/config/AAIHttpClientConfig.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/domain/config/AAIHttpClientConfig.java with 98% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/domain/config/AAIHttpClientConfigBuilder.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/domain/config/AAIHttpClientConfigBuilder.java with 96% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/module/AnalyticsAAIModule.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/module/AnalyticsAAIModule.java with 77% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/service/AAIEnrichmentClient.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/service/AAIEnrichmentClient.java with 96% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/service/AAIEnrichmentClientFactory.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/service/AAIEnrichmentClientFactory.java with 92% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/service/AAIEnrichmentClientImpl.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/service/AAIEnrichmentClientImpl.java with 97% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/service/AAIHttpClient.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/service/AAIHttpClient.java with 96% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/service/AAIHttpClientFactory.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/service/AAIHttpClientFactory.java with 91% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/service/AAIHttpClientImpl.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/service/AAIHttpClientImpl.java with 96% similarity]
dcae-analytics-aai/src/main/java/org/onap/dcae/apod/analytics/aai/utils/ssl/AlwaysTrustingTrustStrategy.java [moved from dcae-analytics-aai/src/main/java/org/openecomp/dcae/apod/analytics/aai/utils/ssl/AlwaysTrustingTrustStrategy.java with 97% similarity]
dcae-analytics-aai/src/test/java/org/onap/dcae/apod/analytics/aai/BaseAnalyticsAAIGuiceUnitTest.java [moved from dcae-analytics-aai/src/test/java/org/openecomp/dcae/apod/analytics/aai/BaseAnalyticsAAIGuiceUnitTest.java with 91% similarity]
dcae-analytics-aai/src/test/java/org/onap/dcae/apod/analytics/aai/BaseAnalyticsAAIUnitTest.java [moved from dcae-analytics-aai/src/test/java/org/openecomp/dcae/apod/analytics/aai/BaseAnalyticsAAIUnitTest.java with 92% similarity]
dcae-analytics-aai/src/test/java/org/onap/dcae/apod/analytics/aai/it/AAIClientFactoryIT.java [moved from dcae-analytics-aai/src/test/java/org/openecomp/dcae/apod/analytics/aai/it/AAIClientFactoryIT.java with 94% similarity]
dcae-analytics-aai/src/test/java/org/onap/dcae/apod/analytics/aai/it/BaseAnalyticsAAIIT.java [moved from dcae-analytics-aai/src/test/java/org/openecomp/dcae/apod/analytics/aai/it/BaseAnalyticsAAIIT.java with 91% similarity]
dcae-analytics-aai/src/test/java/org/onap/dcae/apod/analytics/aai/service/AAIEnrichmentClientImplTest.java [moved from dcae-analytics-aai/src/test/java/org/openecomp/dcae/apod/analytics/aai/service/AAIEnrichmentClientImplTest.java with 95% similarity]
dcae-analytics-aai/src/test/java/org/onap/dcae/apod/analytics/aai/service/AAIHttpClientImplTest.java [moved from dcae-analytics-aai/src/test/java/org/openecomp/dcae/apod/analytics/aai/service/AAIHttpClientImplTest.java with 96% similarity]
dcae-analytics-aai/src/test/resources/logback-test.xml
dcae-analytics-cdap-common/pom.xml
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/CDAPComponentsConstants.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/CDAPComponentsConstants.java with 97% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/CDAPMetricsConstants.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/CDAPMetricsConstants.java with 96% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/CDAPPluginConstants.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/CDAPPluginConstants.java with 95% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/domain/tca/ThresholdCalculatorOutput.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/domain/tca/ThresholdCalculatorOutput.java with 94% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/exception/CDAPSettingsException.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/exception/CDAPSettingsException.java with 90% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAAlertsAbatementEntity.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAAlertsAbatementEntity.java with 95% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAAlertsAbatementPersister.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAAlertsAbatementPersister.java with 86% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCACalculatorMessageType.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCACalculatorMessageType.java with 93% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAMessageStatusEntity.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAMessageStatusEntity.java with 94% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAMessageStatusPersister.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAMessageStatusPersister.java with 87% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAVESAlertEntity.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAVESAlertEntity.java with 94% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAVESAlertsPersister.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAVESAlertsPersister.java with 89% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPAppConfig.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPAppConfig.java with 92% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPAppPreferences.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPAppPreferences.java with 92% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPAppSettings.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPAppSettings.java with 92% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPBaseAppConfig.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPBaseAppConfig.java with 90% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPBasePluginConfig.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPBasePluginConfig.java with 90% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPPluginSettings.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPPluginSettings.java with 92% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/utils/DMaaPMRUtils.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/utils/DMaaPMRUtils.java with 90% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/utils/ValidationUtils.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/utils/ValidationUtils.java with 88% similarity]
dcae-analytics-cdap-common/src/main/java/org/onap/dcae/apod/analytics/cdap/common/validation/CDAPAppSettingsValidator.java [moved from dcae-analytics-cdap-common/src/main/java/org/openecomp/dcae/apod/analytics/cdap/common/validation/CDAPAppSettingsValidator.java with 83% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/BaseAnalyticsCDAPCommonUnitTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/BaseAnalyticsCDAPCommonUnitTest.java with 80% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAAlertsAbatementPersisterTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAAlertsAbatementPersisterTest.java with 86% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCACalculatorMessageTypeTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCACalculatorMessageTypeTest.java with 88% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAMessageStatusPersisterTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAMessageStatusPersisterTest.java with 82% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/persistance/tca/TCAVESAlertsPersisterTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/persistance/tca/TCAVESAlertsPersisterTest.java with 91% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/settings/CDAPBaseAppConfigTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/settings/CDAPBaseAppConfigTest.java with 87% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/utils/DMaaPMRUtilsTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/utils/DMaaPMRUtilsTest.java with 89% similarity]
dcae-analytics-cdap-common/src/test/java/org/onap/dcae/apod/analytics/cdap/common/utils/ValidationUtilsTest.java [moved from dcae-analytics-cdap-common/src/test/java/org/openecomp/dcae/apod/analytics/cdap/common/utils/ValidationUtilsTest.java with 90% similarity]
dcae-analytics-cdap-common/src/test/resources/logback-test.xml
dcae-analytics-cdap-plugins/pom.xml
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormat.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormat.java with 87% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormatProvider.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormatProvider.java with 89% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRRecordWriter.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRRecordWriter.java with 91% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRSink.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRSink.java with 88% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/common/PluginSchema.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/common/PluginSchema.java with 93% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/BaseDMaaPMRPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/BaseDMaaPMRPluginConfig.java with 93% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSinkPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSinkPluginConfig.java with 95% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSourcePluginConfig.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSourcePluginConfig.java with 94% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/filter/JsonPathFilterPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/filter/JsonPathFilterPluginConfig.java with 93% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/tca/SimpleTCAPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/tca/SimpleTCAPluginConfig.java with 93% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/schema/dmaap/DMaaPSourceOutputSchema.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/schema/dmaap/DMaaPSourceOutputSchema.java with 91% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java with 86% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRReceiver.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRReceiver.java with 85% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRSource.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRSource.java with 84% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRReceiver.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRReceiver.java with 83% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRSource.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRSource.java with 90% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/transform/filter/JsonPathFilter.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/transform/filter/JsonPathFilter.java with 88% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/utils/CDAPPluginUtils.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/utils/CDAPPluginUtils.java with 94% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/utils/DMaaPSinkConfigMapper.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/utils/DMaaPSinkConfigMapper.java with 88% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/utils/DMaaPSourceConfigMapper.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/utils/DMaaPSourceConfigMapper.java with 89% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/BaseDMaaPMRPluginConfigValidator.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/BaseDMaaPMRPluginConfigValidator.java with 84% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSinkPluginConfigValidator.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSinkPluginConfigValidator.java with 85% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSourcePluginConfigValidator.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSourcePluginConfigValidator.java with 87% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/JsonPathFilterPluginConfigValidator.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/JsonPathFilterPluginConfigValidator.java with 85% similarity]
dcae-analytics-cdap-plugins/src/main/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/SimpleTCAPluginConfigValidator.java [moved from dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/SimpleTCAPluginConfigValidator.java with 87% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/BaseAnalyticsCDAPPluginsUnitTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/BaseAnalyticsCDAPPluginsUnitTest.java with 92% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormatProviderTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormatProviderTest.java with 87% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormatTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMROutputFormatTest.java with 92% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRRecordWriterTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRRecordWriterTest.java with 87% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRSinkTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/batch/sink/dmaap/DMaaPMRSinkTest.java with 92% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSinkPluginConfigTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSinkPluginConfigTest.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSourcePluginConfigTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/DMaaPMRSourcePluginConfigTest.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/TestDMaaPMRSinkPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/TestDMaaPMRSinkPluginConfig.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/TestDMaaPMRSourcePluginConfig.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/dmaap/TestDMaaPMRSourcePluginConfig.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/filter/TestJsonPathFilterPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/filter/TestJsonPathFilterPluginConfig.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/config/tca/TestSimpleTCAPluginConfig.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/config/tca/TestSimpleTCAPluginConfig.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/domain/schema/dmaap/DMaaPSourceOutputSchemaTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/domain/schema/dmaap/DMaaPSourceOutputSchemaTest.java with 91% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/it/SimpleTCAPluginCDAPIT.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/it/SimpleTCAPluginCDAPIT.java with 93% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPluginTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPluginTest.java with 91% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRReceiverTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRReceiverTest.java with 84% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRSourceTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/DMaaPMRSourceTest.java with 90% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRReceiverTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRReceiverTest.java with 83% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRSourceTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/MockDMaaPMRSourceTest.java with 88% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/streaming/dmaap/TestDMaaPMRReceiver.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/streaming/dmaap/TestDMaaPMRReceiver.java with 89% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/transform/filter/JsonPathFilterTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/transform/filter/JsonPathFilterTest.java with 93% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/utils/CDAPPluginUtilsTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/utils/CDAPPluginUtilsTest.java with 94% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/utils/DMaaPSinkConfigMapperTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/utils/DMaaPSinkConfigMapperTest.java with 89% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/utils/DMaaPSourceConfigMapperTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/utils/DMaaPSourceConfigMapperTest.java with 88% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSinkPluginConfigValidatorTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSinkPluginConfigValidatorTest.java with 86% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSourcePluginConfigValidatorTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/DMaaPMRSourcePluginConfigValidatorTest.java with 86% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/JsonPathFilterPluginConfigValidatorTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/JsonPathFilterPluginConfigValidatorTest.java with 89% similarity]
dcae-analytics-cdap-plugins/src/test/java/org/onap/dcae/apod/analytics/cdap/plugins/validator/SimpleTCAPluginConfigValidatorTest.java [moved from dcae-analytics-cdap-plugins/src/test/java/org/openecomp/dcae/apod/analytics/cdap/plugins/validator/SimpleTCAPluginConfigValidatorTest.java with 92% similarity]
dcae-analytics-cdap-plugins/src/test/resources/logback-test.xml
dcae-analytics-cdap-tca/pom.xml
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/TCAAnalyticsApplication.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/TCAAnalyticsApplication.java with 82% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/flow/TCAVESCollectorFlow.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/flow/TCAVESCollectorFlow.java with 82% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAAIEnrichmentFlowlet.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAAIEnrichmentFlowlet.java with 84% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsAbatementFlowlet.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsAbatementFlowlet.java with 86% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsSinkFlowlet.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsSinkFlowlet.java with 86% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESMessageRouterFlowlet.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESMessageRouterFlowlet.java with 89% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESThresholdViolationCalculatorFlowlet.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESThresholdViolationCalculatorFlowlet.java with 84% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCAAppConfig.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCAAppConfig.java with 91% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCAAppPreferences.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCAAppPreferences.java with 95% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCAPolicyPreferences.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCAPolicyPreferences.java with 84% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToPublisherConfigMapper.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToPublisherConfigMapper.java with 90% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToSubscriberConfigMapper.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToSubscriberConfigMapper.java with 91% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtils.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtils.java with 88% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/validator/TCAAppConfigValidator.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/validator/TCAAppConfigValidator.java with 83% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/validator/TCAPolicyPreferencesValidator.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/validator/TCAPolicyPreferencesValidator.java with 82% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/validator/TCAPreferencesValidator.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/validator/TCAPreferencesValidator.java with 88% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/worker/BaseTCADMaaPMRWorker.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/BaseTCADMaaPMRWorker.java with 92% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRPublisherJob.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRPublisherJob.java with 87% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRSubscriberJob.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRSubscriberJob.java with 89% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMockSubscriberWorker.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMockSubscriberWorker.java with 88% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPPublisherWorker.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPPublisherWorker.java with 85% similarity]
dcae-analytics-cdap-tca/src/main/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPSubscriberWorker.java [moved from dcae-analytics-cdap-tca/src/main/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPSubscriberWorker.java with 85% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/BaseAnalyticsCDAPTCAIT.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/BaseAnalyticsCDAPTCAIT.java with 87% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/BaseAnalyticsCDAPTCAUnitTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/BaseAnalyticsCDAPTCAUnitTest.java with 93% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/TCAAnalyticsApplicationTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/TCAAnalyticsApplicationTest.java with 91% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/flow/TCAVESCollectorFlowTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/flow/TCAVESCollectorFlowTest.java with 92% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsAbatementFlowletTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsAbatementFlowletTest.java with 91% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsSinkFlowletTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESAlertsSinkFlowletTest.java with 89% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESMessageRouterFlowletTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESMessageRouterFlowletTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/flowlet/TCAVESThresholdViolationCalculatorFlowletTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/flowlet/TCAVESThresholdViolationCalculatorFlowletTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/it/TCAnalyticsAppConfigIT.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/it/TCAnalyticsAppConfigIT.java with 83% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCATestAppConfig.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCATestAppConfig.java with 95% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCATestAppConfigHolder.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCATestAppConfigHolder.java with 93% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCATestAppPreferences.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCATestAppPreferences.java with 96% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/settings/TCATestAppPreferencesTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/settings/TCATestAppPreferencesTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToPublisherConfigMapperTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToPublisherConfigMapperTest.java with 87% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToSubscriberConfigMapperTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/AppPreferencesToSubscriberConfigMapperTest.java with 87% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/validator/TCAAppConfigValidatorTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/validator/TCAAppConfigValidatorTest.java with 87% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/validator/TCAPolicyPreferencesValidatorTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/validator/TCAPolicyPreferencesValidatorTest.java with 86% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/validator/TCAPreferencesValidatorTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/validator/TCAPreferencesValidatorTest.java with 88% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/worker/BaseTCADMaaPMRWorkerTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/BaseTCADMaaPMRWorkerTest.java with 91% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRPublisherJobTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRPublisherJobTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRSubscriberJobTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPMRSubscriberJobTest.java with 88% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPPublisherWorkerTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPPublisherWorkerTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/java/org/onap/dcae/apod/analytics/cdap/tca/worker/TCADMaaPSubscriberWorkerTest.java [moved from dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/worker/TCADMaaPSubscriberWorkerTest.java with 90% similarity]
dcae-analytics-cdap-tca/src/test/resources/logback-test.xml
dcae-analytics-common/pom.xml
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/AnalyticsConstants.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/AnalyticsConstants.java with 97% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/exception/DCAEAnalyticsRuntimeException.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/exception/DCAEAnalyticsRuntimeException.java with 94% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/exception/MessageProcessingException.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/exception/MessageProcessingException.java with 91% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/filter/GenericJsonMessageFilter.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/filter/GenericJsonMessageFilter.java with 95% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/filter/JsonMessageFilterProcessorContext.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/filter/JsonMessageFilterProcessorContext.java with 89% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/AbstractMessageProcessor.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/AbstractMessageProcessor.java with 95% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/AbstractProcessorContext.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/AbstractProcessorContext.java with 95% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/GenericMessageChainProcessor.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/GenericMessageChainProcessor.java with 87% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/GenericProcessorInfo.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/GenericProcessorInfo.java with 93% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/MessageProcessor.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/MessageProcessor.java with 94% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/ProcessingState.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/ProcessingState.java with 92% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/ProcessorContext.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/ProcessorContext.java with 94% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/service/processor/ProcessorInfo.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/service/processor/ProcessorInfo.java with 93% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/utils/HTTPUtils.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/utils/HTTPUtils.java with 94% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/utils/MessageProcessorUtils.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/utils/MessageProcessorUtils.java with 89% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/utils/PersistenceUtils.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/utils/PersistenceUtils.java with 94% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/validation/DCAEValidator.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/validation/DCAEValidator.java with 92% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/validation/GenericValidationResponse.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/validation/GenericValidationResponse.java with 94% similarity]
dcae-analytics-common/src/main/java/org/onap/dcae/apod/analytics/common/validation/ValidationResponse.java [moved from dcae-analytics-common/src/main/java/org/openecomp/dcae/apod/analytics/common/validation/ValidationResponse.java with 94% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java with 82% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/filter/GenericJsonMessageFilterTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/filter/GenericJsonMessageFilterTest.java with 94% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/AbstractMessageProcessorTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/AbstractMessageProcessorTest.java with 91% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/AbstractProcessorContextTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/AbstractProcessorContextTest.java with 93% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/GenericMessageChainProcessorTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/GenericMessageChainProcessorTest.java with 93% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/GenericProcessorInfoTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/GenericProcessorInfoTest.java with 91% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/TestEarlyTerminatingProcessor.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/TestEarlyTerminatingProcessor.java with 93% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/TestMessageProcessor1.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/TestMessageProcessor1.java with 93% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/TestMessageProcessor2.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/TestMessageProcessor2.java with 93% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/service/processor/TestProcessorContext.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/service/processor/TestProcessorContext.java with 94% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/utils/HTTPUtilsTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/utils/HTTPUtilsTest.java with 91% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/utils/MessageProcessorUtilsTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/utils/MessageProcessorUtilsTest.java with 89% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/utils/PersistenceUtilsTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/utils/PersistenceUtilsTest.java with 90% similarity]
dcae-analytics-common/src/test/java/org/onap/dcae/apod/analytics/common/validation/GenericValidationResponseTest.java [moved from dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/validation/GenericValidationResponseTest.java with 95% similarity]
dcae-analytics-common/src/test/resources/logback-test.xml
dcae-analytics-dmaap/pom.xml
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/DMaaPMRFactory.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/DMaaPMRFactory.java with 84% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRBaseConfig.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/config/DMaaPMRBaseConfig.java with 93% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRConfig.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/config/DMaaPMRConfig.java with 92% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfig.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfig.java with 95% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRSubscriberConfig.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/config/DMaaPMRSubscriberConfig.java with 95% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/response/DMaaPMRPublisherResponse.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/response/DMaaPMRPublisherResponse.java with 92% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/response/DMaaPMRPublisherResponseImpl.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/response/DMaaPMRPublisherResponseImpl.java with 94% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/response/DMaaPMRResponse.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/response/DMaaPMRResponse.java with 92% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/response/DMaaPMRSubscriberResponse.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/response/DMaaPMRSubscriberResponse.java with 93% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/response/DMaaPMRSubscriberResponseImpl.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/domain/response/DMaaPMRSubscriberResponseImpl.java with 95% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/module/AnalyticsDMaaPModule.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/module/AnalyticsDMaaPModule.java with 69% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/BaseDMaaPMRComponent.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/BaseDMaaPMRComponent.java with 92% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/DMaaPMRComponent.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/DMaaPMRComponent.java with 93% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisher.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisher.java with 88% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherFactory.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherFactory.java with 87% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherImpl.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherImpl.java with 92% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueue.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueue.java with 94% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueFactory.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueFactory.java with 93% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueImpl.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueImpl.java with 96% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriber.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriber.java with 86% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberFactory.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberFactory.java with 87% similarity]
dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberImpl.java [moved from dcae-analytics-dmaap/src/main/java/org/openecomp/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberImpl.java with 88% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/BaseAnalyticsDMaaPGuiceUnitTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/BaseAnalyticsDMaaPGuiceUnitTest.java with 89% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/BaseAnalyticsDMaaPUnitTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/BaseAnalyticsDMaaPUnitTest.java with 91% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/DMaaPMRFactoryTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/DMaaPMRFactoryTest.java with 77% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfigTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfigTest.java with 91% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRSubscriberConfigTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/domain/config/DMaaPMRSubscriberConfigTest.java with 92% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/it/BaseAnalyticsDMaaPIT.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/it/BaseAnalyticsDMaaPIT.java with 88% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/it/DMaaPMRPublisherImplIT.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/it/DMaaPMRPublisherImplIT.java with 85% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/it/DMaaPMRSubscriberImplIT.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/it/DMaaPMRSubscriberImplIT.java with 85% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/module/AnalyticsDMaaPTestModule.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/module/AnalyticsDMaaPTestModule.java with 69% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/BaseDMaaPMRComponentTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/BaseDMaaPMRComponentTest.java with 93% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherImplTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherImplTest.java with 93% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherMockImpl.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherMockImpl.java with 81% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueImplTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueImplTest.java with 96% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueMockImpl.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/publisher/DMaaPMRPublisherQueueMockImpl.java with 93% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberImplTest.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberImplTest.java with 92% similarity]
dcae-analytics-dmaap/src/test/java/org/onap/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberMockImpl.java [moved from dcae-analytics-dmaap/src/test/java/org/openecomp/dcae/apod/analytics/dmaap/service/subscriber/DMaaPMRSubscriberMockImpl.java with 79% similarity]
dcae-analytics-dmaap/src/test/resources/logback-test.xml
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/cucumber/CucumberRunnerIT.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/cucumber/CucumberRunnerIT.java with 92% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/cucumber/steps/DMaaPMRSteps.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/cucumber/steps/DMaaPMRSteps.java with 88% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/dmaap/DMaaPMRCreator.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/dmaap/DMaaPMRCreator.java with 93% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/dmaap/DMaaPMRCreatorImpl.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/dmaap/DMaaPMRCreatorImpl.java with 95% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/module/AnalyticsITInjectorSource.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/module/AnalyticsITInjectorSource.java with 96% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/module/IntegrationTestModule.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/module/IntegrationTestModule.java with 95% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/plugins/BaseAnalyticsPluginsIT.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/plugins/BaseAnalyticsPluginsIT.java with 97% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/plugins/DMaaPMRSourcePluginIT.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/plugins/DMaaPMRSourcePluginIT.java with 95% similarity]
dcae-analytics-it/src/test/java/org/onap/dcae/apod/analytics/it/util/StepUtils.java [moved from dcae-analytics-it/src/test/java/org/openecomp/dcae/apod/analytics/it/util/StepUtils.java with 96% similarity]
dcae-analytics-it/src/test/resources/cucumber.properties
dcae-analytics-it/src/test/resources/logback-test.xml
dcae-analytics-model/pom.xml
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java with 95% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DCAEAnalyticsModel.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DynamicPropertiesProvider.java with 95% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/ConfigModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/DMAAPInfo.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsPublishes.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleIn.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleOut.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java with 89% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java with 95% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Domain.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java with 94% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Field.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java with 95% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java with 94% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java with 95% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicPerformance.java with 97% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java with 87% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java with 94% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java with 95% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java with 94% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java with 87% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/FacadeModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAI.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java with 96% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java with 93% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java with 96% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java with 50% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java with 61% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java with 75% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAPolicyModule.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAPolicyModule.java with 59% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java with 91% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java with 87% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java with 85% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java with 89% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java with 85% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java with 88% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java with 92% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java with 81% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java with 87% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java with 83% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java with 89% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java with 85% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java with 86% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java with 91% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java with 91% similarity]
dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java [moved from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java with 92% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java with 94% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java with 92% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/AAITest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAITest.java with 91% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java with 94% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java with 94% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java with 92% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/ConfigHolder.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/ConfigHolder.java with 93% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/TestAppConfig.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/TestAppConfig.java with 93% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java with 93% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java with 85% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java with 88% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java with 87% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java with 88% similarity]
dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java [moved from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java with 87% similarity]
dcae-analytics-model/src/test/resources/logback-test.xml
dcae-analytics-tca/pom.xml
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/processor/AbstractTCAECEFPolicyProcessor.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/processor/AbstractTCAECEFPolicyProcessor.java with 86% similarity]
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFJsonProcessor.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFJsonProcessor.java with 89% similarity]
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFPolicyDomainFilter.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFPolicyDomainFilter.java with 92% similarity]
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFPolicyEventNameFilter.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFPolicyEventNameFilter.java with 90% similarity]
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFPolicyThresholdsProcessor.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFPolicyThresholdsProcessor.java with 89% similarity]
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFProcessorContext.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFProcessorContext.java with 87% similarity]
dcae-analytics-tca/src/main/java/org/onap/dcae/apod/analytics/tca/utils/TCAUtils.java [moved from dcae-analytics-tca/src/main/java/org/openecomp/dcae/apod/analytics/tca/utils/TCAUtils.java with 93% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/BaseAnalyticsTCAUnitTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/BaseAnalyticsTCAUnitTest.java with 89% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/processor/AbstractTCAECEFPolicyProcessorTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/processor/AbstractTCAECEFPolicyProcessorTest.java with 88% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFJsonProcessorTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFJsonProcessorTest.java with 92% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFPolicyDomainFilterTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFPolicyDomainFilterTest.java with 87% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFPolicyEventNameFilterTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFPolicyEventNameFilterTest.java with 89% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFPolicyThresholdsProcessorTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFPolicyThresholdsProcessorTest.java with 91% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/processor/TCACEFProcessorContextTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/processor/TCACEFProcessorContextTest.java with 89% similarity]
dcae-analytics-tca/src/test/java/org/onap/dcae/apod/analytics/tca/utils/TCAUtilsTest.java [moved from dcae-analytics-tca/src/test/java/org/openecomp/dcae/apod/analytics/tca/utils/TCAUtilsTest.java with 92% similarity]
dcae-analytics-tca/src/test/resources/logback-test.xml
dcae-analytics-test/pom.xml
dcae-analytics-test/src/main/java/org/onap/dcae/apod/analytics/test/BaseDCAEAnalyticsCommonTest.java [moved from dcae-analytics-test/src/main/java/org/openecomp/dcae/apod/analytics/test/BaseDCAEAnalyticsCommonTest.java with 97% similarity]
dcae-analytics-test/src/main/java/org/onap/dcae/apod/analytics/test/BaseDCAEAnalyticsIT.java [moved from dcae-analytics-test/src/main/java/org/openecomp/dcae/apod/analytics/test/BaseDCAEAnalyticsIT.java with 94% similarity]
dcae-analytics-test/src/main/java/org/onap/dcae/apod/analytics/test/BaseDCAEAnalyticsUnitTest.java [moved from dcae-analytics-test/src/main/java/org/openecomp/dcae/apod/analytics/test/BaseDCAEAnalyticsUnitTest.java with 94% similarity]
dcae-analytics-test/src/main/java/org/onap/dcae/apod/analytics/test/annotation/GuiceModules.java [moved from dcae-analytics-test/src/main/java/org/openecomp/dcae/apod/analytics/test/annotation/GuiceModules.java with 93% similarity]
dcae-analytics-test/src/main/java/org/onap/dcae/apod/analytics/test/runner/GuiceJUnitRunner.java [moved from dcae-analytics-test/src/main/java/org/openecomp/dcae/apod/analytics/test/runner/GuiceJUnitRunner.java with 94% similarity]
dcae-analytics-test/src/main/resources/logback-test.xml
findbugs-exclude.xml
pmd-exclude.properties
pom.xml

index b0cdacc..ff94b20 100644 (file)
@@ -48,3 +48,4 @@ dependency-reduced-pom.xml
 *_bdio.jsonld
 blackDuckHubProjectName.txt
 blackDuckHubProjectVersionName.txt
+/bin/
index 69d5fc1..728f803 100644 (file)
@@ -34,7 +34,4 @@
 *
 * ============LICENSE_END============================================
 *
-* ECOMP is a trademark and service mark of AT&T Intellectual Property.
-*
 */
-
index 562187e..1f4a0e9 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Repository DCAE Analytics Framework Platform
 
 Maven GroupId:
 --------------
-com.att.ecomp.dcae.analytics
+org.onap.dcaegen2.analytics.tca
 
 Maven Parent ArtifactId:
 ----------------
index eb94ed0..636e67b 100644 (file)
@@ -22,4 +22,4 @@
 # List comma separated fully qualified names of classes that can be excluded for CPD (COPY-PASTE-DETECTOR)
 # Builders for DMaaP MR Configs can have redundant code as they are used as temp place holders for building Immutable
 # Configs
-org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig,org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig
+org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig,org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai;
+package org.onap.dcae.apod.analytics.aai;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
-import org.openecomp.dcae.apod.analytics.aai.module.AnalyticsAAIModule;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClientFactory;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.module.AnalyticsAAIModule;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClientFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -18,9 +18,9 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.domain.config;
+package org.onap.dcae.apod.analytics.aai.domain.config;
 
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
 
 import java.io.Serializable;
 import java.net.URL;
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.module;
+package org.onap.dcae.apod.analytics.aai.module;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.assistedinject.FactoryModuleBuilder;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClientFactory;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClientImpl;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIHttpClient;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIHttpClientFactory;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIHttpClientImpl;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClientFactory;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClientImpl;
+import org.onap.dcae.apod.analytics.aai.service.AAIHttpClient;
+import org.onap.dcae.apod.analytics.aai.service.AAIHttpClientFactory;
+import org.onap.dcae.apod.analytics.aai.service.AAIHttpClientImpl;
 
 /**
  * <p>
@@ -18,9 +18,9 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.service;
+package org.onap.dcae.apod.analytics.aai.service;
 
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
 
 /**
  * Factory to initialize instance of {@link AAIEnrichmentClient} for Guice DI injection purposes.
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.service;
+package org.onap.dcae.apod.analytics.aai.service;
 
 import com.google.common.base.Optional;
 import com.google.inject.Inject;
@@ -31,8 +31,8 @@ import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.utils.URIBuilder;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.util.EntityUtils;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
-import org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.common.utils.HTTPUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -18,9 +18,9 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.service;
+package org.onap.dcae.apod.analytics.aai.service;
 
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
 
 /**
  * Factory to initialize instance of {@link AAIHttpClient} for Guice DI injection purposes.
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.service;
+package org.onap.dcae.apod.analytics.aai.service;
 
 import com.google.inject.Inject;
 import com.google.inject.assistedinject.Assisted;
@@ -35,9 +35,9 @@ import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.conn.DefaultProxyRoutePlanner;
 import org.apache.http.ssl.SSLContextBuilder;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
-import org.openecomp.dcae.apod.analytics.aai.utils.ssl.AlwaysTrustingTrustStrategy;
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.utils.ssl.AlwaysTrustingTrustStrategy;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai;
+package org.onap.dcae.apod.analytics.aai;
 
 import org.junit.runner.RunWith;
-import org.openecomp.dcae.apod.analytics.test.runner.GuiceJUnitRunner;
+import org.onap.dcae.apod.analytics.test.runner.GuiceJUnitRunner;
 
 /**
  * @author Rajiv Singla . Creation Date: 10/20/2016.
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai;
+package org.onap.dcae.apod.analytics.aai;
 
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfigBuilder;
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfigBuilder;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.it;
+package org.onap.dcae.apod.analytics.aai.it;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -26,8 +26,8 @@ import com.google.common.collect.ImmutableMap;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.aai.AAIClientFactory;
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
+import org.onap.dcae.apod.analytics.aai.AAIClientFactory;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
 
 import java.util.Collections;
 import java.util.Map;
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.it;
+package org.onap.dcae.apod.analytics.aai.it;
 
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfigBuilder;
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfigBuilder;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.service;
+package org.onap.dcae.apod.analytics.aai.service;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableMap;
@@ -30,8 +30,8 @@ import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.junit.Assert;
 import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.aai.BaseAnalyticsAAIUnitTest;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.BaseAnalyticsAAIUnitTest;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
 
 import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.aai.service;
+package org.onap.dcae.apod.analytics.aai.service;
 
 import org.apache.http.HttpHost;
 import org.apache.http.config.ConnectionConfig;
@@ -33,8 +33,8 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.http.impl.conn.SystemDefaultRoutePlanner;
 import org.junit.Assert;
 import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.aai.BaseAnalyticsAAIUnitTest;
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.BaseAnalyticsAAIUnitTest;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
 import sun.security.ssl.SSLContextImpl;
 import sun.security.ssl.SSLSocketFactoryImpl;
 
index f4ba1aa..896da06 100644 (file)
@@ -40,7 +40,7 @@
 
     <logger name="org.apache.twill" level="WARN"/>
     <logger name="co.cask.cdap" level="INFO"/>
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
 
     <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
         <encoder>
index 6fd2662..17acbff 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-\r
-    <artifactId>dcae-analytics-cdap-common</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS CDAP CODE COMMON FOR ALL CDAP DCAE ANALYTICS MODULES -->\r
-    <name>DCAE Analytics CDAP Common</name>\r
-    <description>Contains CDAP common code to all CDAP DCAE Analytics Modules</description>\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- DCAE DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-tca</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <!-- CDAP -->\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-api</artifactId>\r
-        </dependency>\r
-\r
-        <!-- HADOOP -->\r
-        <dependency>\r
-            <groupId>org.apache.hadoop</groupId>\r
-            <artifactId>hadoop-mapreduce-client-core</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.apache.hadoop</groupId>\r
-            <artifactId>hadoop-common</artifactId>\r
-        </dependency>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <!-- FIND BUGS -->\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-            <version>${findbugs.jsr305.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-            <version>${findbugs.annotations.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>dcae-analytics</artifactId>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+
+    <artifactId>dcae-analytics-cdap-common</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS CDAP CODE COMMON FOR ALL CDAP DCAE ANALYTICS MODULES -->
+    <name>DCAE Analytics CDAP Common</name>
+    <description>Contains CDAP common code to all CDAP DCAE Analytics Modules</description>
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+    </properties>
+
+    <dependencies>
+
+        <!-- DCAE DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-tca</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- CDAP -->
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-api</artifactId>
+        </dependency>
+
+        <!-- HADOOP -->
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-mapreduce-client-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+        </dependency>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- FIND BUGS -->
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+            <version>${findbugs.jsr305.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+            <version>${findbugs.annotations.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+
+</project>
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common;\r
-\r
-/**\r
- *  Contains static constant variable names and values of all DCAE CDAP Components for\r
- *  e.g. app names, app descriptions, streams, datasets, flows, flowlets, workers, outputs etc.\r
- *\r
- *  <p>\r
- *      A strict naming convention must be followed for variable names for CDAP Components names for proper\r
- *      identification of CDAP Component variable purpose and function. A custom configuration settings can be\r
- *      generated for app\r
- *      deployment purposes based on variable naming conventions.\r
- *\r
- *      The variable names should have 4 parts separated by an underscore:\r
- *          <ul>\r
- *              <li>Name of the DCAE sub module (e.g. TCA) to which variable is applicable</li>\r
- *              <li>Information about variable name:\r
- *                  <ul>\r
- *                      <li>FIXED - if variable value is fixed and cannot be changed</li>\r
- *                      <li>DEFAULT - if variable name is default name and can be changed by cdap settings file\r
- *                                    when application is created</li>\r
- *                  </ul>\r
- *              </li>\r
- *              <li>Actual Descriptive name about the CDAP component (may contain underscrores) </li>\r
- *              <li>CDAP component type e.g STREAM, DATASET, APP, FLOW, FLOWLET, OUTPUT</li>\r
- *          </ul>\r
- *\r
- *  <p>e.g TCA_DEFAULT_DMAAP_INPUT_STREAM</p>\r
- *\r
- *  <p><strong>RegEx Format (DCAE MODULE NAME)_(FIXED|DEFAULT)_(VARIABLE NAME)_(CDAP COMPONENT TYPE)</strong></p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public abstract class CDAPComponentsConstants {\r
-\r
-    // ===============  Common Module Constants ==================== //\r
-\r
-    /**\r
-     * Default DCAE App Name. It should be overriden by sub modules\r
-     */\r
-    public static final String COMMON_DEFAULT_DCAE_CDAP_NAME_APP = "DCAE_ANALYTICS_GENERIC_APP";\r
-\r
-    /**\r
-     * Default DCAE App Description. It should be overriden by sub modules\r
-     */\r
-    public static final String COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP = "DCAE ANALYTICS GENERIC APP DESCRIPTION";\r
-\r
-    // ===============  TCA Module Constants ==================== //\r
-\r
-    /**\r
-     * Default TCA application name if application name is not provided from startup configuration\r
-     */\r
-    public static final String TCA_DEFAULT_NAME_APP = "dcae-tca";\r
-\r
-    /**\r
-     * Default TCA application description if not provided from startup configuration\r
-     */\r
-    public static final String TCA_DEFAULT_DESCRIPTION_APP = "DCAE Analytics Threshold Crossing Alert Application";\r
-\r
-    /**\r
-     * Default TCA DMaaP Subscriber output stream name if not provided from startup configuration\r
-     */\r
-    public static final String TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM = "TCASubscriberOutputStream";\r
-\r
-\r
-    /**\r
-     * Fixed TCA DMaaP Subscriber output stream description\r
-     */\r
-    public static final String TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM =\r
-            "Stream which contains all message from VES Collector DMaaP MR topic";\r
-\r
-\r
-    /**\r
-     * Fixed Name of TCA DMaaP Subscriber Worker - which will be fetching DMaaP Messages posting them to CDAP stream\r
-     */\r
-    public static final String TCA_FIXED_DMAAP_SUBSCRIBER_WORKER = "TCADMaaPMRSubscriberWorker";\r
-\r
-    /**\r
-     * Fixed Description of TCA DMaaP Subscriber Worker\r
-     */\r
-    public static final String TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER =\r
-            "Fetches messages from DMaaP MR Topic at frequent intervals and writes them to a CDAP stream";\r
-\r
-    /**\r
-     * Fixed Name of TCA DMaaP Publisher Worker - which will be publishing messages to DMaaP MR\r
-     */\r
-    public static final String TCA_FIXED_DMAAP_PUBLISHER_WORKER = "TCADMaaPMRPublisherWorker";\r
-\r
-    /**\r
-     * Fixed Description of TCA DMaaP Publisher Worker\r
-     */\r
-    public static final String TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER =\r
-            "Polls TCA Alerts Table at frequent intervals for new alerts and publishes them to DMaaP MR Topic";\r
-\r
-    /**\r
-     * Fixed name for TCA VES Collector Messages Processing Flow\r
-     */\r
-    public static final String TCA_FIXED_VES_COLLECTOR_NAME_FLOW = "TCAVESCollectorFlow";\r
-\r
-\r
-    /**\r
-     * Fixed description for TCA VES Collector Messages Processing Flow\r
-     */\r
-    public static final String TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW = "Flow performs TCA on VES Collector Messages";\r
-\r
-\r
-    /**\r
-     * Fixed Name for TCA VES Message Router Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET = "TCAVESMessageRouterFlowlet";\r
-\r
-    /**\r
-     * Fixed Description for TCA VES Message Router Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET =\r
-            "Routes message received from TCA VES Collector to TCA Threshold Calculator Flowlet instances";\r
-\r
-    /**\r
-     * Fixed TCA VES Message Router Flowlet Output\r
-     */\r
-    public static final String TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT = "TCAVESMessageRouterFlowlet";\r
-\r
-    /**\r
-     * Fixed Name for TCA VES Message Policy Violated Threshold Calculator Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET =\r
-            "TCAVESThresholdViolationCalculatorFlowlet";\r
-\r
-    /**\r
-     * Fixed Description for TCA VES Message Policy Violated Threshold Calculator Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET =\r
-            "Applies TCA Policy Thresholds to VES Message and determined if any message violated TCA Policy thresholds";\r
-\r
-    /**\r
-     * Fixed Name for TCA VES Message Policy Violated Threshold Calculator Output\r
-     */\r
-    public static final String TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT = "TCAThresholdViolationCalculatorOutput";\r
-\r
-\r
-    /**\r
-     * Fixed Name for TCA VES Alerts Abatement Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET = "TCAVESAlertsAbatementFlowlet";\r
-\r
-    /**\r
-     * Fixed Description for TCA VES Alerts Abatement Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_ALERTS_ABATEMENT_DESCRIPTION_FLOWLET =\r
-            "Determines if abatement event needs to be posted to downstream systems";\r
-\r
-    /**\r
-     * Fixed Name for TCA VES Alerts Abatement Flowlet output\r
-     */\r
-    public static final String TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_OUTPUT = "TCAVESAlertsAbatementFlowletOutput";\r
-\r
-\r
-    /**\r
-     * Fixed Name for TCA VES A&AI Enrichment Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_AAI_ENRICHMENT_NAME_FLOWLET = "TCAVESAAIEnrichmentFlowlet";\r
-\r
-    /**\r
-     * Fixed Description for TCA VES A&AI Enrichment Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_AAI_ENRICHMENT_DESCRIPTION_FLOWLET =\r
-            "Performs A&AI Enrichment of non abated alerts";\r
-\r
-    /**\r
-     * Fixed Name for TCA VES A&AI Enrichment Flowlet output\r
-     */\r
-    public static final String TCA_FIXED_VES_AAI_ENRICHMENT_NAME_OUTPUT = "TCAVESAAIEnrichmentFlowletOutput";\r
-\r
-    /**\r
-     * Fixed Name for TCA VES Alerts Sink Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET = "TCAVESAlertsSinkFlowlet";\r
-\r
-    /**\r
-     * Fixed Description for TCA VES Alerts Sink Flowlet\r
-     */\r
-    public static final String TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET =\r
-            "Saves messages which violated TCA Policy in a data set";\r
-\r
-\r
-    /**\r
-     * Default Name for TCA VES Message status table which contain status of all messages processed by TCA\r
-     */\r
-    public static final String TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE = "TCAVESMessageStatusTable";\r
-\r
-\r
-    /**\r
-     * Fixed Description for TCA VES Message status table which contain status of all messages processed by TCA\r
-     */\r
-    public static final String TCA_FIXED_VES_MESSAGE_STATUS_DESCRIPTION_TABLE =\r
-            "Store processing information about all incoming TCA VES Messages";\r
-\r
-    /**\r
-     * Default Name for TCA VES Alerts table which contains alerts that can be send to downstream systems\r
-     */\r
-    public static final String TCA_DEFAULT_VES_ALERTS_NAME_TABLE = "TCAVESAlertsTable";\r
-\r
-    /**\r
-     * Fixed Description for TCA VES Alerts table which contains alerts that can be send to downstream systems\r
-     */\r
-    public static final String TCA_FIXED_VES_ALERTS_DESCRIPTION_TABLE =\r
-            "Stores alert messages that need to be DMaaP";\r
-\r
-    /**\r
-     * Default Name for TCA Alerts abatement table which contains information to send out abated alerts\r
-     */\r
-    public static final String TCA_DEFAULT_ALERTS_ABATEMENT_NAME_TABLE = "TCAAlertsAbatementTable";\r
-\r
-    /**\r
-     * Fixed Description for TCA Alerts abatement table which contains information to determine abatement alerts\r
-     */\r
-    public static final String TCA_FIXED_ALERTS_ABATEMENT_DESCRIPTION_TABLE =\r
-            "Stores information to determine creation of abatement alerts";\r
-\r
-\r
-    private CDAPComponentsConstants() {\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common;
+
+/**
+ *  Contains static constant variable names and values of all DCAE CDAP Components for
+ *  e.g. app names, app descriptions, streams, datasets, flows, flowlets, workers, outputs etc.
+ *
+ *  <p>
+ *      A strict naming convention must be followed for variable names for CDAP Components names for proper
+ *      identification of CDAP Component variable purpose and function. A custom configuration settings can be
+ *      generated for app
+ *      deployment purposes based on variable naming conventions.
+ *
+ *      The variable names should have 4 parts separated by an underscore:
+ *          <ul>
+ *              <li>Name of the DCAE sub module (e.g. TCA) to which variable is applicable</li>
+ *              <li>Information about variable name:
+ *                  <ul>
+ *                      <li>FIXED - if variable value is fixed and cannot be changed</li>
+ *                      <li>DEFAULT - if variable name is default name and can be changed by cdap settings file
+ *                                    when application is created</li>
+ *                  </ul>
+ *              </li>
+ *              <li>Actual Descriptive name about the CDAP component (may contain underscrores) </li>
+ *              <li>CDAP component type e.g STREAM, DATASET, APP, FLOW, FLOWLET, OUTPUT</li>
+ *          </ul>
+ *
+ *  <p>e.g TCA_DEFAULT_DMAAP_INPUT_STREAM</p>
+ *
+ *  <p><strong>RegEx Format (DCAE MODULE NAME)_(FIXED|DEFAULT)_(VARIABLE NAME)_(CDAP COMPONENT TYPE)</strong></p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public abstract class CDAPComponentsConstants {
+
+    // ===============  Common Module Constants ==================== //
+
+    /**
+     * Default DCAE App Name. It should be overriden by sub modules
+     */
+    public static final String COMMON_DEFAULT_DCAE_CDAP_NAME_APP = "DCAE_ANALYTICS_GENERIC_APP";
+
+    /**
+     * Default DCAE App Description. It should be overriden by sub modules
+     */
+    public static final String COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP = "DCAE ANALYTICS GENERIC APP DESCRIPTION";
+
+    // ===============  TCA Module Constants ==================== //
+
+    /**
+     * Default TCA application name if application name is not provided from startup configuration
+     */
+    public static final String TCA_DEFAULT_NAME_APP = "dcae-tca";
+
+    /**
+     * Default TCA application description if not provided from startup configuration
+     */
+    public static final String TCA_DEFAULT_DESCRIPTION_APP = "DCAE Analytics Threshold Crossing Alert Application";
+
+    /**
+     * Default TCA DMaaP Subscriber output stream name if not provided from startup configuration
+     */
+    public static final String TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM = "TCASubscriberOutputStream";
+
+
+    /**
+     * Fixed TCA DMaaP Subscriber output stream description
+     */
+    public static final String TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM =
+            "Stream which contains all message from VES Collector DMaaP MR topic";
+
+
+    /**
+     * Fixed Name of TCA DMaaP Subscriber Worker - which will be fetching DMaaP Messages posting them to CDAP stream
+     */
+    public static final String TCA_FIXED_DMAAP_SUBSCRIBER_WORKER = "TCADMaaPMRSubscriberWorker";
+
+    /**
+     * Fixed Description of TCA DMaaP Subscriber Worker
+     */
+    public static final String TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER =
+            "Fetches messages from DMaaP MR Topic at frequent intervals and writes them to a CDAP stream";
+
+    /**
+     * Fixed Name of TCA DMaaP Publisher Worker - which will be publishing messages to DMaaP MR
+     */
+    public static final String TCA_FIXED_DMAAP_PUBLISHER_WORKER = "TCADMaaPMRPublisherWorker";
+
+    /**
+     * Fixed Description of TCA DMaaP Publisher Worker
+     */
+    public static final String TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER =
+            "Polls TCA Alerts Table at frequent intervals for new alerts and publishes them to DMaaP MR Topic";
+
+    /**
+     * Fixed name for TCA VES Collector Messages Processing Flow
+     */
+    public static final String TCA_FIXED_VES_COLLECTOR_NAME_FLOW = "TCAVESCollectorFlow";
+
+
+    /**
+     * Fixed description for TCA VES Collector Messages Processing Flow
+     */
+    public static final String TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW = "Flow performs TCA on VES Collector Messages";
+
+
+    /**
+     * Fixed Name for TCA VES Message Router Flowlet
+     */
+    public static final String TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET = "TCAVESMessageRouterFlowlet";
+
+    /**
+     * Fixed Description for TCA VES Message Router Flowlet
+     */
+    public static final String TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET =
+            "Routes message received from TCA VES Collector to TCA Threshold Calculator Flowlet instances";
+
+    /**
+     * Fixed TCA VES Message Router Flowlet Output
+     */
+    public static final String TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT = "TCAVESMessageRouterFlowlet";
+
+    /**
+     * Fixed Name for TCA VES Message Policy Violated Threshold Calculator Flowlet
+     */
+    public static final String TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET =
+            "TCAVESThresholdViolationCalculatorFlowlet";
+
+    /**
+     * Fixed Description for TCA VES Message Policy Violated Threshold Calculator Flowlet
+     */
+    public static final String TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET =
+            "Applies TCA Policy Thresholds to VES Message and determined if any message violated TCA Policy thresholds";
+
+    /**
+     * Fixed Name for TCA VES Message Policy Violated Threshold Calculator Output
+     */
+    public static final String TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT = "TCAThresholdViolationCalculatorOutput";
+
+
+    /**
+     * Fixed Name for TCA VES Alerts Abatement Flowlet
+     */
+    public static final String TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET = "TCAVESAlertsAbatementFlowlet";
+
+    /**
+     * Fixed Description for TCA VES Alerts Abatement Flowlet
+     */
+    public static final String TCA_FIXED_VES_ALERTS_ABATEMENT_DESCRIPTION_FLOWLET =
+            "Determines if abatement event needs to be posted to downstream systems";
+
+    /**
+     * Fixed Name for TCA VES Alerts Abatement Flowlet output
+     */
+    public static final String TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_OUTPUT = "TCAVESAlertsAbatementFlowletOutput";
+
+
+    /**
+     * Fixed Name for TCA VES A&AI Enrichment Flowlet
+     */
+    public static final String TCA_FIXED_VES_AAI_ENRICHMENT_NAME_FLOWLET = "TCAVESAAIEnrichmentFlowlet";
+
+    /**
+     * Fixed Description for TCA VES A&AI Enrichment Flowlet
+     */
+    public static final String TCA_FIXED_VES_AAI_ENRICHMENT_DESCRIPTION_FLOWLET =
+            "Performs A&AI Enrichment of non abated alerts";
+
+    /**
+     * Fixed Name for TCA VES A&AI Enrichment Flowlet output
+     */
+    public static final String TCA_FIXED_VES_AAI_ENRICHMENT_NAME_OUTPUT = "TCAVESAAIEnrichmentFlowletOutput";
+
+    /**
+     * Fixed Name for TCA VES Alerts Sink Flowlet
+     */
+    public static final String TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET = "TCAVESAlertsSinkFlowlet";
+
+    /**
+     * Fixed Description for TCA VES Alerts Sink Flowlet
+     */
+    public static final String TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET =
+            "Saves messages which violated TCA Policy in a data set";
+
+
+    /**
+     * Default Name for TCA VES Message status table which contain status of all messages processed by TCA
+     */
+    public static final String TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE = "TCAVESMessageStatusTable";
+
+
+    /**
+     * Fixed Description for TCA VES Message status table which contain status of all messages processed by TCA
+     */
+    public static final String TCA_FIXED_VES_MESSAGE_STATUS_DESCRIPTION_TABLE =
+            "Store processing information about all incoming TCA VES Messages";
+
+    /**
+     * Default Name for TCA VES Alerts table which contains alerts that can be send to downstream systems
+     */
+    public static final String TCA_DEFAULT_VES_ALERTS_NAME_TABLE = "TCAVESAlertsTable";
+
+    /**
+     * Fixed Description for TCA VES Alerts table which contains alerts that can be send to downstream systems
+     */
+    public static final String TCA_FIXED_VES_ALERTS_DESCRIPTION_TABLE =
+            "Stores alert messages that need to be DMaaP";
+
+    /**
+     * Default Name for TCA Alerts abatement table which contains information to send out abated alerts
+     */
+    public static final String TCA_DEFAULT_ALERTS_ABATEMENT_NAME_TABLE = "TCAAlertsAbatementTable";
+
+    /**
+     * Fixed Description for TCA Alerts abatement table which contains information to determine abatement alerts
+     */
+    public static final String TCA_FIXED_ALERTS_ABATEMENT_DESCRIPTION_TABLE =
+            "Stores information to determine creation of abatement alerts";
+
+
+    private CDAPComponentsConstants() {
+
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common;\r
-\r
-/**\r
- * Contains all metrics names used for DCAE CDAP modules\r
- *\r
- * <p>\r
- *     Format should be (ModuleName)_(Description of metrics)_METRIC e.g. TCA_WORKER_FAILED_ATTEMPTS_METRIC\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/25/2016.\r
- */\r
-public abstract class CDAPMetricsConstants {\r
-\r
-    /**\r
-     * Metric captures count of all responses received from DMaaP MR Subscriber Topic\r
-     */\r
-    public static final String DMAAP_MR_SUBSCRIBER_ALL_RESPONSES_COUNT_METRIC =\r
-            "dmaap.subscriber.fetch.all_responses";\r
-\r
-    /**\r
-     * Metric captures count of responses from DMaaP MR Subscriber Topic which does not have 200 HTTP Response code.\r
-     * This can be due to DMaaP topic being down or any internal server errors etc.\r
-     */\r
-    public static final String DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC =\r
-            "dmaap.subscriber.fetch.unsuccessful";\r
-\r
-    /**\r
-     * Metric that counts the number of successful (200 HTTP Response Code) calls to DMaaP which did not had empty\r
-     * messages\r
-     */\r
-    public static final String DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC =\r
-            "dmaap.subscriber.fetch.no_message";\r
-\r
-    /**\r
-     * Metric to count total number of message processed by DMaaP MR subscriber\r
-     */\r
-    public static final String DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC = "dmaap.subscriber.message.count";\r
-\r
-\r
-    /**\r
-     * Metric to record time taken in ms by subscriber in its most recent call to fetch DMaaP MR messages\r
-     */\r
-    public static final String DMAAP_MR_SUBSCRIBER_RESPONSE_TIME_MS_METRIC = "dmaap.subscriber.fetch.response_time";\r
-\r
-    /**\r
-     * Metric captures the count of number of times DMaaP MR Subscriber was unable to write to DMaaP Stream due\r
-     * some CDAP error while writing to stream. This should ideally never happen assuming we have enough space\r
-     * on CDAP machine and CDAP process is functioning normally\r
-     */\r
-    public static final String TCA_SUBSCRIBER_FAILURE_TO_WRITE_TO_STREAM_METRIC = "tca.subscriber.stream.writing.error";\r
-\r
-\r
-    /**\r
-     * Metric captures number of VES messages that are not applicable as per TCA Policy\r
-     */\r
-    public static final String TCA_VES_INAPPLICABLE_MESSAGES_METRIC = "tca.ves.calculator.inapplicable";\r
-\r
-    /**\r
-     * Metric captures number of VES messages that are applicable as per TCA Policy but don't violate any thresholds\r
-     */\r
-    public static final String TCA_VES_COMPLIANT_MESSAGES_METRIC = "tca.ves.calculator.compliant";\r
-\r
-    /**\r
-     * Metrics captures number of VES messages that are applicable as per TCA Policy and does violate thresholds and\r
-     * will likely cause an alert\r
-     */\r
-    public static final String TCA_VES_NON_COMPLIANT_MESSAGES_METRIC = "tca.ves.calculator.non_compliant";\r
-\r
-\r
-    /**\r
-     * Metric that counts the number of publisher look ups in alerts table which resulted in 0 new alerts\r
-     */\r
-    public static final String TCA_PUBLISHER_NO_NEW_ALERTS_LOOKUP_METRIC = "tca.publisher.lookup.no_message";\r
-\r
-    /**\r
-     * Metric that counts the number of new alerts found by the publisher in alerts table\r
-     */\r
-    public static final String TCA_PUBLISHER_NEW_ALERTS_METRIC = "tca.publisher.lookup.new_messages";\r
-\r
-    /**\r
-     * Metric that counts the number of alerts deleted by publisher in alerts table\r
-     */\r
-    public static final String TCA_PUBLISHER_DELETED_ALERTS_METRIC = "tca.publisher.deleted.alerts";\r
-\r
-    /**\r
-     * Metric that counts the number of publisher calls to DMaaP which resulted in successful response code\r
-     */\r
-    public static final String TCA_PUBLISHER_SUCCESSFUL_DMAAP_RESPONSE_METRIC = "tca.publisher.publish.successful";\r
-\r
-    /**\r
-     * Metric that counts the number of publisher calls to DMaaP which resulted in unsuccessful response code\r
-     */\r
-    public static final String TCA_PUBLISHER_UNSUCCESSFUL_DMAAP_RESPONSE_METRIC = "tca.publisher.publish.unsuccessful";\r
-\r
-    private CDAPMetricsConstants() {\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common;
+
+/**
+ * Contains all metrics names used for DCAE CDAP modules
+ *
+ * <p>
+ *     Format should be (ModuleName)_(Description of metrics)_METRIC e.g. TCA_WORKER_FAILED_ATTEMPTS_METRIC
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/25/2016.
+ */
+public abstract class CDAPMetricsConstants {
+
+    /**
+     * Metric captures count of all responses received from DMaaP MR Subscriber Topic
+     */
+    public static final String DMAAP_MR_SUBSCRIBER_ALL_RESPONSES_COUNT_METRIC =
+            "dmaap.subscriber.fetch.all_responses";
+
+    /**
+     * Metric captures count of responses from DMaaP MR Subscriber Topic which does not have 200 HTTP Response code.
+     * This can be due to DMaaP topic being down or any internal server errors etc.
+     */
+    public static final String DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC =
+            "dmaap.subscriber.fetch.unsuccessful";
+
+    /**
+     * Metric that counts the number of successful (200 HTTP Response Code) calls to DMaaP which did not had empty
+     * messages
+     */
+    public static final String DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC =
+            "dmaap.subscriber.fetch.no_message";
+
+    /**
+     * Metric to count total number of message processed by DMaaP MR subscriber
+     */
+    public static final String DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC = "dmaap.subscriber.message.count";
+
+
+    /**
+     * Metric to record time taken in ms by subscriber in its most recent call to fetch DMaaP MR messages
+     */
+    public static final String DMAAP_MR_SUBSCRIBER_RESPONSE_TIME_MS_METRIC = "dmaap.subscriber.fetch.response_time";
+
+    /**
+     * Metric captures the count of number of times DMaaP MR Subscriber was unable to write to DMaaP Stream due
+     * some CDAP error while writing to stream. This should ideally never happen assuming we have enough space
+     * on CDAP machine and CDAP process is functioning normally
+     */
+    public static final String TCA_SUBSCRIBER_FAILURE_TO_WRITE_TO_STREAM_METRIC = "tca.subscriber.stream.writing.error";
+
+
+    /**
+     * Metric captures number of VES messages that are not applicable as per TCA Policy
+     */
+    public static final String TCA_VES_INAPPLICABLE_MESSAGES_METRIC = "tca.ves.calculator.inapplicable";
+
+    /**
+     * Metric captures number of VES messages that are applicable as per TCA Policy but don't violate any thresholds
+     */
+    public static final String TCA_VES_COMPLIANT_MESSAGES_METRIC = "tca.ves.calculator.compliant";
+
+    /**
+     * Metrics captures number of VES messages that are applicable as per TCA Policy and does violate thresholds and
+     * will likely cause an alert
+     */
+    public static final String TCA_VES_NON_COMPLIANT_MESSAGES_METRIC = "tca.ves.calculator.non_compliant";
+
+
+    /**
+     * Metric that counts the number of publisher look ups in alerts table which resulted in 0 new alerts
+     */
+    public static final String TCA_PUBLISHER_NO_NEW_ALERTS_LOOKUP_METRIC = "tca.publisher.lookup.no_message";
+
+    /**
+     * Metric that counts the number of new alerts found by the publisher in alerts table
+     */
+    public static final String TCA_PUBLISHER_NEW_ALERTS_METRIC = "tca.publisher.lookup.new_messages";
+
+    /**
+     * Metric that counts the number of alerts deleted by publisher in alerts table
+     */
+    public static final String TCA_PUBLISHER_DELETED_ALERTS_METRIC = "tca.publisher.deleted.alerts";
+
+    /**
+     * Metric that counts the number of publisher calls to DMaaP which resulted in successful response code
+     */
+    public static final String TCA_PUBLISHER_SUCCESSFUL_DMAAP_RESPONSE_METRIC = "tca.publisher.publish.successful";
+
+    /**
+     * Metric that counts the number of publisher calls to DMaaP which resulted in unsuccessful response code
+     */
+    public static final String TCA_PUBLISHER_UNSUCCESSFUL_DMAAP_RESPONSE_METRIC = "tca.publisher.publish.unsuccessful";
+
+    private CDAPMetricsConstants() {
+
+    }
+
+}
@@ -1,71 +1,71 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common;\r
-\r
-/**\r
- * <p>\r
- *      Contains CDAP Plugin Constants\r
- * </p>\r
- * @author Rajiv Singla . Creation Date: 1/17/2017.\r
- */\r
-public abstract class CDAPPluginConstants {\r
-\r
-    /**\r
-     * Common Reference Name property name and description used to create an external Dataset for metadata, lineage\r
-     * purposes\r
-     */\r
-    public static class Reference {\r
-\r
-        public static final String REFERENCE_NAME = "referenceName";\r
-        public static final String REFERENCE_NAME_DESCRIPTION =\r
-                "This will be used to uniquely identify this source/sink for lineage, annotating metadata, etc.";\r
-\r
-        private Reference() {\r
-            // private constructor\r
-        }\r
-\r
-    }\r
-\r
-    /**\r
-     * Contains fields for DMaaP MR Sink Map Reduce Hadoop Configuration\r
-     */\r
-    public static class DMaaPMRSinkHadoopConfigFields {\r
-\r
-        public static final String HOST_NAME = "dmaap.mr.sink.hostName";\r
-        public static final String PORT_NUMBER = "dmaap.mr.sink.portNumber";\r
-        public static final String TOPIC_NAME = "dmaap.mr.sink.topicName";\r
-        public static final String PROTOCOL = "dmaap.mr.sink.protocol";\r
-        public static final String USER_NAME = "dmaap.mr.sink.userName";\r
-        public static final String USER_PASS = "dmaap.mr.sink.userPassword";\r
-        public static final String CONTENT_TYPE = "dmaap.mr.sink.contentType";\r
-        public static final String MAX_BATCH_SIZE = "dmaap.mr.sink.maxBatchSize";\r
-        public static final String MAX_RECOVER_QUEUE_SIZE = "dmaap.mr.sink.maxRecoveryQueueSize";\r
-\r
-        private DMaaPMRSinkHadoopConfigFields() {\r
-            // private constructor\r
-        }\r
-    }\r
-\r
-\r
-    private CDAPPluginConstants() {\r
-        // private constructor\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common;
+
+/**
+ * <p>
+ *      Contains CDAP Plugin Constants
+ * </p>
+ * @author Rajiv Singla . Creation Date: 1/17/2017.
+ */
+public abstract class CDAPPluginConstants {
+
+    /**
+     * Common Reference Name property name and description used to create an external Dataset for metadata, lineage
+     * purposes
+     */
+    public static class Reference {
+
+        public static final String REFERENCE_NAME = "referenceName";
+        public static final String REFERENCE_NAME_DESCRIPTION =
+                "This will be used to uniquely identify this source/sink for lineage, annotating metadata, etc.";
+
+        private Reference() {
+            // private constructor
+        }
+
+    }
+
+    /**
+     * Contains fields for DMaaP MR Sink Map Reduce Hadoop Configuration
+     */
+    public static class DMaaPMRSinkHadoopConfigFields {
+
+        public static final String HOST_NAME = "dmaap.mr.sink.hostName";
+        public static final String PORT_NUMBER = "dmaap.mr.sink.portNumber";
+        public static final String TOPIC_NAME = "dmaap.mr.sink.topicName";
+        public static final String PROTOCOL = "dmaap.mr.sink.protocol";
+        public static final String USER_NAME = "dmaap.mr.sink.userName";
+        public static final String USER_PASS = "dmaap.mr.sink.userPassword";
+        public static final String CONTENT_TYPE = "dmaap.mr.sink.contentType";
+        public static final String MAX_BATCH_SIZE = "dmaap.mr.sink.maxBatchSize";
+        public static final String MAX_RECOVER_QUEUE_SIZE = "dmaap.mr.sink.maxRecoveryQueueSize";
+
+        private DMaaPMRSinkHadoopConfigFields() {
+            // private constructor
+        }
+    }
+
+
+    private CDAPPluginConstants() {
+        // private constructor
+    }
+}
@@ -1,94 +1,94 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.domain.tca;\r
-\r
-import com.google.common.base.Objects;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * Simple POJO emitted by threshold calculator\r
- *\r
- * @author Rajiv Singla . Creation Date: 9/11/2017.\r
- */\r
-public class ThresholdCalculatorOutput implements Serializable {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    protected String cefMessage;\r
-    protected String tcaPolicy;\r
-    protected String violatedMetricsPerEventName;\r
-    protected String alertMessage;\r
-\r
-    public ThresholdCalculatorOutput() {\r
-        // no arg constructor\r
-    }\r
-\r
-    public ThresholdCalculatorOutput(String cefMessage, String tcaPolicy,\r
-                                     String violatedMetricsPerEventName, String alertMessage) {\r
-        this.cefMessage = cefMessage;\r
-        this.tcaPolicy = tcaPolicy;\r
-        this.violatedMetricsPerEventName = violatedMetricsPerEventName;\r
-        this.alertMessage = alertMessage;\r
-    }\r
-\r
-    public String getCefMessage() {\r
-        return cefMessage;\r
-    }\r
-\r
-    public void setCefMessage(String cefMessage) {\r
-        this.cefMessage = cefMessage;\r
-    }\r
-\r
-    public String getTcaPolicy() {\r
-        return tcaPolicy;\r
-    }\r
-\r
-    public void setTcaPolicy(String tcaPolicy) {\r
-        this.tcaPolicy = tcaPolicy;\r
-    }\r
-\r
-    public String getViolatedMetricsPerEventName() {\r
-        return violatedMetricsPerEventName;\r
-    }\r
-\r
-    public void setViolatedMetricsPerEventName(String violatedMetricsPerEventName) {\r
-        this.violatedMetricsPerEventName = violatedMetricsPerEventName;\r
-    }\r
-\r
-    public String getAlertMessage() {\r
-        return alertMessage;\r
-    }\r
-\r
-    public void setAlertMessage(String alertMessage) {\r
-        this.alertMessage = alertMessage;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("cefMessage", cefMessage)\r
-                .add("tcaPolicy", tcaPolicy)\r
-                .add("violatedMetricsPerEventName", violatedMetricsPerEventName)\r
-                .add("alertMessage", alertMessage)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.domain.tca;
+
+import com.google.common.base.Objects;
+
+import java.io.Serializable;
+
+/**
+ * Simple POJO emitted by threshold calculator
+ *
+ * @author Rajiv Singla . Creation Date: 9/11/2017.
+ */
+public class ThresholdCalculatorOutput implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    protected String cefMessage;
+    protected String tcaPolicy;
+    protected String violatedMetricsPerEventName;
+    protected String alertMessage;
+
+    public ThresholdCalculatorOutput() {
+        // no arg constructor
+    }
+
+    public ThresholdCalculatorOutput(String cefMessage, String tcaPolicy,
+                                     String violatedMetricsPerEventName, String alertMessage) {
+        this.cefMessage = cefMessage;
+        this.tcaPolicy = tcaPolicy;
+        this.violatedMetricsPerEventName = violatedMetricsPerEventName;
+        this.alertMessage = alertMessage;
+    }
+
+    public String getCefMessage() {
+        return cefMessage;
+    }
+
+    public void setCefMessage(String cefMessage) {
+        this.cefMessage = cefMessage;
+    }
+
+    public String getTcaPolicy() {
+        return tcaPolicy;
+    }
+
+    public void setTcaPolicy(String tcaPolicy) {
+        this.tcaPolicy = tcaPolicy;
+    }
+
+    public String getViolatedMetricsPerEventName() {
+        return violatedMetricsPerEventName;
+    }
+
+    public void setViolatedMetricsPerEventName(String violatedMetricsPerEventName) {
+        this.violatedMetricsPerEventName = violatedMetricsPerEventName;
+    }
+
+    public String getAlertMessage() {
+        return alertMessage;
+    }
+
+    public void setAlertMessage(String alertMessage) {
+        this.alertMessage = alertMessage;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("cefMessage", cefMessage)
+                .add("tcaPolicy", tcaPolicy)
+                .add("violatedMetricsPerEventName", violatedMetricsPerEventName)
+                .add("alertMessage", alertMessage)
+                .toString();
+    }
+}
@@ -1,51 +1,51 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.exception;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.slf4j.Logger;\r
-\r
-/**\r
- * Runtime exception which signals that DCAE CDAP App settings (e.g. app config, preferences) validation failed\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public class CDAPSettingsException extends DCAEAnalyticsRuntimeException {\r
-\r
-    /**\r
-     * @param message - Error Message for Exception\r
-     * @param cause   - Actual Exception which caused {@link DCAEAnalyticsRuntimeException}\r
-     */\r
-    public CDAPSettingsException(String message, Throwable cause) {\r
-        super(message, cause);\r
-    }\r
-\r
-    /**\r
-     * Creates and logs the DCAE App Config Exception to given logger\r
-     *\r
-     * @param message - Error Message for Exception and logging\r
-     * @param logger  - Logger used for logging exception\r
-     * @param cause   - Actual exception which caused\r
-     */\r
-    public CDAPSettingsException(String message, Logger logger, Throwable cause) {\r
-        super(message, logger, cause);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.exception;
+
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.slf4j.Logger;
+
+/**
+ * Runtime exception which signals that DCAE CDAP App settings (e.g. app config, preferences) validation failed
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public class CDAPSettingsException extends DCAEAnalyticsRuntimeException {
+
+    /**
+     * @param message - Error Message for Exception
+     * @param cause   - Actual Exception which caused {@link DCAEAnalyticsRuntimeException}
+     */
+    public CDAPSettingsException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Creates and logs the DCAE App Config Exception to given logger
+     *
+     * @param message - Error Message for Exception and logging
+     * @param logger  - Logger used for logging exception
+     * @param cause   - Actual exception which caused
+     */
+    public CDAPSettingsException(String message, Logger logger, Throwable cause) {
+        super(message, logger, cause);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import com.google.common.base.Objects;\r
-import org.apache.hadoop.io.Writable;\r
-import org.apache.hadoop.io.WritableUtils;\r
-\r
-import java.io.DataInput;\r
-import java.io.DataOutput;\r
-import java.io.IOException;\r
-import java.io.Serializable;\r
-\r
-/**\r
- * TCA Alerts Abatement Entity is used to persist information to determine if abatement event need to sent to downstream\r
- * systems\r
- *\r
- *  @author Rajiv Singla . Creation Date: 9/11/2017.\r
- */\r
-public class TCAAlertsAbatementEntity implements Writable, Serializable {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private long creationTS;\r
-    private String requestId;\r
-    // Kept as string to avoid null checks\r
-    private String abatementSentTS;\r
-\r
-    /**\r
-     * No Arg constructor required for Jackson Json Serialization / Deserialization\r
-     */\r
-    public TCAAlertsAbatementEntity() {\r
-        // required no arg constructor\r
-    }\r
-\r
-    /**\r
-     * Creates TCA Alerts Abatement Entity to persist information to determine if abatement alerts need to be posted\r
-     *\r
-     * @param creationTS record creation time\r
-     * @param requestId request ID of generated alert\r
-     * @param abatementSentTS time when abatement was sent out for that alert if any\r
-     */\r
-    public TCAAlertsAbatementEntity(long creationTS, String requestId, String abatementSentTS) {\r
-        this.creationTS = creationTS;\r
-        this.requestId = requestId;\r
-        this.abatementSentTS = abatementSentTS;\r
-    }\r
-\r
-    /**\r
-     * Timestamp when record was created\r
-     *\r
-     * @return timestamp when record was created\r
-     */\r
-    public long getCreationTS() {\r
-        return creationTS;\r
-    }\r
-\r
-    /**\r
-     * Set value for timestamp when record was created\r
-     *\r
-     * @param creationTS new value for timestamp when record was created\r
-     */\r
-    public void setCreationTS(long creationTS) {\r
-        this.creationTS = creationTS;\r
-    }\r
-\r
-    /**\r
-     * Request Id of ONSET alert which was sent\r
-     *\r
-     * @return request Id of ONSET alert which was sent\r
-     */\r
-    public String getRequestId() {\r
-        return requestId;\r
-    }\r
-\r
-    /**\r
-     * Set Request Id of ONSET alert\r
-     *\r
-     * @param requestId set new value for ONSET alert request id\r
-     */\r
-    public void setRequestId(String requestId) {\r
-        this.requestId = requestId;\r
-    }\r
-\r
-\r
-    /**\r
-     * Get abatement Sent Timestamp\r
-     *\r
-     * @return get abatement alert sent timestamp\r
-     */\r
-    public String getAbatementSentTS() {\r
-        return abatementSentTS;\r
-    }\r
-\r
-    /**\r
-     * Set timestamp when abatement alert is sent\r
-     *\r
-     * @param abatementSentTS sent new value for timestamp when abatement alert is sent\r
-     */\r
-    public void setAbatementSentTS(String abatementSentTS) {\r
-        this.abatementSentTS = abatementSentTS;\r
-    }\r
-\r
-    /**\r
-     * Write entity to Table\r
-     *\r
-     * @param dataOutput data output\r
-     * @throws IOException io exception\r
-     */\r
-    @Override\r
-    public void write(DataOutput dataOutput) throws IOException {\r
-        WritableUtils.writeVLong(dataOutput, creationTS);\r
-        WritableUtils.writeString(dataOutput, requestId);\r
-        WritableUtils.writeString(dataOutput, abatementSentTS);\r
-    }\r
-\r
-    /**\r
-     * Read entity from table\r
-     *\r
-     * @param dataInput data input\r
-     * @throws IOException io exception\r
-     */\r
-    @Override\r
-    public void readFields(DataInput dataInput) throws IOException {\r
-        creationTS = WritableUtils.readVLong(dataInput);\r
-        requestId = WritableUtils.readString(dataInput);\r
-        abatementSentTS = WritableUtils.readString(dataInput);\r
-    }\r
-\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("creationTS", creationTS)\r
-                .add("requestId", requestId)\r
-                .add("abatementSentTS", abatementSentTS)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import com.google.common.base.Objects;
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableUtils;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * TCA Alerts Abatement Entity is used to persist information to determine if abatement event need to sent to downstream
+ * systems
+ *
+ *  @author Rajiv Singla . Creation Date: 9/11/2017.
+ */
+public class TCAAlertsAbatementEntity implements Writable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private long creationTS;
+    private String requestId;
+    // Kept as string to avoid null checks
+    private String abatementSentTS;
+
+    /**
+     * No Arg constructor required for Jackson Json Serialization / Deserialization
+     */
+    public TCAAlertsAbatementEntity() {
+        // required no arg constructor
+    }
+
+    /**
+     * Creates TCA Alerts Abatement Entity to persist information to determine if abatement alerts need to be posted
+     *
+     * @param creationTS record creation time
+     * @param requestId request ID of generated alert
+     * @param abatementSentTS time when abatement was sent out for that alert if any
+     */
+    public TCAAlertsAbatementEntity(long creationTS, String requestId, String abatementSentTS) {
+        this.creationTS = creationTS;
+        this.requestId = requestId;
+        this.abatementSentTS = abatementSentTS;
+    }
+
+    /**
+     * Timestamp when record was created
+     *
+     * @return timestamp when record was created
+     */
+    public long getCreationTS() {
+        return creationTS;
+    }
+
+    /**
+     * Set value for timestamp when record was created
+     *
+     * @param creationTS new value for timestamp when record was created
+     */
+    public void setCreationTS(long creationTS) {
+        this.creationTS = creationTS;
+    }
+
+    /**
+     * Request Id of ONSET alert which was sent
+     *
+     * @return request Id of ONSET alert which was sent
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Set Request Id of ONSET alert
+     *
+     * @param requestId set new value for ONSET alert request id
+     */
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+
+    /**
+     * Get abatement Sent Timestamp
+     *
+     * @return get abatement alert sent timestamp
+     */
+    public String getAbatementSentTS() {
+        return abatementSentTS;
+    }
+
+    /**
+     * Set timestamp when abatement alert is sent
+     *
+     * @param abatementSentTS sent new value for timestamp when abatement alert is sent
+     */
+    public void setAbatementSentTS(String abatementSentTS) {
+        this.abatementSentTS = abatementSentTS;
+    }
+
+    /**
+     * Write entity to Table
+     *
+     * @param dataOutput data output
+     * @throws IOException io exception
+     */
+    @Override
+    public void write(DataOutput dataOutput) throws IOException {
+        WritableUtils.writeVLong(dataOutput, creationTS);
+        WritableUtils.writeString(dataOutput, requestId);
+        WritableUtils.writeString(dataOutput, abatementSentTS);
+    }
+
+    /**
+     * Read entity from table
+     *
+     * @param dataInput data input
+     * @throws IOException io exception
+     */
+    @Override
+    public void readFields(DataInput dataInput) throws IOException {
+        creationTS = WritableUtils.readVLong(dataInput);
+        requestId = WritableUtils.readString(dataInput);
+        abatementSentTS = WritableUtils.readString(dataInput);
+    }
+
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("creationTS", creationTS)
+                .add("requestId", requestId)
+                .add("abatementSentTS", abatementSentTS)
+                .toString();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.api.data.schema.UnsupportedTypeException;\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.IndexedTable;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTableProperties;\r
-import com.google.common.base.Joiner;\r
-import com.google.common.collect.ImmutableList;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.common.utils.PersistenceUtils;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.PersistenceUtils.TABLE_ROW_KEY_COLUMN_NAME;\r
-\r
-/**\r
- * Utility methods to persist TCA Alerts Abatement information\r
- *\r
- * @author Rajiv Singla . Creation Date: 9/11/2017.\r
- */\r
-public abstract class TCAAlertsAbatementPersister {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAAlertsAbatementPersister.class);\r
-\r
-    private static final Joiner KEY_JOINER = Joiner.on(PersistenceUtils.ROW_KEY_DELIMITER);\r
-\r
-    private TCAAlertsAbatementPersister() {\r
-        // private constructor\r
-    }\r
-\r
-    /**\r
-     * Creates {@link DatasetProperties} for Alerts Table\r
-     *\r
-     * @param timeToLiveSeconds alerts table Time to Live\r
-     *\r
-     * @return Alerts Abatement table properties\r
-     */\r
-    public static DatasetProperties getDatasetProperties(final int timeToLiveSeconds) {\r
-        try {\r
-            return ObjectMappedTableProperties.builder()\r
-                    .setType(TCAAlertsAbatementEntity.class)\r
-                    .setRowKeyExploreName(TABLE_ROW_KEY_COLUMN_NAME)\r
-                    .setRowKeyExploreType(Schema.Type.STRING)\r
-                    .add(IndexedTable.PROPERTY_TTL, timeToLiveSeconds)\r
-                    .setDescription(CDAPComponentsConstants.TCA_FIXED_ALERTS_ABATEMENT_DESCRIPTION_TABLE)\r
-                    .build();\r
-        } catch (UnsupportedTypeException e) {\r
-            final String errorMessage = "Unable to convert TCAAlertsAbatementEntity class to Schema";\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-    }\r
-\r
-\r
-    public static void persist(final EventListener eventListener,\r
-                               final MetricsPerEventName violatedMetricsPerEventName,\r
-                               final TCAVESResponse tcavesResponse,\r
-                               final String abatementTS,\r
-                               final ObjectMappedTable<TCAAlertsAbatementEntity> tcaAlertsAbatementTable) {\r
-        final String abatementTableKey = createKey(eventListener, violatedMetricsPerEventName);\r
-\r
-        final long currentTimestamp = new Date().getTime();\r
-        final String requestID = tcavesResponse.getRequestID();\r
-        final TCAAlertsAbatementEntity tcaAlertsAbatementEntity = new TCAAlertsAbatementEntity(currentTimestamp,\r
-                requestID, abatementTS);\r
-        tcaAlertsAbatementTable.write(abatementTableKey, tcaAlertsAbatementEntity);\r
-\r
-        LOG.debug("Persisted AlertsAbatementEntity: {} with Key: {}", tcaAlertsAbatementEntity, abatementTableKey);\r
-\r
-    }\r
-\r
-    public static TCAAlertsAbatementEntity lookUpByKey(final EventListener eventListener,\r
-                                                       final MetricsPerEventName violatedMetricsPerEventName,\r
-                                                       final ObjectMappedTable<TCAAlertsAbatementEntity>\r
-                                                               tcaAlertsAbatementTable) {\r
-        final String abatementTableKey = createKey(eventListener, violatedMetricsPerEventName);\r
-        return tcaAlertsAbatementTable.read(abatementTableKey);\r
-    }\r
-\r
-\r
-    public static String createKey(final EventListener eventListener,\r
-                                   final MetricsPerEventName violatedMetricsPerEventName) {\r
-        // no null check required as all are required fields\r
-        final String eventName = violatedMetricsPerEventName.getEventName();\r
-        final String sourceName = eventListener.getEvent().getCommonEventHeader().getSourceName();\r
-        final String reportingEntityName = eventListener.getEvent().getCommonEventHeader().getReportingEntityName();\r
-        // violated threshold will always be present\r
-        final Threshold violatedThreshold = violatedMetricsPerEventName.getThresholds().get(0);\r
-        final String closedLoopControlName = violatedThreshold.getClosedLoopControlName();\r
-        final String fieldPath = violatedThreshold.getFieldPath();\r
-\r
-        final List<String> abatementKeyList =\r
-                ImmutableList.of(eventName, sourceName, reportingEntityName, closedLoopControlName, fieldPath);\r
-\r
-        return KEY_JOINER.join(abatementKeyList);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.api.data.schema.UnsupportedTypeException;
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.IndexedTable;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTableProperties;
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.common.utils.PersistenceUtils;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Date;
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.common.utils.PersistenceUtils.TABLE_ROW_KEY_COLUMN_NAME;
+
+/**
+ * Utility methods to persist TCA Alerts Abatement information
+ *
+ * @author Rajiv Singla . Creation Date: 9/11/2017.
+ */
+public abstract class TCAAlertsAbatementPersister {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAAlertsAbatementPersister.class);
+
+    private static final Joiner KEY_JOINER = Joiner.on(PersistenceUtils.ROW_KEY_DELIMITER);
+
+    private TCAAlertsAbatementPersister() {
+        // private constructor
+    }
+
+    /**
+     * Creates {@link DatasetProperties} for Alerts Table
+     *
+     * @param timeToLiveSeconds alerts table Time to Live
+     *
+     * @return Alerts Abatement table properties
+     */
+    public static DatasetProperties getDatasetProperties(final int timeToLiveSeconds) {
+        try {
+            return ObjectMappedTableProperties.builder()
+                    .setType(TCAAlertsAbatementEntity.class)
+                    .setRowKeyExploreName(TABLE_ROW_KEY_COLUMN_NAME)
+                    .setRowKeyExploreType(Schema.Type.STRING)
+                    .add(IndexedTable.PROPERTY_TTL, timeToLiveSeconds)
+                    .setDescription(CDAPComponentsConstants.TCA_FIXED_ALERTS_ABATEMENT_DESCRIPTION_TABLE)
+                    .build();
+        } catch (UnsupportedTypeException e) {
+            final String errorMessage = "Unable to convert TCAAlertsAbatementEntity class to Schema";
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+    }
+
+
+    public static void persist(final EventListener eventListener,
+                               final MetricsPerEventName violatedMetricsPerEventName,
+                               final TCAVESResponse tcavesResponse,
+                               final String abatementTS,
+                               final ObjectMappedTable<TCAAlertsAbatementEntity> tcaAlertsAbatementTable) {
+        final String abatementTableKey = createKey(eventListener, violatedMetricsPerEventName);
+
+        final long currentTimestamp = new Date().getTime();
+        final String requestID = tcavesResponse.getRequestID();
+        final TCAAlertsAbatementEntity tcaAlertsAbatementEntity = new TCAAlertsAbatementEntity(currentTimestamp,
+                requestID, abatementTS);
+        tcaAlertsAbatementTable.write(abatementTableKey, tcaAlertsAbatementEntity);
+
+        LOG.debug("Persisted AlertsAbatementEntity: {} with Key: {}", tcaAlertsAbatementEntity, abatementTableKey);
+
+    }
+
+    public static TCAAlertsAbatementEntity lookUpByKey(final EventListener eventListener,
+                                                       final MetricsPerEventName violatedMetricsPerEventName,
+                                                       final ObjectMappedTable<TCAAlertsAbatementEntity>
+                                                               tcaAlertsAbatementTable) {
+        final String abatementTableKey = createKey(eventListener, violatedMetricsPerEventName);
+        return tcaAlertsAbatementTable.read(abatementTableKey);
+    }
+
+
+    public static String createKey(final EventListener eventListener,
+                                   final MetricsPerEventName violatedMetricsPerEventName) {
+        // no null check required as all are required fields
+        final String eventName = violatedMetricsPerEventName.getEventName();
+        final String sourceName = eventListener.getEvent().getCommonEventHeader().getSourceName();
+        final String reportingEntityName = eventListener.getEvent().getCommonEventHeader().getReportingEntityName();
+        // violated threshold will always be present
+        final Threshold violatedThreshold = violatedMetricsPerEventName.getThresholds().get(0);
+        final String closedLoopControlName = violatedThreshold.getClosedLoopControlName();
+        final String fieldPath = violatedThreshold.getFieldPath();
+
+        final List<String> abatementKeyList =
+                ImmutableList.of(eventName, sourceName, reportingEntityName, closedLoopControlName, fieldPath);
+
+        return KEY_JOINER.join(abatementKeyList);
+    }
+
+}
@@ -1,43 +1,43 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-/**\r
- * TCA Calculator applies TCA Policy to incoming VES messages and classifies them as per this enum\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/15/2016.\r
- */\r
-public enum TCACalculatorMessageType {\r
-\r
-    /**\r
-     * VES messages that are not applicable as per TCA Policy\r
-     */\r
-    INAPPLICABLE,\r
-    /**\r
-     * VES messages that are applicable as per TCA Policy but don't violate any thresholds\r
-     */\r
-    COMPLIANT,\r
-    /**\r
-     * VES messages that are applicable as per TCA Policy and also in violation of TCA Policy thresholds\r
-     */\r
-    NON_COMPLIANT;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+/**
+ * TCA Calculator applies TCA Policy to incoming VES messages and classifies them as per this enum
+ *
+ * @author Rajiv Singla . Creation Date: 11/15/2016.
+ */
+public enum TCACalculatorMessageType {
+
+    /**
+     * VES messages that are not applicable as per TCA Policy
+     */
+    INAPPLICABLE,
+    /**
+     * VES messages that are applicable as per TCA Policy but don't violate any thresholds
+     */
+    COMPLIANT,
+    /**
+     * VES messages that are applicable as per TCA Policy and also in violation of TCA Policy thresholds
+     */
+    NON_COMPLIANT;
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import org.apache.hadoop.io.Writable;\r
-import org.apache.hadoop.io.WritableUtils;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyDomainFilter;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyEventNameFilter;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyThresholdsProcessor;\r
-\r
-import java.io.DataInput;\r
-import java.io.DataOutput;\r
-import java.io.IOException;\r
-import java.io.Serializable;\r
-\r
-/**\r
- * TCA Message Status is an Entity which is used to persist TCA VES Message status information in Message Status Table\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/16/2016.\r
- */\r
-public class TCAMessageStatusEntity implements Writable, Serializable {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private long creationTS;\r
-    private int instanceId;\r
-    private String messageType;\r
-    private String vesMessage;\r
-    private String domain;\r
-    private String eventName;\r
-    private String thresholdPath;\r
-    private String thresholdSeverity;\r
-    private String thresholdDirection;\r
-    private Long thresholdValue;\r
-    private String jsonProcessorStatus;\r
-    private String jsonProcessorMessage;\r
-    private String domainFilterStatus;\r
-    private String domainFilterMessage;\r
-    private String eventNameFilterStatus;\r
-    private String eventNameFilterMessage;\r
-    private String thresholdCalculatorStatus;\r
-    private String thresholdCalculatorMessage;\r
-    private String alertMessage;\r
-\r
-    /**\r
-     * No Arg constructor required for Jackson Json Serialization / Deserialization\r
-     */\r
-    public TCAMessageStatusEntity() {\r
-        // no argument constructor required for json serialization / deserialization\r
-    }\r
-\r
-    /**\r
-     * Create new Instance of {@link TCAMessageStatusEntity}\r
-     *\r
-     * @param creationTS creation Timestamp\r
-     * @param instanceId CDAP flowlet instance ID\r
-     * @param messageType {@link TCACalculatorMessageType}\r
-     * @param vesMessage incoming VES message from collector\r
-     * @param domain VES message domain if present\r
-     * @param eventName VES message functional role if present\r
-     */\r
-    public TCAMessageStatusEntity(final long creationTS, final int instanceId, final String messageType,\r
-                                  final String vesMessage, final String domain, final String eventName) {\r
-        this(creationTS, instanceId, messageType, vesMessage, domain, eventName, null, null, null, null,\r
-                null, null, null, null, null, null, null, null, null);\r
-    }\r
-\r
-\r
-    /**\r
-     * Create new Instance of {@link TCAMessageStatusEntity}\r
-     *\r
-     * @param creationTS creation Timestamp\r
-     * @param instanceId CDAP flowlet instance ID\r
-     * @param messageType {@link TCACalculatorMessageType}\r
-     * @param vesMessage incoming VES message from collector\r
-     * @param domain VES message domain if present\r
-     * @param eventName VES message event name if present\r
-     * @param thresholdPath Violated threshold path\r
-     * @param thresholdSeverity Violated threshold Severity if any\r
-     * @param thresholdDirection Violated threshold Direction if any\r
-     * @param thresholdValue Violated threshold value if any\r
-     * @param jsonProcessorStatus {@link TCACEFJsonProcessor} status\r
-     * @param jsonProcessorMessage {@link TCACEFJsonProcessor} message\r
-     * @param domainFilterStatus {@link TCACEFPolicyDomainFilter} status\r
-     * @param domainFilterMessage {@link TCACEFPolicyDomainFilter} message\r
-     * @param eventNameFilterStatus {@link TCACEFPolicyEventNameFilter} status\r
-     * @param eventNameFilterMessage {@link TCACEFPolicyEventNameFilter} message\r
-     * @param thresholdCalculatorStatus {@link TCACEFPolicyThresholdsProcessor} status\r
-     * @param thresholdCalculatorMessage {@link TCACEFPolicyThresholdsProcessor} message\r
-     * @param alertMessage alert message that will be sent out in case of threshold violation\r
-     */\r
-    public TCAMessageStatusEntity(long creationTS, int instanceId, String messageType, String vesMessage,\r
-                                  String domain, String eventName,\r
-                                  String thresholdPath, String thresholdSeverity, String thresholdDirection,\r
-                                  Long thresholdValue,\r
-                                  String jsonProcessorStatus, String jsonProcessorMessage,\r
-                                  String domainFilterStatus, String domainFilterMessage,\r
-                                  String eventNameFilterStatus, String eventNameFilterMessage,\r
-                                  String thresholdCalculatorStatus, String thresholdCalculatorMessage,\r
-                                  String alertMessage) {\r
-        this.creationTS = creationTS;\r
-        this.instanceId = instanceId;\r
-        this.messageType = messageType;\r
-        this.vesMessage = vesMessage;\r
-        this.domain = domain;\r
-        this.eventName = eventName;\r
-        this.thresholdPath = thresholdPath;\r
-        this.thresholdSeverity = thresholdSeverity;\r
-        this.thresholdDirection = thresholdDirection;\r
-        this.thresholdValue = thresholdValue;\r
-        this.jsonProcessorStatus = jsonProcessorStatus;\r
-        this.jsonProcessorMessage = jsonProcessorMessage;\r
-        this.domainFilterStatus = domainFilterStatus;\r
-        this.domainFilterMessage = domainFilterMessage;\r
-        this.eventNameFilterStatus = eventNameFilterStatus;\r
-        this.eventNameFilterMessage = eventNameFilterMessage;\r
-        this.thresholdCalculatorStatus = thresholdCalculatorStatus;\r
-        this.thresholdCalculatorMessage = thresholdCalculatorMessage;\r
-        this.alertMessage = alertMessage;\r
-    }\r
-\r
-    /**\r
-     * Provides Creation Timestamp\r
-     *\r
-     * @return creation timestamp long value\r
-     */\r
-    public long getCreationTS() {\r
-        return creationTS;\r
-    }\r
-\r
-    /**\r
-     * Sets Creations Timestamp\r
-     *\r
-     * @param creationTS creation timestamp long value\r
-     */\r
-    public void setCreationTS(long creationTS) {\r
-        this.creationTS = creationTS;\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides CDAP Flowlet instance ID\r
-     *\r
-     * @return cdap flowlet instance ID\r
-     */\r
-    public int getInstanceId() {\r
-        return instanceId;\r
-    }\r
-\r
-    /**\r
-     * Sets CDAP Flowlet instance ID\r
-     *\r
-     * @param instanceId flowlet instance ID\r
-     */\r
-    public void setInstanceId(int instanceId) {\r
-        this.instanceId = instanceId;\r
-    }\r
-\r
-    /**\r
-     * Provides Message Calculator Type {@link TCACalculatorMessageType}\r
-     *\r
-     * @return calculator message type\r
-     */\r
-    public String getMessageType() {\r
-        return messageType;\r
-    }\r
-\r
-    /**\r
-     * Sets Calculator message Type {@link TCACalculatorMessageType}\r
-     *\r
-     * @param messageType calculator message type\r
-     */\r
-    public void setMessageType(String messageType) {\r
-        this.messageType = messageType;\r
-    }\r
-\r
-    /**\r
-     * Provides incoming VES Message\r
-     *\r
-     * @return ves message\r
-     */\r
-    public String getVesMessage() {\r
-        return vesMessage;\r
-    }\r
-\r
-    /**\r
-     * Set new value for VES message\r
-     *\r
-     * @param vesMessage ves message\r
-     */\r
-    public void setVesMessage(String vesMessage) {\r
-        this.vesMessage = vesMessage;\r
-    }\r
-\r
-    /**\r
-     * Provides VES message Domain\r
-     *\r
-     * @return ves message domain\r
-     */\r
-    public String getDomain() {\r
-        return domain;\r
-    }\r
-\r
-    /**\r
-     * Sets VES Message Domain\r
-     *\r
-     * @param domain ves message domain\r
-     */\r
-    public void setDomain(String domain) {\r
-        this.domain = domain;\r
-    }\r
-\r
-    /**\r
-     * Provides VES Message Event Name\r
-     *\r
-     * @return ves message Event Name\r
-     */\r
-    public String getEventName() {\r
-        return eventName;\r
-    }\r
-\r
-    /**\r
-     * Sets VES Message Functional Role\r
-     *\r
-     * @param eventName ves message Functional Role\r
-     */\r
-    public void setEventName(String eventName) {\r
-        this.eventName = eventName;\r
-    }\r
-\r
-    /**\r
-     * Violated Threshold Path as extracted from {@link TCAPolicy}\r
-     *\r
-     * @return violated threshold path\r
-     */\r
-    public String getThresholdPath() {\r
-        return thresholdPath;\r
-    }\r
-\r
-    /**\r
-     * Sets value for Violated Threshold Path\r
-     *\r
-     * @param thresholdPath violated threshold path\r
-     */\r
-    public void setThresholdPath(String thresholdPath) {\r
-        this.thresholdPath = thresholdPath;\r
-    }\r
-\r
-    /**\r
-     * Violated threshold Event Severity\r
-     *\r
-     * @return event severity\r
-     */\r
-    public String getThresholdSeverity() {\r
-        return thresholdSeverity;\r
-    }\r
-\r
-    /**\r
-     * Violated Threshold Severity\r
-     *\r
-     * @param thresholdSeverity violated threshold severity\r
-     */\r
-    public void setThresholdSeverity(String thresholdSeverity) {\r
-        this.thresholdSeverity = thresholdSeverity;\r
-    }\r
-\r
-    /**\r
-     * Violated Threshold {@link Direction}\r
-     *\r
-     * @return violated threshold Direction\r
-     */\r
-    public String getThresholdDirection() {\r
-        return thresholdDirection;\r
-    }\r
-\r
-    /**\r
-     * Sets Violated Threshold Direction\r
-     *\r
-     * @param thresholdDirection violated threshold direction\r
-     */\r
-    public void setThresholdDirection(String thresholdDirection) {\r
-        this.thresholdDirection = thresholdDirection;\r
-    }\r
-\r
-    /**\r
-     * Provides Violated Threshold Value\r
-     *\r
-     * @return violated Threshold value\r
-     */\r
-    public Long getThresholdValue() {\r
-        return thresholdValue;\r
-    }\r
-\r
-    /**\r
-     * Sets Violated Threshold Value\r
-     *\r
-     * @param thresholdValue violated threshold value\r
-     */\r
-    public void setThresholdValue(Long thresholdValue) {\r
-        this.thresholdValue = thresholdValue;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFJsonProcessor} status\r
-     *\r
-     * @return json processor status\r
-     */\r
-    public String getJsonProcessorStatus() {\r
-        return jsonProcessorStatus;\r
-    }\r
-\r
-    /**\r
-     * Sets Json Processor status\r
-     *\r
-     * @param jsonProcessorStatus json processor status\r
-     */\r
-    public void setJsonProcessorStatus(String jsonProcessorStatus) {\r
-        this.jsonProcessorStatus = jsonProcessorStatus;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFJsonProcessor} message\r
-     *\r
-     * @return json processor message\r
-     */\r
-    public String getJsonProcessorMessage() {\r
-        return jsonProcessorMessage;\r
-    }\r
-\r
-    /**\r
-     * Sets Json Processor Message\r
-     *\r
-     * @param jsonProcessorMessage json processor message\r
-     */\r
-    public void setJsonProcessorMessage(String jsonProcessorMessage) {\r
-        this.jsonProcessorMessage = jsonProcessorMessage;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFPolicyDomainFilter} status\r
-     *\r
-     * @return domain filter status\r
-     */\r
-    public String getDomainFilterStatus() {\r
-        return domainFilterStatus;\r
-    }\r
-\r
-    /**\r
-     * Sets Domain Filter status\r
-     *\r
-     * @param domainFilterStatus domain filter status\r
-     */\r
-    public void setDomainFilterStatus(String domainFilterStatus) {\r
-        this.domainFilterStatus = domainFilterStatus;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFPolicyDomainFilter} message\r
-     *\r
-     * @return domain filter message\r
-     */\r
-    public String getDomainFilterMessage() {\r
-        return domainFilterMessage;\r
-    }\r
-\r
-    /**\r
-     * Sets Domain filter message\r
-     *\r
-     * @param domainFilterMessage domain filter message\r
-     */\r
-    public void setDomainFilterMessage(String domainFilterMessage) {\r
-        this.domainFilterMessage = domainFilterMessage;\r
-    }\r
-\r
-    public String getEventNameFilterStatus() {\r
-        return eventNameFilterStatus;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFPolicyEventNameFilter} status\r
-     *\r
-     * @param eventNameFilterStatus functional Role filter status\r
-     */\r
-    public void setEventNameFilterStatus(String eventNameFilterStatus) {\r
-        this.eventNameFilterStatus = eventNameFilterStatus;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFPolicyEventNameFilter} message\r
-     *\r
-     * @return functional role filter message\r
-     */\r
-    public String getEventNameFilterMessage() {\r
-        return eventNameFilterMessage;\r
-    }\r
-\r
-    /**\r
-     * Sets Functional Role filter message\r
-     *\r
-     * @param eventNameFilterMessage functional role filter message\r
-     */\r
-    public void setEventNameFilterMessage(String eventNameFilterMessage) {\r
-        this.eventNameFilterMessage = eventNameFilterMessage;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFPolicyThresholdsProcessor} status\r
-     *\r
-     * @return threshold processor status\r
-     */\r
-    public String getThresholdCalculatorStatus() {\r
-        return thresholdCalculatorStatus;\r
-    }\r
-\r
-    /**\r
-     * Sets threshold calculator status\r
-     *\r
-     * @param thresholdCalculatorStatus threshold calculator status\r
-     */\r
-    public void setThresholdCalculatorStatus(String thresholdCalculatorStatus) {\r
-        this.thresholdCalculatorStatus = thresholdCalculatorStatus;\r
-    }\r
-\r
-    /**\r
-     * Provides {@link TCACEFPolicyThresholdsProcessor} message\r
-     *\r
-     * @return threshold processor message\r
-     */\r
-    public String getThresholdCalculatorMessage() {\r
-        return thresholdCalculatorMessage;\r
-    }\r
-\r
-    /**\r
-     * Sets Threshold Calculator Processor Message\r
-     *\r
-     * @param thresholdCalculatorMessage threshold calculator message\r
-     */\r
-    public void setThresholdCalculatorMessage(String thresholdCalculatorMessage) {\r
-        this.thresholdCalculatorMessage = thresholdCalculatorMessage;\r
-    }\r
-\r
-    /**\r
-     * Provides generated alert message\r
-     *\r
-     * @return generated alert message\r
-     */\r
-    public String getAlertMessage() {\r
-        return alertMessage;\r
-    }\r
-\r
-    /**\r
-     * Sets alert message\r
-     *\r
-     * @param alertMessage alert message\r
-     */\r
-    public void setAlertMessage(String alertMessage) {\r
-        this.alertMessage = alertMessage;\r
-    }\r
-\r
-    /**\r
-     * Write entity to Table\r
-     *\r
-     * @param dataOutput data output\r
-     *\r
-     * @throws IOException io exception\r
-     */\r
-    @Override\r
-    public void write(DataOutput dataOutput) throws IOException {\r
-        WritableUtils.writeVLong(dataOutput, creationTS);\r
-        WritableUtils.writeVInt(dataOutput, instanceId);\r
-        WritableUtils.writeString(dataOutput, messageType);\r
-        WritableUtils.writeString(dataOutput, vesMessage);\r
-\r
-        WritableUtils.writeString(dataOutput, domain);\r
-        WritableUtils.writeString(dataOutput, eventName);\r
-\r
-        WritableUtils.writeString(dataOutput, thresholdPath);\r
-        WritableUtils.writeString(dataOutput, thresholdSeverity);\r
-        WritableUtils.writeString(dataOutput, thresholdDirection);\r
-        WritableUtils.writeVLong(dataOutput, thresholdValue);\r
-\r
-        WritableUtils.writeString(dataOutput, jsonProcessorStatus);\r
-        WritableUtils.writeString(dataOutput, jsonProcessorMessage);\r
-        WritableUtils.writeString(dataOutput, domainFilterStatus);\r
-        WritableUtils.writeString(dataOutput, domainFilterMessage);\r
-        WritableUtils.writeString(dataOutput, eventNameFilterStatus);\r
-        WritableUtils.writeString(dataOutput, eventNameFilterMessage);\r
-        WritableUtils.writeString(dataOutput, thresholdCalculatorStatus);\r
-        WritableUtils.writeString(dataOutput, thresholdCalculatorMessage);\r
-\r
-        WritableUtils.writeString(dataOutput, alertMessage);\r
-\r
-    }\r
-\r
-    /**\r
-     * Read entity from table\r
-     *\r
-     * @param dataInput data input\r
-     * @throws IOException io exception\r
-     */\r
-    @Override\r
-    public void readFields(DataInput dataInput) throws IOException {\r
-        creationTS = WritableUtils.readVLong(dataInput);\r
-        instanceId = WritableUtils.readVInt(dataInput);\r
-        messageType = WritableUtils.readString(dataInput);\r
-        vesMessage = WritableUtils.readString(dataInput);\r
-\r
-        domain = WritableUtils.readString(dataInput);\r
-        eventName = WritableUtils.readString(dataInput);\r
-\r
-        thresholdPath = WritableUtils.readString(dataInput);\r
-        thresholdSeverity = WritableUtils.readString(dataInput);\r
-        thresholdDirection = WritableUtils.readString(dataInput);\r
-        thresholdValue = WritableUtils.readVLong(dataInput);\r
-\r
-        jsonProcessorStatus = WritableUtils.readString(dataInput);\r
-        jsonProcessorMessage = WritableUtils.readString(dataInput);\r
-        domainFilterStatus = WritableUtils.readString(dataInput);\r
-        domainFilterMessage = WritableUtils.readString(dataInput);\r
-        eventNameFilterStatus = WritableUtils.readString(dataInput);\r
-        eventNameFilterMessage = WritableUtils.readString(dataInput);\r
-        thresholdCalculatorStatus = WritableUtils.readString(dataInput);\r
-        thresholdCalculatorMessage = WritableUtils.readString(dataInput);\r
-\r
-        alertMessage = WritableUtils.readString(dataInput);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableUtils;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyDomainFilter;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyEventNameFilter;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyThresholdsProcessor;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * TCA Message Status is an Entity which is used to persist TCA VES Message status information in Message Status Table
+ *
+ * @author Rajiv Singla . Creation Date: 11/16/2016.
+ */
+public class TCAMessageStatusEntity implements Writable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private long creationTS;
+    private int instanceId;
+    private String messageType;
+    private String vesMessage;
+    private String domain;
+    private String eventName;
+    private String thresholdPath;
+    private String thresholdSeverity;
+    private String thresholdDirection;
+    private Long thresholdValue;
+    private String jsonProcessorStatus;
+    private String jsonProcessorMessage;
+    private String domainFilterStatus;
+    private String domainFilterMessage;
+    private String eventNameFilterStatus;
+    private String eventNameFilterMessage;
+    private String thresholdCalculatorStatus;
+    private String thresholdCalculatorMessage;
+    private String alertMessage;
+
+    /**
+     * No Arg constructor required for Jackson Json Serialization / Deserialization
+     */
+    public TCAMessageStatusEntity() {
+        // no argument constructor required for json serialization / deserialization
+    }
+
+    /**
+     * Create new Instance of {@link TCAMessageStatusEntity}
+     *
+     * @param creationTS creation Timestamp
+     * @param instanceId CDAP flowlet instance ID
+     * @param messageType {@link TCACalculatorMessageType}
+     * @param vesMessage incoming VES message from collector
+     * @param domain VES message domain if present
+     * @param eventName VES message functional role if present
+     */
+    public TCAMessageStatusEntity(final long creationTS, final int instanceId, final String messageType,
+                                  final String vesMessage, final String domain, final String eventName) {
+        this(creationTS, instanceId, messageType, vesMessage, domain, eventName, null, null, null, null,
+                null, null, null, null, null, null, null, null, null);
+    }
+
+
+    /**
+     * Create new Instance of {@link TCAMessageStatusEntity}
+     *
+     * @param creationTS creation Timestamp
+     * @param instanceId CDAP flowlet instance ID
+     * @param messageType {@link TCACalculatorMessageType}
+     * @param vesMessage incoming VES message from collector
+     * @param domain VES message domain if present
+     * @param eventName VES message event name if present
+     * @param thresholdPath Violated threshold path
+     * @param thresholdSeverity Violated threshold Severity if any
+     * @param thresholdDirection Violated threshold Direction if any
+     * @param thresholdValue Violated threshold value if any
+     * @param jsonProcessorStatus {@link TCACEFJsonProcessor} status
+     * @param jsonProcessorMessage {@link TCACEFJsonProcessor} message
+     * @param domainFilterStatus {@link TCACEFPolicyDomainFilter} status
+     * @param domainFilterMessage {@link TCACEFPolicyDomainFilter} message
+     * @param eventNameFilterStatus {@link TCACEFPolicyEventNameFilter} status
+     * @param eventNameFilterMessage {@link TCACEFPolicyEventNameFilter} message
+     * @param thresholdCalculatorStatus {@link TCACEFPolicyThresholdsProcessor} status
+     * @param thresholdCalculatorMessage {@link TCACEFPolicyThresholdsProcessor} message
+     * @param alertMessage alert message that will be sent out in case of threshold violation
+     */
+    public TCAMessageStatusEntity(long creationTS, int instanceId, String messageType, String vesMessage,
+                                  String domain, String eventName,
+                                  String thresholdPath, String thresholdSeverity, String thresholdDirection,
+                                  Long thresholdValue,
+                                  String jsonProcessorStatus, String jsonProcessorMessage,
+                                  String domainFilterStatus, String domainFilterMessage,
+                                  String eventNameFilterStatus, String eventNameFilterMessage,
+                                  String thresholdCalculatorStatus, String thresholdCalculatorMessage,
+                                  String alertMessage) {
+        this.creationTS = creationTS;
+        this.instanceId = instanceId;
+        this.messageType = messageType;
+        this.vesMessage = vesMessage;
+        this.domain = domain;
+        this.eventName = eventName;
+        this.thresholdPath = thresholdPath;
+        this.thresholdSeverity = thresholdSeverity;
+        this.thresholdDirection = thresholdDirection;
+        this.thresholdValue = thresholdValue;
+        this.jsonProcessorStatus = jsonProcessorStatus;
+        this.jsonProcessorMessage = jsonProcessorMessage;
+        this.domainFilterStatus = domainFilterStatus;
+        this.domainFilterMessage = domainFilterMessage;
+        this.eventNameFilterStatus = eventNameFilterStatus;
+        this.eventNameFilterMessage = eventNameFilterMessage;
+        this.thresholdCalculatorStatus = thresholdCalculatorStatus;
+        this.thresholdCalculatorMessage = thresholdCalculatorMessage;
+        this.alertMessage = alertMessage;
+    }
+
+    /**
+     * Provides Creation Timestamp
+     *
+     * @return creation timestamp long value
+     */
+    public long getCreationTS() {
+        return creationTS;
+    }
+
+    /**
+     * Sets Creations Timestamp
+     *
+     * @param creationTS creation timestamp long value
+     */
+    public void setCreationTS(long creationTS) {
+        this.creationTS = creationTS;
+    }
+
+
+    /**
+     * Provides CDAP Flowlet instance ID
+     *
+     * @return cdap flowlet instance ID
+     */
+    public int getInstanceId() {
+        return instanceId;
+    }
+
+    /**
+     * Sets CDAP Flowlet instance ID
+     *
+     * @param instanceId flowlet instance ID
+     */
+    public void setInstanceId(int instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    /**
+     * Provides Message Calculator Type {@link TCACalculatorMessageType}
+     *
+     * @return calculator message type
+     */
+    public String getMessageType() {
+        return messageType;
+    }
+
+    /**
+     * Sets Calculator message Type {@link TCACalculatorMessageType}
+     *
+     * @param messageType calculator message type
+     */
+    public void setMessageType(String messageType) {
+        this.messageType = messageType;
+    }
+
+    /**
+     * Provides incoming VES Message
+     *
+     * @return ves message
+     */
+    public String getVesMessage() {
+        return vesMessage;
+    }
+
+    /**
+     * Set new value for VES message
+     *
+     * @param vesMessage ves message
+     */
+    public void setVesMessage(String vesMessage) {
+        this.vesMessage = vesMessage;
+    }
+
+    /**
+     * Provides VES message Domain
+     *
+     * @return ves message domain
+     */
+    public String getDomain() {
+        return domain;
+    }
+
+    /**
+     * Sets VES Message Domain
+     *
+     * @param domain ves message domain
+     */
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+    /**
+     * Provides VES Message Event Name
+     *
+     * @return ves message Event Name
+     */
+    public String getEventName() {
+        return eventName;
+    }
+
+    /**
+     * Sets VES Message Functional Role
+     *
+     * @param eventName ves message Functional Role
+     */
+    public void setEventName(String eventName) {
+        this.eventName = eventName;
+    }
+
+    /**
+     * Violated Threshold Path as extracted from {@link TCAPolicy}
+     *
+     * @return violated threshold path
+     */
+    public String getThresholdPath() {
+        return thresholdPath;
+    }
+
+    /**
+     * Sets value for Violated Threshold Path
+     *
+     * @param thresholdPath violated threshold path
+     */
+    public void setThresholdPath(String thresholdPath) {
+        this.thresholdPath = thresholdPath;
+    }
+
+    /**
+     * Violated threshold Event Severity
+     *
+     * @return event severity
+     */
+    public String getThresholdSeverity() {
+        return thresholdSeverity;
+    }
+
+    /**
+     * Violated Threshold Severity
+     *
+     * @param thresholdSeverity violated threshold severity
+     */
+    public void setThresholdSeverity(String thresholdSeverity) {
+        this.thresholdSeverity = thresholdSeverity;
+    }
+
+    /**
+     * Violated Threshold {@link Direction}
+     *
+     * @return violated threshold Direction
+     */
+    public String getThresholdDirection() {
+        return thresholdDirection;
+    }
+
+    /**
+     * Sets Violated Threshold Direction
+     *
+     * @param thresholdDirection violated threshold direction
+     */
+    public void setThresholdDirection(String thresholdDirection) {
+        this.thresholdDirection = thresholdDirection;
+    }
+
+    /**
+     * Provides Violated Threshold Value
+     *
+     * @return violated Threshold value
+     */
+    public Long getThresholdValue() {
+        return thresholdValue;
+    }
+
+    /**
+     * Sets Violated Threshold Value
+     *
+     * @param thresholdValue violated threshold value
+     */
+    public void setThresholdValue(Long thresholdValue) {
+        this.thresholdValue = thresholdValue;
+    }
+
+    /**
+     * Provides {@link TCACEFJsonProcessor} status
+     *
+     * @return json processor status
+     */
+    public String getJsonProcessorStatus() {
+        return jsonProcessorStatus;
+    }
+
+    /**
+     * Sets Json Processor status
+     *
+     * @param jsonProcessorStatus json processor status
+     */
+    public void setJsonProcessorStatus(String jsonProcessorStatus) {
+        this.jsonProcessorStatus = jsonProcessorStatus;
+    }
+
+    /**
+     * Provides {@link TCACEFJsonProcessor} message
+     *
+     * @return json processor message
+     */
+    public String getJsonProcessorMessage() {
+        return jsonProcessorMessage;
+    }
+
+    /**
+     * Sets Json Processor Message
+     *
+     * @param jsonProcessorMessage json processor message
+     */
+    public void setJsonProcessorMessage(String jsonProcessorMessage) {
+        this.jsonProcessorMessage = jsonProcessorMessage;
+    }
+
+    /**
+     * Provides {@link TCACEFPolicyDomainFilter} status
+     *
+     * @return domain filter status
+     */
+    public String getDomainFilterStatus() {
+        return domainFilterStatus;
+    }
+
+    /**
+     * Sets Domain Filter status
+     *
+     * @param domainFilterStatus domain filter status
+     */
+    public void setDomainFilterStatus(String domainFilterStatus) {
+        this.domainFilterStatus = domainFilterStatus;
+    }
+
+    /**
+     * Provides {@link TCACEFPolicyDomainFilter} message
+     *
+     * @return domain filter message
+     */
+    public String getDomainFilterMessage() {
+        return domainFilterMessage;
+    }
+
+    /**
+     * Sets Domain filter message
+     *
+     * @param domainFilterMessage domain filter message
+     */
+    public void setDomainFilterMessage(String domainFilterMessage) {
+        this.domainFilterMessage = domainFilterMessage;
+    }
+
+    public String getEventNameFilterStatus() {
+        return eventNameFilterStatus;
+    }
+
+    /**
+     * Provides {@link TCACEFPolicyEventNameFilter} status
+     *
+     * @param eventNameFilterStatus functional Role filter status
+     */
+    public void setEventNameFilterStatus(String eventNameFilterStatus) {
+        this.eventNameFilterStatus = eventNameFilterStatus;
+    }
+
+    /**
+     * Provides {@link TCACEFPolicyEventNameFilter} message
+     *
+     * @return functional role filter message
+     */
+    public String getEventNameFilterMessage() {
+        return eventNameFilterMessage;
+    }
+
+    /**
+     * Sets Functional Role filter message
+     *
+     * @param eventNameFilterMessage functional role filter message
+     */
+    public void setEventNameFilterMessage(String eventNameFilterMessage) {
+        this.eventNameFilterMessage = eventNameFilterMessage;
+    }
+
+    /**
+     * Provides {@link TCACEFPolicyThresholdsProcessor} status
+     *
+     * @return threshold processor status
+     */
+    public String getThresholdCalculatorStatus() {
+        return thresholdCalculatorStatus;
+    }
+
+    /**
+     * Sets threshold calculator status
+     *
+     * @param thresholdCalculatorStatus threshold calculator status
+     */
+    public void setThresholdCalculatorStatus(String thresholdCalculatorStatus) {
+        this.thresholdCalculatorStatus = thresholdCalculatorStatus;
+    }
+
+    /**
+     * Provides {@link TCACEFPolicyThresholdsProcessor} message
+     *
+     * @return threshold processor message
+     */
+    public String getThresholdCalculatorMessage() {
+        return thresholdCalculatorMessage;
+    }
+
+    /**
+     * Sets Threshold Calculator Processor Message
+     *
+     * @param thresholdCalculatorMessage threshold calculator message
+     */
+    public void setThresholdCalculatorMessage(String thresholdCalculatorMessage) {
+        this.thresholdCalculatorMessage = thresholdCalculatorMessage;
+    }
+
+    /**
+     * Provides generated alert message
+     *
+     * @return generated alert message
+     */
+    public String getAlertMessage() {
+        return alertMessage;
+    }
+
+    /**
+     * Sets alert message
+     *
+     * @param alertMessage alert message
+     */
+    public void setAlertMessage(String alertMessage) {
+        this.alertMessage = alertMessage;
+    }
+
+    /**
+     * Write entity to Table
+     *
+     * @param dataOutput data output
+     *
+     * @throws IOException io exception
+     */
+    @Override
+    public void write(DataOutput dataOutput) throws IOException {
+        WritableUtils.writeVLong(dataOutput, creationTS);
+        WritableUtils.writeVInt(dataOutput, instanceId);
+        WritableUtils.writeString(dataOutput, messageType);
+        WritableUtils.writeString(dataOutput, vesMessage);
+
+        WritableUtils.writeString(dataOutput, domain);
+        WritableUtils.writeString(dataOutput, eventName);
+
+        WritableUtils.writeString(dataOutput, thresholdPath);
+        WritableUtils.writeString(dataOutput, thresholdSeverity);
+        WritableUtils.writeString(dataOutput, thresholdDirection);
+        WritableUtils.writeVLong(dataOutput, thresholdValue);
+
+        WritableUtils.writeString(dataOutput, jsonProcessorStatus);
+        WritableUtils.writeString(dataOutput, jsonProcessorMessage);
+        WritableUtils.writeString(dataOutput, domainFilterStatus);
+        WritableUtils.writeString(dataOutput, domainFilterMessage);
+        WritableUtils.writeString(dataOutput, eventNameFilterStatus);
+        WritableUtils.writeString(dataOutput, eventNameFilterMessage);
+        WritableUtils.writeString(dataOutput, thresholdCalculatorStatus);
+        WritableUtils.writeString(dataOutput, thresholdCalculatorMessage);
+
+        WritableUtils.writeString(dataOutput, alertMessage);
+
+    }
+
+    /**
+     * Read entity from table
+     *
+     * @param dataInput data input
+     * @throws IOException io exception
+     */
+    @Override
+    public void readFields(DataInput dataInput) throws IOException {
+        creationTS = WritableUtils.readVLong(dataInput);
+        instanceId = WritableUtils.readVInt(dataInput);
+        messageType = WritableUtils.readString(dataInput);
+        vesMessage = WritableUtils.readString(dataInput);
+
+        domain = WritableUtils.readString(dataInput);
+        eventName = WritableUtils.readString(dataInput);
+
+        thresholdPath = WritableUtils.readString(dataInput);
+        thresholdSeverity = WritableUtils.readString(dataInput);
+        thresholdDirection = WritableUtils.readString(dataInput);
+        thresholdValue = WritableUtils.readVLong(dataInput);
+
+        jsonProcessorStatus = WritableUtils.readString(dataInput);
+        jsonProcessorMessage = WritableUtils.readString(dataInput);
+        domainFilterStatus = WritableUtils.readString(dataInput);
+        domainFilterMessage = WritableUtils.readString(dataInput);
+        eventNameFilterStatus = WritableUtils.readString(dataInput);
+        eventNameFilterMessage = WritableUtils.readString(dataInput);
+        thresholdCalculatorStatus = WritableUtils.readString(dataInput);
+        thresholdCalculatorMessage = WritableUtils.readString(dataInput);
+
+        alertMessage = WritableUtils.readString(dataInput);
+
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.api.data.schema.UnsupportedTypeException;\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.IndexedTable;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTableProperties;\r
-import com.google.common.base.Joiner;\r
-import org.apache.commons.lang3.StringEscapeUtils;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.MessageProcessor;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.ProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.common.utils.PersistenceUtils;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyDomainFilter;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyEventNameFilter;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyThresholdsProcessor;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Date;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.PersistenceUtils.TABLE_ROW_KEY_COLUMN_NAME;\r
-\r
-/**\r
- *\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/15/2016.\r
- */\r
-public abstract class TCAMessageStatusPersister {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAMessageStatusPersister.class);\r
-\r
-    private TCAMessageStatusPersister() {\r
-\r
-    }\r
-\r
-    /**\r
-     * Saves Message Status in Table. Assumes no alert was generated\r
-     *\r
-     * @param processorContext processor Context\r
-     * @param instanceId Instance Id\r
-     * @param calculatorMessageType Calculation Message Type\r
-     * @param messageStatusTable Message Status Table\r
-     */\r
-    public static void persist(final TCACEFProcessorContext processorContext,\r
-                               final int instanceId,\r
-                               final TCACalculatorMessageType calculatorMessageType,\r
-                               final ObjectMappedTable<TCAMessageStatusEntity> messageStatusTable) {\r
-        persist(processorContext, instanceId, calculatorMessageType, messageStatusTable, null);\r
-    }\r
-\r
-    /**\r
-     * Saves Message Status in Table. Sets up alert message aslo\r
-     *\r
-     * @param processorContext processor Context\r
-     * @param instanceId Instance Id\r
-     * @param calculatorMessageType Calculation Message Type\r
-     * @param messageStatusTable Message Status Table\r
-     * @param alertMessage Alert message\r
-     */\r
-    public static void persist(final TCACEFProcessorContext processorContext,\r
-                               final int instanceId,\r
-                               final TCACalculatorMessageType calculatorMessageType,\r
-                               final ObjectMappedTable<TCAMessageStatusEntity> messageStatusTable,\r
-                               @Nullable final String alertMessage) {\r
-\r
-        final String rowKey = createKey(calculatorMessageType);\r
-\r
-        final Long currentTS = new Date().getTime();\r
-        final String vesMessage = StringEscapeUtils.unescapeJson(processorContext.getMessage());\r
-\r
-        // Find Functional Role and domain\r
-        final Pair<String, String> domainAndEventName = TCAUtils.getDomainAndEventName(processorContext);\r
-        final String domain = domainAndEventName.getLeft();\r
-        final String eventName = domainAndEventName.getRight();\r
-\r
-        final TCAMessageStatusEntity tcaMessageStatusEntity = new TCAMessageStatusEntity(currentTS,\r
-                instanceId, calculatorMessageType.name(), vesMessage, domain, eventName);\r
-\r
-        // add threshold violation fields\r
-        addViolatedThreshold(tcaMessageStatusEntity, processorContext);\r
-        // add processor status and messages\r
-        addMessageProcessorMessages(tcaMessageStatusEntity, processorContext);\r
-        // add Alert message\r
-        tcaMessageStatusEntity.setAlertMessage(\r
-                alertMessage == null ? null : StringEscapeUtils.unescapeJson(alertMessage)\r
-        );\r
-\r
-        messageStatusTable.write(rowKey, tcaMessageStatusEntity);\r
-\r
-        LOG.debug("Finished persisting VES Status Message with rowKey: {} in Message Status Table.", rowKey);\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Create TCA VES Message Status Table Properties\r
-     *\r
-     * @param timeToLiveSeconds Message Status Table time to live in seconds\r
-     *\r
-     * @return Message Status table properties\r
-     */\r
-    public static DatasetProperties getDatasetProperties(final int timeToLiveSeconds) {\r
-\r
-        try {\r
-            return ObjectMappedTableProperties.builder()\r
-                    .setType(TCAMessageStatusEntity.class)\r
-                    .setRowKeyExploreName(TABLE_ROW_KEY_COLUMN_NAME)\r
-                    .setRowKeyExploreType(Schema.Type.STRING)\r
-                    .add(IndexedTable.PROPERTY_TTL, timeToLiveSeconds)\r
-                    .setDescription(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_STATUS_DESCRIPTION_TABLE)\r
-                    .build();\r
-        } catch (UnsupportedTypeException e) {\r
-            final String errorMessage = "Unable to convert TCAMessageStatusEntity class to Schema";\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Adds Violated Threshold Parameter values to {@link TCAMessageStatusEntity}\r
-     *\r
-     * @param tcaMessageStatusEntity message entity that needs to be populated with threshold fields\r
-     * @param processorContext processor context\r
-     *\r
-     */\r
-    private static void addViolatedThreshold(final TCAMessageStatusEntity tcaMessageStatusEntity,\r
-                                                               final TCACEFProcessorContext processorContext) {\r
-\r
-        final MetricsPerEventName metricsPerEventName = processorContext.getMetricsPerEventName();\r
-\r
-        if (metricsPerEventName != null\r
-                && metricsPerEventName.getThresholds() != null\r
-                && metricsPerEventName.getThresholds().get(0) != null) {\r
-\r
-            final Threshold threshold = metricsPerEventName.getThresholds().get(0);\r
-            tcaMessageStatusEntity.setThresholdPath(threshold.getFieldPath());\r
-            tcaMessageStatusEntity.setThresholdSeverity(threshold.getSeverity().name());\r
-            tcaMessageStatusEntity.setThresholdDirection(threshold.getDirection().name());\r
-            tcaMessageStatusEntity.setThresholdValue(threshold.getThresholdValue());\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Add TCA CEF Message Processor status information\r
-     *\r
-     * @param tcaMessageStatusEntity message entity that needs to be populated with message processor fields\r
-     * @param processorContext processor context\r
-     *\r
-     */\r
-    @SuppressWarnings("unchecked")\r
-    private static void addMessageProcessorMessages(\r
-            final TCAMessageStatusEntity tcaMessageStatusEntity, final TCACEFProcessorContext processorContext) {\r
-        final List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors = processorContext\r
-                .getMessageProcessors();\r
-\r
-        if (messageProcessors != null && !messageProcessors.isEmpty()) {\r
-            for (Object messageProcessor : messageProcessors) {\r
-                final MessageProcessor<TCACEFProcessorContext> tcaMessageProcessor =\r
-                        (MessageProcessor<TCACEFProcessorContext>) messageProcessor;\r
-\r
-                final String processingState = tcaMessageProcessor.getProcessingState().name();\r
-                final String processingMessage = tcaMessageProcessor.getProcessingMessage().orNull();\r
-\r
-                if (messageProcessor.getClass().equals(TCACEFJsonProcessor.class)) {\r
-                    tcaMessageStatusEntity.setJsonProcessorStatus(processingState);\r
-                    tcaMessageStatusEntity.setJsonProcessorMessage(processingMessage);\r
-                }\r
-\r
-                if (messageProcessor.getClass().equals(TCACEFPolicyDomainFilter.class)) {\r
-                    tcaMessageStatusEntity.setDomainFilterStatus(processingState);\r
-                    tcaMessageStatusEntity.setDomainFilterMessage(processingMessage);\r
-                }\r
-\r
-                if (messageProcessor.getClass().equals(TCACEFPolicyEventNameFilter.class)) {\r
-                    tcaMessageStatusEntity.setEventNameFilterStatus(processingState);\r
-                    tcaMessageStatusEntity.setEventNameFilterMessage(processingMessage);\r
-                }\r
-\r
-                if (messageProcessor.getClass().equals(TCACEFPolicyThresholdsProcessor.class)) {\r
-                    tcaMessageStatusEntity.setThresholdCalculatorStatus(processingState);\r
-                    tcaMessageStatusEntity.setThresholdCalculatorMessage(processingMessage);\r
-                }\r
-\r
-            }\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Creates Row Key for TCA VES Message Status table\r
-     *\r
-     * Row Key = (Message Type + Decreasing Value)\r
-     *\r
-     * @param calculatorMessageType calculator message type\r
-     *\r
-     * @return row key string\r
-     */\r
-    private static String createKey(final TCACalculatorMessageType calculatorMessageType) {\r
-\r
-        final List<String> keyList = new LinkedList<>();\r
-        keyList.add(calculatorMessageType.name());\r
-        keyList.add(PersistenceUtils.getCurrentTimeReverseSubKey());\r
-        return Joiner.on(PersistenceUtils.ROW_KEY_DELIMITER).join(keyList);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.api.data.schema.UnsupportedTypeException;
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.IndexedTable;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTableProperties;
+import com.google.common.base.Joiner;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.tuple.Pair;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.common.service.processor.MessageProcessor;
+import org.onap.dcae.apod.analytics.common.service.processor.ProcessorContext;
+import org.onap.dcae.apod.analytics.common.utils.PersistenceUtils;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyDomainFilter;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyEventNameFilter;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyThresholdsProcessor;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import static org.onap.dcae.apod.analytics.common.utils.PersistenceUtils.TABLE_ROW_KEY_COLUMN_NAME;
+
+/**
+ *
+ *
+ * @author Rajiv Singla . Creation Date: 11/15/2016.
+ */
+public abstract class TCAMessageStatusPersister {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAMessageStatusPersister.class);
+
+    private TCAMessageStatusPersister() {
+
+    }
+
+    /**
+     * Saves Message Status in Table. Assumes no alert was generated
+     *
+     * @param processorContext processor Context
+     * @param instanceId Instance Id
+     * @param calculatorMessageType Calculation Message Type
+     * @param messageStatusTable Message Status Table
+     */
+    public static void persist(final TCACEFProcessorContext processorContext,
+                               final int instanceId,
+                               final TCACalculatorMessageType calculatorMessageType,
+                               final ObjectMappedTable<TCAMessageStatusEntity> messageStatusTable) {
+        persist(processorContext, instanceId, calculatorMessageType, messageStatusTable, null);
+    }
+
+    /**
+     * Saves Message Status in Table. Sets up alert message aslo
+     *
+     * @param processorContext processor Context
+     * @param instanceId Instance Id
+     * @param calculatorMessageType Calculation Message Type
+     * @param messageStatusTable Message Status Table
+     * @param alertMessage Alert message
+     */
+    public static void persist(final TCACEFProcessorContext processorContext,
+                               final int instanceId,
+                               final TCACalculatorMessageType calculatorMessageType,
+                               final ObjectMappedTable<TCAMessageStatusEntity> messageStatusTable,
+                               @Nullable final String alertMessage) {
+
+        final String rowKey = createKey(calculatorMessageType);
+
+        final Long currentTS = new Date().getTime();
+        final String vesMessage = StringEscapeUtils.unescapeJson(processorContext.getMessage());
+
+        // Find Functional Role and domain
+        final Pair<String, String> domainAndEventName = TCAUtils.getDomainAndEventName(processorContext);
+        final String domain = domainAndEventName.getLeft();
+        final String eventName = domainAndEventName.getRight();
+
+        final TCAMessageStatusEntity tcaMessageStatusEntity = new TCAMessageStatusEntity(currentTS,
+                instanceId, calculatorMessageType.name(), vesMessage, domain, eventName);
+
+        // add threshold violation fields
+        addViolatedThreshold(tcaMessageStatusEntity, processorContext);
+        // add processor status and messages
+        addMessageProcessorMessages(tcaMessageStatusEntity, processorContext);
+        // add Alert message
+        tcaMessageStatusEntity.setAlertMessage(
+                alertMessage == null ? null : StringEscapeUtils.unescapeJson(alertMessage)
+        );
+
+        messageStatusTable.write(rowKey, tcaMessageStatusEntity);
+
+        LOG.debug("Finished persisting VES Status Message with rowKey: {} in Message Status Table.", rowKey);
+
+    }
+
+
+    /**
+     * Create TCA VES Message Status Table Properties
+     *
+     * @param timeToLiveSeconds Message Status Table time to live in seconds
+     *
+     * @return Message Status table properties
+     */
+    public static DatasetProperties getDatasetProperties(final int timeToLiveSeconds) {
+
+        try {
+            return ObjectMappedTableProperties.builder()
+                    .setType(TCAMessageStatusEntity.class)
+                    .setRowKeyExploreName(TABLE_ROW_KEY_COLUMN_NAME)
+                    .setRowKeyExploreType(Schema.Type.STRING)
+                    .add(IndexedTable.PROPERTY_TTL, timeToLiveSeconds)
+                    .setDescription(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_STATUS_DESCRIPTION_TABLE)
+                    .build();
+        } catch (UnsupportedTypeException e) {
+            final String errorMessage = "Unable to convert TCAMessageStatusEntity class to Schema";
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+    }
+
+
+    /**
+     * Adds Violated Threshold Parameter values to {@link TCAMessageStatusEntity}
+     *
+     * @param tcaMessageStatusEntity message entity that needs to be populated with threshold fields
+     * @param processorContext processor context
+     *
+     */
+    private static void addViolatedThreshold(final TCAMessageStatusEntity tcaMessageStatusEntity,
+                                                               final TCACEFProcessorContext processorContext) {
+
+        final MetricsPerEventName metricsPerEventName = processorContext.getMetricsPerEventName();
+
+        if (metricsPerEventName != null
+                && metricsPerEventName.getThresholds() != null
+                && metricsPerEventName.getThresholds().get(0) != null) {
+
+            final Threshold threshold = metricsPerEventName.getThresholds().get(0);
+            tcaMessageStatusEntity.setThresholdPath(threshold.getFieldPath());
+            tcaMessageStatusEntity.setThresholdSeverity(threshold.getSeverity().name());
+            tcaMessageStatusEntity.setThresholdDirection(threshold.getDirection().name());
+            tcaMessageStatusEntity.setThresholdValue(threshold.getThresholdValue());
+        }
+
+    }
+
+
+    /**
+     * Add TCA CEF Message Processor status information
+     *
+     * @param tcaMessageStatusEntity message entity that needs to be populated with message processor fields
+     * @param processorContext processor context
+     *
+     */
+    @SuppressWarnings("unchecked")
+    private static void addMessageProcessorMessages(
+            final TCAMessageStatusEntity tcaMessageStatusEntity, final TCACEFProcessorContext processorContext) {
+        final List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors = processorContext
+                .getMessageProcessors();
+
+        if (messageProcessors != null && !messageProcessors.isEmpty()) {
+            for (Object messageProcessor : messageProcessors) {
+                final MessageProcessor<TCACEFProcessorContext> tcaMessageProcessor =
+                        (MessageProcessor<TCACEFProcessorContext>) messageProcessor;
+
+                final String processingState = tcaMessageProcessor.getProcessingState().name();
+                final String processingMessage = tcaMessageProcessor.getProcessingMessage().orNull();
+
+                if (messageProcessor.getClass().equals(TCACEFJsonProcessor.class)) {
+                    tcaMessageStatusEntity.setJsonProcessorStatus(processingState);
+                    tcaMessageStatusEntity.setJsonProcessorMessage(processingMessage);
+                }
+
+                if (messageProcessor.getClass().equals(TCACEFPolicyDomainFilter.class)) {
+                    tcaMessageStatusEntity.setDomainFilterStatus(processingState);
+                    tcaMessageStatusEntity.setDomainFilterMessage(processingMessage);
+                }
+
+                if (messageProcessor.getClass().equals(TCACEFPolicyEventNameFilter.class)) {
+                    tcaMessageStatusEntity.setEventNameFilterStatus(processingState);
+                    tcaMessageStatusEntity.setEventNameFilterMessage(processingMessage);
+                }
+
+                if (messageProcessor.getClass().equals(TCACEFPolicyThresholdsProcessor.class)) {
+                    tcaMessageStatusEntity.setThresholdCalculatorStatus(processingState);
+                    tcaMessageStatusEntity.setThresholdCalculatorMessage(processingMessage);
+                }
+
+            }
+        }
+    }
+
+    /**
+     * Creates Row Key for TCA VES Message Status table
+     *
+     * Row Key = (Message Type + Decreasing Value)
+     *
+     * @param calculatorMessageType calculator message type
+     *
+     * @return row key string
+     */
+    private static String createKey(final TCACalculatorMessageType calculatorMessageType) {
+
+        final List<String> keyList = new LinkedList<>();
+        keyList.add(calculatorMessageType.name());
+        keyList.add(PersistenceUtils.getCurrentTimeReverseSubKey());
+        return Joiner.on(PersistenceUtils.ROW_KEY_DELIMITER).join(keyList);
+    }
+
+}
@@ -1,78 +1,78 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import org.apache.hadoop.io.Writable;\r
-import org.apache.hadoop.io.WritableUtils;\r
-\r
-import java.io.DataInput;\r
-import java.io.DataOutput;\r
-import java.io.IOException;\r
-import java.io.Serializable;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/16/2016.\r
- */\r
-public class TCAVESAlertEntity implements Writable, Serializable {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private long creationTS;\r
-    private String alertMessage;\r
-\r
-    public TCAVESAlertEntity() {\r
-        // no argument constructor required for json serialization / deserialization\r
-    }\r
-\r
-    public TCAVESAlertEntity(long creationTS, String alertMessage) {\r
-        this.creationTS = creationTS;\r
-        this.alertMessage = alertMessage;\r
-    }\r
-\r
-    public long getCreationTS() {\r
-        return creationTS;\r
-    }\r
-\r
-    public void setCreationTS(long creationTS) {\r
-        this.creationTS = creationTS;\r
-    }\r
-\r
-    public String getAlertMessage() {\r
-        return alertMessage;\r
-    }\r
-\r
-    public void setAlertMessage(String alertMessage) {\r
-        this.alertMessage = alertMessage;\r
-    }\r
-\r
-    @Override\r
-    public void write(DataOutput dataOutput) throws IOException {\r
-        WritableUtils.writeVLong(dataOutput, creationTS);\r
-        WritableUtils.writeString(dataOutput, alertMessage);\r
-    }\r
-\r
-    @Override\r
-    public void readFields(DataInput dataInput) throws IOException {\r
-        creationTS = WritableUtils.readVLong(dataInput);\r
-        alertMessage = WritableUtils.readString(dataInput);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableUtils;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/16/2016.
+ */
+public class TCAVESAlertEntity implements Writable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private long creationTS;
+    private String alertMessage;
+
+    public TCAVESAlertEntity() {
+        // no argument constructor required for json serialization / deserialization
+    }
+
+    public TCAVESAlertEntity(long creationTS, String alertMessage) {
+        this.creationTS = creationTS;
+        this.alertMessage = alertMessage;
+    }
+
+    public long getCreationTS() {
+        return creationTS;
+    }
+
+    public void setCreationTS(long creationTS) {
+        this.creationTS = creationTS;
+    }
+
+    public String getAlertMessage() {
+        return alertMessage;
+    }
+
+    public void setAlertMessage(String alertMessage) {
+        this.alertMessage = alertMessage;
+    }
+
+    @Override
+    public void write(DataOutput dataOutput) throws IOException {
+        WritableUtils.writeVLong(dataOutput, creationTS);
+        WritableUtils.writeString(dataOutput, alertMessage);
+    }
+
+    @Override
+    public void readFields(DataInput dataInput) throws IOException {
+        creationTS = WritableUtils.readVLong(dataInput);
+        alertMessage = WritableUtils.readString(dataInput);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.api.data.schema.UnsupportedTypeException;\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.IndexedTable;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTableProperties;\r
-import org.apache.commons.lang3.StringEscapeUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Date;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.PersistenceUtils.TABLE_ROW_KEY_COLUMN_NAME;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/16/2016.\r
- */\r
-public abstract class TCAVESAlertsPersister {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAVESAlertsPersister.class);\r
-\r
-    private TCAVESAlertsPersister() {\r
-\r
-    }\r
-\r
-    /**\r
-     * Persists Alert Message to Alerts Table\r
-     *\r
-     * @param alertMessage alert Message\r
-     * @param tcaVESAlertTable alert Table Name\r
-     */\r
-    public static void persist(final String alertMessage, final ObjectMappedTable<TCAVESAlertEntity> tcaVESAlertTable) {\r
-        final Date currentDate = new Date();\r
-        final TCAVESAlertEntity alertEntity = new TCAVESAlertEntity(currentDate.getTime(),\r
-                StringEscapeUtils.unescapeJson(alertMessage));\r
-        // row key is same as current timestamp\r
-        final String rowKey = createRowKey(currentDate);\r
-        tcaVESAlertTable.write(rowKey, alertEntity);\r
-\r
-        LOG.debug("Finished persisting VES Alert message ID: {} in VES Alerts table.", rowKey);\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates {@link DatasetProperties} for Alerts Table\r
-     *\r
-     * @param timeToLiveSeconds alerts table Time to Live\r
-     * @return Alerts table properties\r
-     */\r
-    public static DatasetProperties getDatasetProperties(final int timeToLiveSeconds) {\r
-        try {\r
-            return ObjectMappedTableProperties.builder()\r
-                    .setType(TCAVESAlertEntity.class)\r
-                    .setRowKeyExploreName(TABLE_ROW_KEY_COLUMN_NAME)\r
-                    .setRowKeyExploreType(Schema.Type.STRING)\r
-                    .add(IndexedTable.PROPERTY_TTL, timeToLiveSeconds)\r
-                    .setDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_DESCRIPTION_TABLE)\r
-                    .build();\r
-        } catch (UnsupportedTypeException e) {\r
-            final String errorMessage = "Unable to convert TCAVESAlertEntity class to Schema";\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-    }\r
-\r
-    /**\r
-     * Creates Row Key for Alerts Table\r
-     *\r
-     * @param date current Date\r
-     *\r
-     * @return row key\r
-     */\r
-    public static String createRowKey(final Date date) {\r
-       return String.format("%025d", date.getTime());\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.api.data.schema.UnsupportedTypeException;
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.IndexedTable;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTableProperties;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Date;
+
+import static org.onap.dcae.apod.analytics.common.utils.PersistenceUtils.TABLE_ROW_KEY_COLUMN_NAME;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/16/2016.
+ */
+public abstract class TCAVESAlertsPersister {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAVESAlertsPersister.class);
+
+    private TCAVESAlertsPersister() {
+
+    }
+
+    /**
+     * Persists Alert Message to Alerts Table
+     *
+     * @param alertMessage alert Message
+     * @param tcaVESAlertTable alert Table Name
+     */
+    public static void persist(final String alertMessage, final ObjectMappedTable<TCAVESAlertEntity> tcaVESAlertTable) {
+        final Date currentDate = new Date();
+        final TCAVESAlertEntity alertEntity = new TCAVESAlertEntity(currentDate.getTime(),
+                StringEscapeUtils.unescapeJson(alertMessage));
+        // row key is same as current timestamp
+        final String rowKey = createRowKey(currentDate);
+        tcaVESAlertTable.write(rowKey, alertEntity);
+
+        LOG.debug("Finished persisting VES Alert message ID: {} in VES Alerts table.", rowKey);
+    }
+
+
+    /**
+     * Creates {@link DatasetProperties} for Alerts Table
+     *
+     * @param timeToLiveSeconds alerts table Time to Live
+     * @return Alerts table properties
+     */
+    public static DatasetProperties getDatasetProperties(final int timeToLiveSeconds) {
+        try {
+            return ObjectMappedTableProperties.builder()
+                    .setType(TCAVESAlertEntity.class)
+                    .setRowKeyExploreName(TABLE_ROW_KEY_COLUMN_NAME)
+                    .setRowKeyExploreType(Schema.Type.STRING)
+                    .add(IndexedTable.PROPERTY_TTL, timeToLiveSeconds)
+                    .setDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_DESCRIPTION_TABLE)
+                    .build();
+        } catch (UnsupportedTypeException e) {
+            final String errorMessage = "Unable to convert TCAVESAlertEntity class to Schema";
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+    }
+
+    /**
+     * Creates Row Key for Alerts Table
+     *
+     * @param date current Date
+     *
+     * @return row key
+     */
+    public static String createRowKey(final Date date) {
+       return String.format("%025d", date.getTime());
+    }
+
+}
@@ -1,47 +1,47 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-/**\r
- *<p>\r
- *     Minimum Contract for all CDAP App Configs\r
- *</p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public interface CDAPAppConfig extends CDAPAppSettings {\r
-\r
-    /**\r
-     *  CDAP Application Name\r
-     *\r
-     * @return cdap app name\r
-     */\r
-    String getAppName();\r
-\r
-\r
-    /**\r
-     *  CDAP Application Description\r
-     *\r
-     * @return cdap app description\r
-     */\r
-    String getAppDescription();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+/**
+ *<p>
+ *     Minimum Contract for all CDAP App Configs
+ *</p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public interface CDAPAppConfig extends CDAPAppSettings {
+
+    /**
+     *  CDAP Application Name
+     *
+     * @return cdap app name
+     */
+    String getAppName();
+
+
+    /**
+     *  CDAP Application Description
+     *
+     * @return cdap app description
+     */
+    String getAppDescription();
+
+}
@@ -1,31 +1,31 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-/**\r
- * <p>\r
- *     Marker Interface for all CDAP Preferences\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public interface CDAPAppPreferences extends CDAPAppSettings {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+/**
+ * <p>
+ *     Marker Interface for all CDAP Preferences
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public interface CDAPAppPreferences extends CDAPAppSettings {
+}
@@ -1,35 +1,35 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * <p>\r
- *      A marker interface for all CDAP Related App Settings.\r
- *      App Settings can either be preferences, cdap app settings etc.\r
- * </p>\r
- *\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public interface CDAPAppSettings extends Serializable {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *      A marker interface for all CDAP Related App Settings.
+ *      App Settings can either be preferences, cdap app settings etc.
+ * </p>
+ *
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public interface CDAPAppSettings extends Serializable {
+}
@@ -1,64 +1,64 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-import co.cask.cdap.api.Config;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-\r
-/**\r
- * Base class for all DACE Analytics Application Configurations\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/4/2016.\r
- */\r
-public abstract class CDAPBaseAppConfig extends Config implements CDAPAppConfig {\r
-\r
-\r
-    /**\r
-     * DCAE Analytics App Name\r
-     */\r
-    protected String appName = CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_NAME_APP;\r
-\r
-    /**\r
-     * DCAE Analytics App Description\r
-     */\r
-    protected String appDescription = CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP;\r
-\r
-\r
-    /**\r
-     * Returns DCAE Analytics CDAP Application name\r
-     *\r
-     * @return CDAP application name\r
-     */\r
-    @Override\r
-    public String getAppName() {\r
-        return appName;\r
-    }\r
-\r
-    /**\r
-     * Returns DCAE Analytics CDAP Application descrption\r
-     *\r
-     * @return CDAP application description\r
-     */\r
-    @Override\r
-    public String getAppDescription() {\r
-        return appDescription;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+import co.cask.cdap.api.Config;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+
+/**
+ * Base class for all DACE Analytics Application Configurations
+ *
+ * @author Rajiv Singla . Creation Date: 10/4/2016.
+ */
+public abstract class CDAPBaseAppConfig extends Config implements CDAPAppConfig {
+
+
+    /**
+     * DCAE Analytics App Name
+     */
+    protected String appName = CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_NAME_APP;
+
+    /**
+     * DCAE Analytics App Description
+     */
+    protected String appDescription = CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP;
+
+
+    /**
+     * Returns DCAE Analytics CDAP Application name
+     *
+     * @return CDAP application name
+     */
+    @Override
+    public String getAppName() {
+        return appName;
+    }
+
+    /**
+     * Returns DCAE Analytics CDAP Application descrption
+     *
+     * @return CDAP application description
+     */
+    @Override
+    public String getAppDescription() {
+        return appDescription;
+    }
+}
@@ -1,53 +1,53 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import co.cask.cdap.api.annotation.Name;\r
-import co.cask.cdap.api.plugin.PluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPPluginConstants;\r
-\r
-/**\r
- * <p>\r
- *      Base class for all DCAE Analytics CDAP Plugin config\r
- * </p>\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/17/2017.\r
- */\r
-public abstract class CDAPBasePluginConfig extends PluginConfig implements CDAPPluginSettings {\r
-\r
-    @Name(CDAPPluginConstants.Reference.REFERENCE_NAME)\r
-    @Description(CDAPPluginConstants.Reference.REFERENCE_NAME_DESCRIPTION)\r
-    @Macro\r
-    protected String referenceName;\r
-\r
-    /**\r
-     * Provides Reference Name that can be used to trace lineage or meta data information inside CDAP container\r
-     *\r
-     * @return reference name\r
-     */\r
-    public String getReferenceName() {\r
-        return referenceName;\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import co.cask.cdap.api.annotation.Name;
+import co.cask.cdap.api.plugin.PluginConfig;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPPluginConstants;
+
+/**
+ * <p>
+ *      Base class for all DCAE Analytics CDAP Plugin config
+ * </p>
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/17/2017.
+ */
+public abstract class CDAPBasePluginConfig extends PluginConfig implements CDAPPluginSettings {
+
+    @Name(CDAPPluginConstants.Reference.REFERENCE_NAME)
+    @Description(CDAPPluginConstants.Reference.REFERENCE_NAME_DESCRIPTION)
+    @Macro
+    protected String referenceName;
+
+    /**
+     * Provides Reference Name that can be used to trace lineage or meta data information inside CDAP container
+     *
+     * @return reference name
+     */
+    public String getReferenceName() {
+        return referenceName;
+    }
+
+
+}
@@ -1,31 +1,31 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-/**\r
- * <p>\r
- *      A marker interface for all CDAP Plugin related Settings.\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 1/17/2017.\r
- */\r
-public interface CDAPPluginSettings extends CDAPAppSettings {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+/**
+ * <p>
+ *      A marker interface for all CDAP Plugin related Settings.
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 1/17/2017.
+ */
+public interface CDAPPluginSettings extends CDAPAppSettings {
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.utils;\r
-\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import com.google.common.base.Optional;\r
-import com.google.common.base.Stopwatch;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * Utility common methods for DMaaP MR functionality\r
- *\r
- * @author Rajiv Singla . Creation Date: 2/6/2017.\r
- */\r
-public abstract class DMaaPMRUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRUtils.class);\r
-\r
-    private DMaaPMRUtils() {\r
-        // private constructor\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns messages fetched from DMaaP MR Subscriber.\r
-     *\r
-     * @param subscriber DMaaP MR Subscriber instance\r
-     * @param metrics CDAP metrics\r
-     *\r
-     * @return messages fetched from DMaaP MR topic\r
-     */\r
-    public static Optional<List<String>> getSubscriberMessages(final DMaaPMRSubscriber subscriber,\r
-                                                               final Metrics metrics) {\r
-\r
-        final Optional<DMaaPMRSubscriberResponse> subscriberResponseOptional =\r
-                getSubscriberResponse(subscriber, metrics);\r
-\r
-        // If response is not present, unable to proceed\r
-        if (!subscriberResponseOptional.isPresent()) {\r
-            return Optional.absent();\r
-        }\r
-\r
-        final DMaaPMRSubscriberResponse subscriberResponse = subscriberResponseOptional.get();\r
-\r
-        // If response code return by the subscriber call is not successful, unable to do proceed\r
-        if (!HTTPUtils.isSuccessfulResponseCode(subscriberResponse.getResponseCode())) {\r
-            LOG.error("Subscriber was unable to fetch messages properly.Subscriber Response Code: {} " +\r
-                    "Unable to proceed further....", subscriberResponse.getResponseCode());\r
-            metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC, 1);\r
-            return Optional.absent();\r
-        }\r
-\r
-        LOG.debug("Subscriber HTTP Response Status Code match successful:  {}", subscriberResponse,\r
-                HTTPUtils.HTTP_SUCCESS_STATUS_CODE);\r
-\r
-        final List<String> actualMessages = subscriberResponse.getFetchedMessages();\r
-\r
-        // If there are no message returned during from Subscriber, nothing to write to CDAP Stream\r
-        if (actualMessages.isEmpty()) {\r
-            LOG.debug("Subscriber Response has no messages. Nothing to write....");\r
-            metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC, 1);\r
-            return Optional.absent();\r
-        }\r
-\r
-        LOG.debug("DMaaP MR Subscriber found new messages in DMaaP Topic. Message count: {}", actualMessages.size());\r
-        metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC, actualMessages.size());\r
-\r
-        return Optional.of(actualMessages);\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Get Subscriber response and records time taken to fetch messages. Returns Optional.None if Subscriber response\r
-     * is null or response status code is not present\r
-     *\r
-     * @param subscriber - DMaaP Subscriber\r
-     * @param metrics - CDAP Metrics collector\r
-     *\r
-     * @return - Optional of Subscriber Response\r
-     */\r
-    public static Optional<DMaaPMRSubscriberResponse> getSubscriberResponse(final DMaaPMRSubscriber subscriber,\r
-                                                                            final Metrics metrics) {\r
-\r
-        // Record all response count from subscriber\r
-        metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_ALL_RESPONSES_COUNT_METRIC, 1);\r
-\r
-        // Check how long it took for subscriber to respond\r
-        final Stopwatch stopwatch = new Stopwatch();\r
-        stopwatch.start();\r
-\r
-        // Fetch messages from DMaaP MR Topic\r
-        DMaaPMRSubscriberResponse subscriberResponse = null;\r
-        try {\r
-            subscriberResponse = subscriber.fetchMessages();\r
-        } catch (DCAEAnalyticsRuntimeException e) {\r
-            LOG.error("Error while fetching messages for DMaaP MR Topic: {}", e);\r
-        }\r
-\r
-        stopwatch.stop();\r
-        final long subscriberResponseTimeMS = stopwatch.elapsedMillis();\r
-\r
-        // If response is null is null or response code is null, unable to proceed nothing to do\r
-        if (subscriberResponse == null || subscriberResponse.getResponseCode() == null) {\r
-            LOG.error("Subscriber Response is null or subscriber Response code is null. Unable to proceed further...");\r
-            return Optional.absent();\r
-        }\r
-\r
-        LOG.debug("Subscriber Response:{}, Subscriber HTTP Response Status Code {}, Subscriber Response Time(ms): {}",\r
-                subscriberResponse, subscriberResponse.getResponseCode(), subscriberResponseTimeMS);\r
-\r
-        // Record subscriber response time\r
-        metrics.gauge(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_RESPONSE_TIME_MS_METRIC, subscriberResponseTimeMS);\r
-\r
-        return Optional.of(subscriberResponse);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.utils;
+
+import co.cask.cdap.api.metrics.Metrics;
+import com.google.common.base.Optional;
+import com.google.common.base.Stopwatch;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.common.utils.HTTPUtils;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+/**
+ * Utility common methods for DMaaP MR functionality
+ *
+ * @author Rajiv Singla . Creation Date: 2/6/2017.
+ */
+public abstract class DMaaPMRUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRUtils.class);
+
+    private DMaaPMRUtils() {
+        // private constructor
+    }
+
+
+    /**
+     * Returns messages fetched from DMaaP MR Subscriber.
+     *
+     * @param subscriber DMaaP MR Subscriber instance
+     * @param metrics CDAP metrics
+     *
+     * @return messages fetched from DMaaP MR topic
+     */
+    public static Optional<List<String>> getSubscriberMessages(final DMaaPMRSubscriber subscriber,
+                                                               final Metrics metrics) {
+
+        final Optional<DMaaPMRSubscriberResponse> subscriberResponseOptional =
+                getSubscriberResponse(subscriber, metrics);
+
+        // If response is not present, unable to proceed
+        if (!subscriberResponseOptional.isPresent()) {
+            return Optional.absent();
+        }
+
+        final DMaaPMRSubscriberResponse subscriberResponse = subscriberResponseOptional.get();
+
+        // If response code return by the subscriber call is not successful, unable to do proceed
+        if (!HTTPUtils.isSuccessfulResponseCode(subscriberResponse.getResponseCode())) {
+            LOG.error("Subscriber was unable to fetch messages properly.Subscriber Response Code: {} " +
+                    "Unable to proceed further....", subscriberResponse.getResponseCode());
+            metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC, 1);
+            return Optional.absent();
+        }
+
+        LOG.debug("Subscriber HTTP Response Status Code match successful:  {}", subscriberResponse,
+                HTTPUtils.HTTP_SUCCESS_STATUS_CODE);
+
+        final List<String> actualMessages = subscriberResponse.getFetchedMessages();
+
+        // If there are no message returned during from Subscriber, nothing to write to CDAP Stream
+        if (actualMessages.isEmpty()) {
+            LOG.debug("Subscriber Response has no messages. Nothing to write....");
+            metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC, 1);
+            return Optional.absent();
+        }
+
+        LOG.debug("DMaaP MR Subscriber found new messages in DMaaP Topic. Message count: {}", actualMessages.size());
+        metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC, actualMessages.size());
+
+        return Optional.of(actualMessages);
+
+    }
+
+
+    /**
+     * Get Subscriber response and records time taken to fetch messages. Returns Optional.None if Subscriber response
+     * is null or response status code is not present
+     *
+     * @param subscriber - DMaaP Subscriber
+     * @param metrics - CDAP Metrics collector
+     *
+     * @return - Optional of Subscriber Response
+     */
+    public static Optional<DMaaPMRSubscriberResponse> getSubscriberResponse(final DMaaPMRSubscriber subscriber,
+                                                                            final Metrics metrics) {
+
+        // Record all response count from subscriber
+        metrics.count(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_ALL_RESPONSES_COUNT_METRIC, 1);
+
+        // Check how long it took for subscriber to respond
+        final Stopwatch stopwatch = new Stopwatch();
+        stopwatch.start();
+
+        // Fetch messages from DMaaP MR Topic
+        DMaaPMRSubscriberResponse subscriberResponse = null;
+        try {
+            subscriberResponse = subscriber.fetchMessages();
+        } catch (DCAEAnalyticsRuntimeException e) {
+            LOG.error("Error while fetching messages for DMaaP MR Topic: {}", e);
+        }
+
+        stopwatch.stop();
+        final long subscriberResponseTimeMS = stopwatch.elapsedMillis();
+
+        // If response is null is null or response code is null, unable to proceed nothing to do
+        if (subscriberResponse == null || subscriberResponse.getResponseCode() == null) {
+            LOG.error("Subscriber Response is null or subscriber Response code is null. Unable to proceed further...");
+            return Optional.absent();
+        }
+
+        LOG.debug("Subscriber Response:{}, Subscriber HTTP Response Status Code {}, Subscriber Response Time(ms): {}",
+                subscriberResponse, subscriberResponse.getResponseCode(), subscriberResponseTimeMS);
+
+        // Record subscriber response time
+        metrics.gauge(CDAPMetricsConstants.DMAAP_MR_SUBSCRIBER_RESPONSE_TIME_MS_METRIC, subscriberResponseTimeMS);
+
+        return Optional.of(subscriberResponse);
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.utils;\r
-\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPAppSettings;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.common.validation.ValidationResponse;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import javax.annotation.Nonnull;\r
-import javax.annotation.Nullable;\r
-\r
-import static com.google.common.base.Preconditions.checkNotNull;\r
-\r
-/**\r
- * Utility methods to validate null checks, empty string etc\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public abstract class ValidationUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(ValidationUtils.class);\r
-\r
-    private ValidationUtils() {\r
-\r
-    }\r
-\r
-    /**\r
-     * Checks if String is empty. For null string true is returned\r
-     *\r
-     * @param stringValue string value\r
-     * @return returns true is string is empty or null\r
-     */\r
-    public static boolean isEmpty(@Nullable final String stringValue) {\r
-        return stringValue == null || stringValue.isEmpty() || stringValue.trim().isEmpty();\r
-    }\r
-\r
-\r
-    /**\r
-     * Checks if String value is present. A null, empty, or blank values of string\r
-     * are considered not present.\r
-     *\r
-     * @param stringValue string value to check if it is present or not\r
-     *\r
-     * @return true if string value is not null, empty or blank\r
-     */\r
-    public static boolean isPresent(@Nullable final String stringValue) {\r
-        return !isEmpty(stringValue);\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides common functionality to Validates CDAP App Settings. Throws Runtime exception if validation fails\r
-     *\r
-     * @param appSettings app Settings e.g. App Config, App Preferences etc\r
-     * @param appSettingsValidator app Settings validator\r
-     *\r
-     * @param <T> Settings type e.g. AppConfig or AppPreferences\r
-     * @param <R> Validation Response type\r
-     * @param <V> Validator Type\r
-     */\r
-    public static <T extends CDAPAppSettings, R extends ValidationResponse<T>,\r
-            V extends CDAPAppSettingsValidator<T, R>> void validateSettings(@Nonnull final T appSettings,\r
-                                                                            @Nonnull final V appSettingsValidator) {\r
-        checkNotNull(appSettings, "App Settings must not be null");\r
-        checkNotNull(appSettingsValidator, "App Settings validator must not be null");\r
-\r
-        final String appSettingsClassName = appSettings.getClass().getSimpleName();\r
-        final String appSettingsClassValidator = appSettingsValidator.getClass().getSimpleName();\r
-\r
-        LOG.debug("Validating App Settings for: {}, with App Settings Validator: {} ",\r
-                appSettingsClassName, appSettingsClassValidator);\r
-\r
-        final R validationResponse = appSettingsValidator.validateAppSettings(appSettings);\r
-\r
-        // If setting validation fails throw an exception\r
-        if (validationResponse.hasErrors()) {\r
-            throw new CDAPSettingsException(\r
-                    validationResponse.getAllErrorMessage(), LOG, new IllegalArgumentException());\r
-        }\r
-\r
-        LOG.debug("App Settings Validation Successful for app Settings: {} with validator: {}", appSettingsClassName,\r
-                appSettingsClassValidator);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.utils;
+
+
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPAppSettings;
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.common.validation.ValidationResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Utility methods to validate null checks, empty string etc
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public abstract class ValidationUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ValidationUtils.class);
+
+    private ValidationUtils() {
+
+    }
+
+    /**
+     * Checks if String is empty. For null string true is returned
+     *
+     * @param stringValue string value
+     * @return returns true is string is empty or null
+     */
+    public static boolean isEmpty(@Nullable final String stringValue) {
+        return stringValue == null || stringValue.isEmpty() || stringValue.trim().isEmpty();
+    }
+
+
+    /**
+     * Checks if String value is present. A null, empty, or blank values of string
+     * are considered not present.
+     *
+     * @param stringValue string value to check if it is present or not
+     *
+     * @return true if string value is not null, empty or blank
+     */
+    public static boolean isPresent(@Nullable final String stringValue) {
+        return !isEmpty(stringValue);
+    }
+
+
+    /**
+     * Provides common functionality to Validates CDAP App Settings. Throws Runtime exception if validation fails
+     *
+     * @param appSettings app Settings e.g. App Config, App Preferences etc
+     * @param appSettingsValidator app Settings validator
+     *
+     * @param <T> Settings type e.g. AppConfig or AppPreferences
+     * @param <R> Validation Response type
+     * @param <V> Validator Type
+     */
+    public static <T extends CDAPAppSettings, R extends ValidationResponse<T>,
+            V extends CDAPAppSettingsValidator<T, R>> void validateSettings(@Nonnull final T appSettings,
+                                                                            @Nonnull final V appSettingsValidator) {
+        checkNotNull(appSettings, "App Settings must not be null");
+        checkNotNull(appSettingsValidator, "App Settings validator must not be null");
+
+        final String appSettingsClassName = appSettings.getClass().getSimpleName();
+        final String appSettingsClassValidator = appSettingsValidator.getClass().getSimpleName();
+
+        LOG.debug("Validating App Settings for: {}, with App Settings Validator: {} ",
+                appSettingsClassName, appSettingsClassValidator);
+
+        final R validationResponse = appSettingsValidator.validateAppSettings(appSettings);
+
+        // If setting validation fails throw an exception
+        if (validationResponse.hasErrors()) {
+            throw new CDAPSettingsException(
+                    validationResponse.getAllErrorMessage(), LOG, new IllegalArgumentException());
+        }
+
+        LOG.debug("App Settings Validation Successful for app Settings: {} with validator: {}", appSettingsClassName,
+                appSettingsClassValidator);
+    }
+
+}
@@ -1,52 +1,52 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.validation;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPAppSettings;\r
-import org.openecomp.dcae.apod.analytics.common.validation.DCAEValidator;\r
-import org.openecomp.dcae.apod.analytics.common.validation.ValidationResponse;\r
-\r
-/**\r
- * <p>\r
- *     Validates CDAP Application Settings (AppConfig, Preferences etc)\r
- * <p>\r
- *\r
- * @param <T> {@link CDAPAppSettings} DCAE Analytics App Settings (e.g. AppConfig, Preferences)\r
- * @param <R> {@link ValidationResponse} Validator response implementations\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public interface CDAPAppSettingsValidator<T extends CDAPAppSettings, R extends ValidationResponse<T>>\r
-        extends DCAEValidator {\r
-\r
-    /**\r
-     * Validates DCAE Analytics App Settings and return Validation response which can be\r
-     * checked for any app setting issues\r
-     *\r
-     * @param appSettings DCAE CDAP Application Settings (e.g. AppConfig, Preferences etc.)\r
-     * @return validation response\r
-     */\r
-    R validateAppSettings(T appSettings);\r
-\r
-\r
-}\r
-\r
-\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.validation;
+
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPAppSettings;
+import org.onap.dcae.apod.analytics.common.validation.DCAEValidator;
+import org.onap.dcae.apod.analytics.common.validation.ValidationResponse;
+
+/**
+ * <p>
+ *     Validates CDAP Application Settings (AppConfig, Preferences etc)
+ * <p>
+ *
+ * @param <T> {@link CDAPAppSettings} DCAE Analytics App Settings (e.g. AppConfig, Preferences)
+ * @param <R> {@link ValidationResponse} Validator response implementations
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public interface CDAPAppSettingsValidator<T extends CDAPAppSettings, R extends ValidationResponse<T>>
+        extends DCAEValidator {
+
+    /**
+     * Validates DCAE Analytics App Settings and return Validation response which can be
+     * checked for any app setting issues
+     *
+     * @param appSettings DCAE CDAP Application Settings (e.g. AppConfig, Preferences etc.)
+     * @return validation response
+     */
+    R validateAppSettings(T appSettings);
+
+
+}
+
+
@@ -1,89 +1,89 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common;\r
-\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPAppSettings;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBaseAppConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/12/2017.\r
- */\r
-public abstract class BaseAnalyticsCDAPCommonUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-    protected static final String CEF_MESSAGE_FILE_LOCATION = "data/json/cef/cef_message.json";\r
-    protected static final String TCA_POLICY_FILE_LOCATION = "data/json/policy/tca_policy.json";\r
-    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =\r
-            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();\r
-\r
-    /**\r
-     * Test Implementation for {@link CDAPBaseAppConfig}\r
-     */\r
-    public class CDAPBaseAppConfigImp extends CDAPBaseAppConfig {\r
-    }\r
-\r
-\r
-    /**\r
-     * Test implementation for {@link CDAPAppSettings}\r
-     */\r
-    public class CDAPTestAppSettings implements CDAPAppSettings {\r
-\r
-        private String settingsField;\r
-\r
-        public String getSettingsField() {\r
-            return settingsField;\r
-        }\r
-\r
-        public void setSettingsField(String settingsField) {\r
-            this.settingsField = settingsField;\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Test implementation for {@link CDAPAppSettingsValidator}\r
-     */\r
-    public class CDAPTestAppSettingsValidator implements CDAPAppSettingsValidator<CDAPTestAppSettings,\r
-            GenericValidationResponse<CDAPTestAppSettings>> {\r
-\r
-        private static final long serialVersionUID = 1L;\r
-\r
-        @Override\r
-        public GenericValidationResponse<CDAPTestAppSettings>\r
-        validateAppSettings(CDAPTestAppSettings cdapTestAppSettings) {\r
-            GenericValidationResponse<CDAPTestAppSettings> validationResponse = new\r
-                    GenericValidationResponse<>();\r
-            if (ValidationUtils.isEmpty(cdapTestAppSettings.getSettingsField())) {\r
-                validationResponse\r
-                        .addErrorMessage("settingsField", "Settings Field must not be empty");\r
-            }\r
-            return validationResponse;\r
-        }\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPAppSettings;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPBaseAppConfig;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/12/2017.
+ */
+public abstract class BaseAnalyticsCDAPCommonUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+    protected static final String CEF_MESSAGE_FILE_LOCATION = "data/json/cef/cef_message.json";
+    protected static final String TCA_POLICY_FILE_LOCATION = "data/json/policy/tca_policy.json";
+    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =
+            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();
+
+    /**
+     * Test Implementation for {@link CDAPBaseAppConfig}
+     */
+    public class CDAPBaseAppConfigImp extends CDAPBaseAppConfig {
+    }
+
+
+    /**
+     * Test implementation for {@link CDAPAppSettings}
+     */
+    public class CDAPTestAppSettings implements CDAPAppSettings {
+
+        private String settingsField;
+
+        public String getSettingsField() {
+            return settingsField;
+        }
+
+        public void setSettingsField(String settingsField) {
+            this.settingsField = settingsField;
+        }
+    }
+
+
+    /**
+     * Test implementation for {@link CDAPAppSettingsValidator}
+     */
+    public class CDAPTestAppSettingsValidator implements CDAPAppSettingsValidator<CDAPTestAppSettings,
+            GenericValidationResponse<CDAPTestAppSettings>> {
+
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        public GenericValidationResponse<CDAPTestAppSettings>
+        validateAppSettings(CDAPTestAppSettings cdapTestAppSettings) {
+            GenericValidationResponse<CDAPTestAppSettings> validationResponse = new
+                    GenericValidationResponse<>();
+            if (ValidationUtils.isEmpty(cdapTestAppSettings.getSettingsField())) {
+                validationResponse
+                        .addErrorMessage("settingsField", "Settings Field must not be empty");
+            }
+            return validationResponse;
+        }
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import com.google.common.base.Joiner;\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.utils.PersistenceUtils;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.CommonEventHeader;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Event;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 9/13/2017.\r
- */\r
-public class TCAAlertsAbatementPersisterTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    private static final String EVENT_NAME = "testEventName";\r
-    private static final String SOURCE_NAME = "testSourceName";\r
-    private static final String REPORTING_ENTITY_NAME = "testReportingEntityName";\r
-    private static final String THRESHOLD_CLOSED_LOOP_CONTROL_NAME = "testControlLoopName";\r
-    private static final String THRESHOLD_FIELD_PATH = "testFieldPath";\r
-    private static final String EXPECTED_LOOKUP_KEY = Joiner.on(PersistenceUtils.ROW_KEY_DELIMITER).join(\r
-            ImmutableList.of(EVENT_NAME, SOURCE_NAME, REPORTING_ENTITY_NAME,\r
-                    THRESHOLD_CLOSED_LOOP_CONTROL_NAME, THRESHOLD_FIELD_PATH));\r
-\r
-    private ObjectMappedTable<TCAAlertsAbatementEntity> alertsAbatementTable;\r
-    private EventListener eventListener;\r
-    private MetricsPerEventName violatedMetricsPerEventName;\r
-    private TCAVESResponse tcavesResponse;\r
-    private String abatementTS;\r
-    private Event event;\r
-    private CommonEventHeader commonEventHeader;\r
-    private Threshold violatedThreshold;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        alertsAbatementTable = mock(ObjectMappedTable.class);\r
-        eventListener = mock(EventListener.class);\r
-        event = mock(Event.class);\r
-        commonEventHeader = mock(CommonEventHeader.class);\r
-\r
-        when(eventListener.getEvent()).thenReturn(event);\r
-        when(event.getCommonEventHeader()).thenReturn(commonEventHeader);\r
-        when(commonEventHeader.getEventName()).thenReturn(EVENT_NAME);\r
-        when(commonEventHeader.getSourceName()).thenReturn(SOURCE_NAME);\r
-        when(commonEventHeader.getReportingEntityName()).thenReturn(REPORTING_ENTITY_NAME);\r
-\r
-        violatedMetricsPerEventName = mock(MetricsPerEventName.class);\r
-        when(violatedMetricsPerEventName.getEventName()).thenReturn(EVENT_NAME);\r
-        violatedThreshold = mock(Threshold.class);\r
-        when(violatedMetricsPerEventName.getThresholds()).thenReturn(ImmutableList.of(violatedThreshold));\r
-        when(violatedThreshold.getClosedLoopControlName()).thenReturn(THRESHOLD_CLOSED_LOOP_CONTROL_NAME);\r
-        when(violatedThreshold.getFieldPath()).thenReturn(THRESHOLD_FIELD_PATH);\r
-        tcavesResponse = mock(TCAVESResponse.class);\r
-        abatementTS = "1234";\r
-    }\r
-\r
-    @Test\r
-    public void testGetDatasetProperties() throws Exception {\r
-        final DatasetProperties datasetProperties = TCAAlertsAbatementPersister.getDatasetProperties(20000);\r
-        assertNotNull(datasetProperties);\r
-    }\r
-\r
-    @Test\r
-    public void testPersist() throws Exception {\r
-\r
-        TCAAlertsAbatementPersister.persist(eventListener, violatedMetricsPerEventName, tcavesResponse,\r
-                abatementTS, alertsAbatementTable);\r
-        verify(alertsAbatementTable, times(1)).write(anyString(),\r
-                any(TCAAlertsAbatementEntity.class));\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testLookUpByKey() throws Exception {\r
-        TCAAlertsAbatementPersister.lookUpByKey(eventListener, violatedMetricsPerEventName, alertsAbatementTable);\r
-        verify(alertsAbatementTable, times(1)).read(eq(EXPECTED_LOOKUP_KEY));\r
-    }\r
-\r
-    @Test\r
-    public void testCreateKey() throws Exception {\r
-        final String createdKey = TCAAlertsAbatementPersister.createKey(eventListener, violatedMetricsPerEventName);\r
-        assertEquals(createdKey, EXPECTED_LOOKUP_KEY);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+import org.onap.dcae.apod.analytics.common.utils.PersistenceUtils;
+import org.onap.dcae.apod.analytics.model.domain.cef.CommonEventHeader;
+import org.onap.dcae.apod.analytics.model.domain.cef.Event;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 9/13/2017.
+ */
+public class TCAAlertsAbatementPersisterTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    private static final String EVENT_NAME = "testEventName";
+    private static final String SOURCE_NAME = "testSourceName";
+    private static final String REPORTING_ENTITY_NAME = "testReportingEntityName";
+    private static final String THRESHOLD_CLOSED_LOOP_CONTROL_NAME = "testControlLoopName";
+    private static final String THRESHOLD_FIELD_PATH = "testFieldPath";
+    private static final String EXPECTED_LOOKUP_KEY = Joiner.on(PersistenceUtils.ROW_KEY_DELIMITER).join(
+            ImmutableList.of(EVENT_NAME, SOURCE_NAME, REPORTING_ENTITY_NAME,
+                    THRESHOLD_CLOSED_LOOP_CONTROL_NAME, THRESHOLD_FIELD_PATH));
+
+    private ObjectMappedTable<TCAAlertsAbatementEntity> alertsAbatementTable;
+    private EventListener eventListener;
+    private MetricsPerEventName violatedMetricsPerEventName;
+    private TCAVESResponse tcavesResponse;
+    private String abatementTS;
+    private Event event;
+    private CommonEventHeader commonEventHeader;
+    private Threshold violatedThreshold;
+
+    @Before
+    public void before() throws Exception {
+        alertsAbatementTable = mock(ObjectMappedTable.class);
+        eventListener = mock(EventListener.class);
+        event = mock(Event.class);
+        commonEventHeader = mock(CommonEventHeader.class);
+
+        when(eventListener.getEvent()).thenReturn(event);
+        when(event.getCommonEventHeader()).thenReturn(commonEventHeader);
+        when(commonEventHeader.getEventName()).thenReturn(EVENT_NAME);
+        when(commonEventHeader.getSourceName()).thenReturn(SOURCE_NAME);
+        when(commonEventHeader.getReportingEntityName()).thenReturn(REPORTING_ENTITY_NAME);
+
+        violatedMetricsPerEventName = mock(MetricsPerEventName.class);
+        when(violatedMetricsPerEventName.getEventName()).thenReturn(EVENT_NAME);
+        violatedThreshold = mock(Threshold.class);
+        when(violatedMetricsPerEventName.getThresholds()).thenReturn(ImmutableList.of(violatedThreshold));
+        when(violatedThreshold.getClosedLoopControlName()).thenReturn(THRESHOLD_CLOSED_LOOP_CONTROL_NAME);
+        when(violatedThreshold.getFieldPath()).thenReturn(THRESHOLD_FIELD_PATH);
+        tcavesResponse = mock(TCAVESResponse.class);
+        abatementTS = "1234";
+    }
+
+    @Test
+    public void testGetDatasetProperties() throws Exception {
+        final DatasetProperties datasetProperties = TCAAlertsAbatementPersister.getDatasetProperties(20000);
+        assertNotNull(datasetProperties);
+    }
+
+    @Test
+    public void testPersist() throws Exception {
+
+        TCAAlertsAbatementPersister.persist(eventListener, violatedMetricsPerEventName, tcavesResponse,
+                abatementTS, alertsAbatementTable);
+        verify(alertsAbatementTable, times(1)).write(anyString(),
+                any(TCAAlertsAbatementEntity.class));
+
+    }
+
+    @Test
+    public void testLookUpByKey() throws Exception {
+        TCAAlertsAbatementPersister.lookUpByKey(eventListener, violatedMetricsPerEventName, alertsAbatementTable);
+        verify(alertsAbatementTable, times(1)).read(eq(EXPECTED_LOOKUP_KEY));
+    }
+
+    @Test
+    public void testCreateKey() throws Exception {
+        final String createdKey = TCAAlertsAbatementPersister.createKey(eventListener, violatedMetricsPerEventName);
+        assertEquals(createdKey, EXPECTED_LOOKUP_KEY);
+
+    }
+
+}
@@ -1,38 +1,38 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/16/2017.\r
- */\r
-public class TCACalculatorMessageTypeTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    @Test\r
-    public void testCalculatorMessageType() throws Exception {\r
-        assertThat("There must be 3 calculator message type", TCACalculatorMessageType.values().length, is(3));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/16/2017.
+ */
+public class TCACalculatorMessageTypeTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    @Test
+    public void testCalculatorMessageType() throws Exception {
+        assertThat("There must be 3 calculator message type", TCACalculatorMessageType.values().length, is(3));
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.CommonEventHeader;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Event;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/16/2017.\r
- */\r
-public class TCAMessageStatusPersisterTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    private static final int TEST_INSTANCE_ID = 0;\r
-    private static final Domain TEST_DOMAIN = Domain.other;\r
-    private static final String TEST_EVENT_NAME = "TEST_EVENT_NAME";\r
-\r
-    private ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable;\r
-    private TCACEFProcessorContext processorContext;\r
-    private EventListener eventListener;\r
-    private Event event;\r
-    private CommonEventHeader commonEventHeader;\r
-\r
-\r
-    @Before\r
-    @SuppressWarnings("unchecked")\r
-    public void before() {\r
-        vesMessageStatusTable = mock(ObjectMappedTable.class);\r
-        processorContext = mock(TCACEFProcessorContext.class);\r
-        eventListener = mock(EventListener.class);\r
-        event = mock(Event.class);\r
-        commonEventHeader = mock(CommonEventHeader.class);\r
-        when(processorContext.getMessage()).thenReturn("testMessage");\r
-        when(processorContext.getCEFEventListener()).thenReturn(eventListener);\r
-        when(eventListener.getEvent()).thenReturn(event);\r
-        when(event.getCommonEventHeader()).thenReturn(commonEventHeader);\r
-        when(commonEventHeader.getEventName()).thenReturn(TEST_EVENT_NAME);\r
-        when(commonEventHeader.getDomain()).thenReturn(TEST_DOMAIN);\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testPersistWithInApplicableMessage() throws Exception {\r
-        TCAMessageStatusPersister.persist\r
-                (processorContext, TEST_INSTANCE_ID, TCACalculatorMessageType.INAPPLICABLE, vesMessageStatusTable);\r
-        verify(vesMessageStatusTable, times(1)).write(anyString(),\r
-                any(TCAMessageStatusEntity.class));\r
-    }\r
-\r
-    @Test\r
-    public void testPersistWithNonCompliantMessage() throws Exception {\r
-        final MetricsPerEventName metricsPerEventName = mock(MetricsPerEventName.class);\r
-        final Threshold threshold = mock(Threshold.class);\r
-        when(processorContext.getMetricsPerEventName()).thenReturn(metricsPerEventName);\r
-        when((metricsPerEventName.getThresholds())).thenReturn(ImmutableList.of(threshold));\r
-        when(threshold.getDirection()).thenReturn(Direction.GREATER);\r
-        when(threshold.getSeverity()).thenReturn(EventSeverity.CRITICAL);\r
-        TCAMessageStatusPersister.persist(\r
-                processorContext, TEST_INSTANCE_ID, TCACalculatorMessageType.NON_COMPLIANT,\r
-                vesMessageStatusTable, "testAlert");\r
-        verify(vesMessageStatusTable, times(1)).write(anyString(),\r
-                any(TCAMessageStatusEntity.class));\r
-    }\r
-\r
-    @Test\r
-    public void testPersistWithCompliantMessage() throws Exception {\r
-        final String cefMessage = fromStream(CEF_MESSAGE_FILE_LOCATION);\r
-        final String tcaPolicyString = fromStream(TCA_POLICY_FILE_LOCATION);\r
-\r
-        final TCAPolicy tcaPolicy = ANALYTICS_MODEL_OBJECT_MAPPER.readValue(tcaPolicyString, TCAPolicy.class);\r
-        final TCACEFProcessorContext tcacefProcessorContext = TCAUtils.filterCEFMessage(cefMessage, tcaPolicy);\r
-        final TCACEFProcessorContext finalProcessorContext =\r
-                TCAUtils.computeThresholdViolations(tcacefProcessorContext);\r
-\r
-        TCAMessageStatusPersister.persist(finalProcessorContext, TEST_INSTANCE_ID,\r
-                TCACalculatorMessageType.COMPLIANT, vesMessageStatusTable, "testAlert");\r
-        verify(vesMessageStatusTable, times(1)).write(anyString(),\r
-                any(TCAMessageStatusEntity.class));\r
-    }\r
-\r
-    @Test\r
-    public void testGetDatasetProperties() throws Exception {\r
-        final DatasetProperties datasetProperties = TCAMessageStatusPersister.getDatasetProperties(20000);\r
-        Assert.assertNotNull(datasetProperties);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import com.google.common.collect.ImmutableList;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+import org.onap.dcae.apod.analytics.model.domain.cef.CommonEventHeader;
+import org.onap.dcae.apod.analytics.model.domain.cef.Domain;
+import org.onap.dcae.apod.analytics.model.domain.cef.Event;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/16/2017.
+ */
+public class TCAMessageStatusPersisterTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    private static final int TEST_INSTANCE_ID = 0;
+    private static final Domain TEST_DOMAIN = Domain.other;
+    private static final String TEST_EVENT_NAME = "TEST_EVENT_NAME";
+
+    private ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable;
+    private TCACEFProcessorContext processorContext;
+    private EventListener eventListener;
+    private Event event;
+    private CommonEventHeader commonEventHeader;
+
+
+    @Before
+    @SuppressWarnings("unchecked")
+    public void before() {
+        vesMessageStatusTable = mock(ObjectMappedTable.class);
+        processorContext = mock(TCACEFProcessorContext.class);
+        eventListener = mock(EventListener.class);
+        event = mock(Event.class);
+        commonEventHeader = mock(CommonEventHeader.class);
+        when(processorContext.getMessage()).thenReturn("testMessage");
+        when(processorContext.getCEFEventListener()).thenReturn(eventListener);
+        when(eventListener.getEvent()).thenReturn(event);
+        when(event.getCommonEventHeader()).thenReturn(commonEventHeader);
+        when(commonEventHeader.getEventName()).thenReturn(TEST_EVENT_NAME);
+        when(commonEventHeader.getDomain()).thenReturn(TEST_DOMAIN);
+    }
+
+
+    @Test
+    public void testPersistWithInApplicableMessage() throws Exception {
+        TCAMessageStatusPersister.persist
+                (processorContext, TEST_INSTANCE_ID, TCACalculatorMessageType.INAPPLICABLE, vesMessageStatusTable);
+        verify(vesMessageStatusTable, times(1)).write(anyString(),
+                any(TCAMessageStatusEntity.class));
+    }
+
+    @Test
+    public void testPersistWithNonCompliantMessage() throws Exception {
+        final MetricsPerEventName metricsPerEventName = mock(MetricsPerEventName.class);
+        final Threshold threshold = mock(Threshold.class);
+        when(processorContext.getMetricsPerEventName()).thenReturn(metricsPerEventName);
+        when((metricsPerEventName.getThresholds())).thenReturn(ImmutableList.of(threshold));
+        when(threshold.getDirection()).thenReturn(Direction.GREATER);
+        when(threshold.getSeverity()).thenReturn(EventSeverity.CRITICAL);
+        TCAMessageStatusPersister.persist(
+                processorContext, TEST_INSTANCE_ID, TCACalculatorMessageType.NON_COMPLIANT,
+                vesMessageStatusTable, "testAlert");
+        verify(vesMessageStatusTable, times(1)).write(anyString(),
+                any(TCAMessageStatusEntity.class));
+    }
+
+    @Test
+    public void testPersistWithCompliantMessage() throws Exception {
+        final String cefMessage = fromStream(CEF_MESSAGE_FILE_LOCATION);
+        final String tcaPolicyString = fromStream(TCA_POLICY_FILE_LOCATION);
+
+        final TCAPolicy tcaPolicy = ANALYTICS_MODEL_OBJECT_MAPPER.readValue(tcaPolicyString, TCAPolicy.class);
+        final TCACEFProcessorContext tcacefProcessorContext = TCAUtils.filterCEFMessage(cefMessage, tcaPolicy);
+        final TCACEFProcessorContext finalProcessorContext =
+                TCAUtils.computeThresholdViolations(tcacefProcessorContext);
+
+        TCAMessageStatusPersister.persist(finalProcessorContext, TEST_INSTANCE_ID,
+                TCACalculatorMessageType.COMPLIANT, vesMessageStatusTable, "testAlert");
+        verify(vesMessageStatusTable, times(1)).write(anyString(),
+                any(TCAMessageStatusEntity.class));
+    }
+
+    @Test
+    public void testGetDatasetProperties() throws Exception {
+        final DatasetProperties datasetProperties = TCAMessageStatusPersister.getDatasetProperties(20000);
+        Assert.assertNotNull(datasetProperties);
+
+    }
+
+}
@@ -1,63 +1,63 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;\r
-\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-\r
-import java.util.Date;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/16/2017.\r
- */\r
-public class TCAVESAlertsPersisterTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    @Test\r
-    public void testPersist() throws Exception {\r
-        final ObjectMappedTable<TCAVESAlertEntity> tcaVESAlertTable = Mockito.mock(ObjectMappedTable.class);\r
-        TCAVESAlertsPersister.persist("test alert message", tcaVESAlertTable);\r
-        verify(tcaVESAlertTable, times(1)).write(anyString(),\r
-                any(TCAVESAlertEntity.class));\r
-    }\r
-\r
-    @Test\r
-    public void testGetDatasetProperties() throws Exception {\r
-        final DatasetProperties datasetProperties = TCAVESAlertsPersister.getDatasetProperties(20000);\r
-        Assert.assertNotNull(datasetProperties);\r
-    }\r
-\r
-    @Test\r
-    public void testCreateRowKey() throws Exception {\r
-        final String rowKey = TCAVESAlertsPersister.createRowKey(new Date());\r
-        Assert.assertThat(rowKey.toCharArray().length, is(25));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.persistance.tca;
+
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+
+import java.util.Date;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/16/2017.
+ */
+public class TCAVESAlertsPersisterTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    @Test
+    public void testPersist() throws Exception {
+        final ObjectMappedTable<TCAVESAlertEntity> tcaVESAlertTable = Mockito.mock(ObjectMappedTable.class);
+        TCAVESAlertsPersister.persist("test alert message", tcaVESAlertTable);
+        verify(tcaVESAlertTable, times(1)).write(anyString(),
+                any(TCAVESAlertEntity.class));
+    }
+
+    @Test
+    public void testGetDatasetProperties() throws Exception {
+        final DatasetProperties datasetProperties = TCAVESAlertsPersister.getDatasetProperties(20000);
+        Assert.assertNotNull(datasetProperties);
+    }
+
+    @Test
+    public void testCreateRowKey() throws Exception {
+        final String rowKey = TCAVESAlertsPersister.createRowKey(new Date());
+        Assert.assertThat(rowKey.toCharArray().length, is(25));
+    }
+
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.settings;\r
-\r
-import org.hamcrest.CoreMatchers;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class CDAPBaseAppConfigTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    private CDAPBaseAppConfigImp cdapBaseAppConfigImp = null;\r
-\r
-    @Before\r
-    public void before() {\r
-        cdapBaseAppConfigImp = new CDAPBaseAppConfigImp();\r
-    }\r
-\r
-    @Test\r
-    public void testGetAppName() throws Exception {\r
-        assertThat("Common Default Name must match",\r
-                cdapBaseAppConfigImp.getAppName(),\r
-                CoreMatchers.is(CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_NAME_APP));\r
-    }\r
-\r
-    @Test\r
-    public void testGetAppDescription() throws Exception {\r
-        assertThat("Default App Description must match",\r
-                cdapBaseAppConfigImp.getAppDescription(),\r
-                is(CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.settings;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class CDAPBaseAppConfigTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    private CDAPBaseAppConfigImp cdapBaseAppConfigImp = null;
+
+    @Before
+    public void before() {
+        cdapBaseAppConfigImp = new CDAPBaseAppConfigImp();
+    }
+
+    @Test
+    public void testGetAppName() throws Exception {
+        assertThat("Common Default Name must match",
+                cdapBaseAppConfigImp.getAppName(),
+                CoreMatchers.is(CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_NAME_APP));
+    }
+
+    @Test
+    public void testGetAppDescription() throws Exception {
+        assertThat("Default App Description must match",
+                cdapBaseAppConfigImp.getAppDescription(),
+                is(CDAPComponentsConstants.COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP));
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.utils;\r
-\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.ArgumentMatchers;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-\r
-import java.util.Collections;\r
-\r
-import static org.mockito.ArgumentMatchers.anyInt;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/6/2017.\r
- */\r
-public class DMaaPMRUtilsTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    private DMaaPMRSubscriber subscriber;\r
-    private Metrics metrics;\r
-\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        metrics = mock(Metrics.class);\r
-        doNothing().when(metrics).count(anyString(), anyInt());\r
-        subscriber = mock(DMaaPMRSubscriber.class);\r
-    }\r
-\r
-    @Test\r
-    public void testGetSubscriberMessagesWhenMessagesAreFound() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(200);\r
-        when(subscriberResponse.getResponseMessage()).thenReturn("testMessage");\r
-        when(subscriberResponse.getFetchedMessages()).thenReturn(ImmutableList.of("testMessage1", "testMessage1"));\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-        verify(metrics, Mockito.times(1)).count(ArgumentMatchers.eq(CDAPMetricsConstants\r
-                .DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC), eq(2));\r
-    }\r
-\r
-    @Test\r
-    public void testSubscriberMessagesWhenSubscriberResponseCodeIsNull() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(null);\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-    }\r
-\r
-    @Test\r
-    public void testSubscriberMessagesWhenNoMessagesFound() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(200);\r
-        when(subscriberResponse.getResponseMessage()).thenReturn("no messages");\r
-        when(subscriberResponse.getFetchedMessages()).thenReturn(Collections.<String>emptyList());\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants\r
-                .DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC), eq(1));\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testWhenSubscriberReturnNonSuccessfulReturnCode() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(500);\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants\r
-                .DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC), eq(1));\r
-    }\r
-\r
-    @Test\r
-    public void testWhenSubscriberThrowsException() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(500);\r
-        when(subscriber.fetchMessages()).thenThrow(DCAEAnalyticsRuntimeException.class);\r
-        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.utils;
+
+import co.cask.cdap.api.metrics.Metrics;
+import com.google.common.collect.ImmutableList;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentMatchers;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+
+import java.util.Collections;
+
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/6/2017.
+ */
+public class DMaaPMRUtilsTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    private DMaaPMRSubscriber subscriber;
+    private Metrics metrics;
+
+
+    @Before
+    public void before() throws Exception {
+        metrics = mock(Metrics.class);
+        doNothing().when(metrics).count(anyString(), anyInt());
+        subscriber = mock(DMaaPMRSubscriber.class);
+    }
+
+    @Test
+    public void testGetSubscriberMessagesWhenMessagesAreFound() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(200);
+        when(subscriberResponse.getResponseMessage()).thenReturn("testMessage");
+        when(subscriberResponse.getFetchedMessages()).thenReturn(ImmutableList.of("testMessage1", "testMessage1"));
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+        verify(metrics, Mockito.times(1)).count(ArgumentMatchers.eq(CDAPMetricsConstants
+                .DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC), eq(2));
+    }
+
+    @Test
+    public void testSubscriberMessagesWhenSubscriberResponseCodeIsNull() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(null);
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+    }
+
+    @Test
+    public void testSubscriberMessagesWhenNoMessagesFound() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(200);
+        when(subscriberResponse.getResponseMessage()).thenReturn("no messages");
+        when(subscriberResponse.getFetchedMessages()).thenReturn(Collections.<String>emptyList());
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants
+                .DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC), eq(1));
+    }
+
+
+    @Test
+    public void testWhenSubscriberReturnNonSuccessfulReturnCode() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(500);
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants
+                .DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC), eq(1));
+    }
+
+    @Test
+    public void testWhenSubscriberThrowsException() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(500);
+        when(subscriber.fetchMessages()).thenThrow(DCAEAnalyticsRuntimeException.class);
+        DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+    }
+
+}
@@ -1,80 +1,80 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.common.utils;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class ValidationUtilsTest extends BaseAnalyticsCDAPCommonUnitTest {\r
-\r
-    @Test\r
-    public void testIsEmptyWhenStringIsNull() throws Exception {\r
-        assertTrue(ValidationUtils.isEmpty(null));\r
-    }\r
-\r
-    @Test\r
-    public void testIsEmptyWhenStringIsEmpty() throws Exception {\r
-        String emptyString = "";\r
-        assertTrue(ValidationUtils.isEmpty(emptyString));\r
-    }\r
-\r
-    @Test\r
-    public void testIsEmptyWhenStringIsEmptyWithBlanks() throws Exception {\r
-        String blankString = "   ";\r
-        assertTrue(ValidationUtils.isEmpty(blankString));\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testIsNotPresent() throws Exception {\r
-        assertFalse(ValidationUtils.isPresent(null));\r
-        String emptyString = "";\r
-        assertFalse(ValidationUtils.isPresent(emptyString));\r
-        String blankString = "   ";\r
-        assertFalse(ValidationUtils.isPresent(blankString));\r
-        String validString = "SomeValue";\r
-        assertTrue(ValidationUtils.isPresent(validString));\r
-    }\r
-\r
-    @Test\r
-    public void testValidateSettingsWhenValidationPasses() throws Exception {\r
-        CDAPTestAppSettings cdapTestAppSettings = new CDAPTestAppSettings();\r
-        cdapTestAppSettings.setSettingsField("testValue");\r
-        ValidationUtils.validateSettings(cdapTestAppSettings, new CDAPTestAppSettingsValidator());\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testValidateSettingsWhenValidationFails() throws Exception {\r
-\r
-        CDAPTestAppSettings cdapTestAppSettings = new CDAPTestAppSettings();\r
-        cdapTestAppSettings.setSettingsField("");\r
-        ValidationUtils.validateSettings(cdapTestAppSettings, new CDAPTestAppSettingsValidator());\r
-    }\r
-\r
-}\r
-\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.common.utils;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.BaseAnalyticsCDAPCommonUnitTest;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class ValidationUtilsTest extends BaseAnalyticsCDAPCommonUnitTest {
+
+    @Test
+    public void testIsEmptyWhenStringIsNull() throws Exception {
+        assertTrue(ValidationUtils.isEmpty(null));
+    }
+
+    @Test
+    public void testIsEmptyWhenStringIsEmpty() throws Exception {
+        String emptyString = "";
+        assertTrue(ValidationUtils.isEmpty(emptyString));
+    }
+
+    @Test
+    public void testIsEmptyWhenStringIsEmptyWithBlanks() throws Exception {
+        String blankString = "   ";
+        assertTrue(ValidationUtils.isEmpty(blankString));
+    }
+
+
+    @Test
+    public void testIsNotPresent() throws Exception {
+        assertFalse(ValidationUtils.isPresent(null));
+        String emptyString = "";
+        assertFalse(ValidationUtils.isPresent(emptyString));
+        String blankString = "   ";
+        assertFalse(ValidationUtils.isPresent(blankString));
+        String validString = "SomeValue";
+        assertTrue(ValidationUtils.isPresent(validString));
+    }
+
+    @Test
+    public void testValidateSettingsWhenValidationPasses() throws Exception {
+        CDAPTestAppSettings cdapTestAppSettings = new CDAPTestAppSettings();
+        cdapTestAppSettings.setSettingsField("testValue");
+        ValidationUtils.validateSettings(cdapTestAppSettings, new CDAPTestAppSettingsValidator());
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testValidateSettingsWhenValidationFails() throws Exception {
+
+        CDAPTestAppSettings cdapTestAppSettings = new CDAPTestAppSettings();
+        cdapTestAppSettings.setSettingsField("");
+        ValidationUtils.validateSettings(cdapTestAppSettings, new CDAPTestAppSettingsValidator());
+    }
+
+}
+
index 9e40f24..fb02c74 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration>\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration>
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index b936d8c..76b119b 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-cdap-plugins</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS CDAP CODE FOR PLUGINS -->\r
-    <name>DCAE Analytics CDAP Plugins</name>\r
-    <description>DCAE Analytics CDAP Plugins to build CDAP Pipelines</description>\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-        <main.basedir.plugins>${project.basedir}</main.basedir.plugins>\r
-        <widgets.dir>widgets</widgets.dir>\r
-        <docs.dir>docs</docs.dir>\r
-        <app.parents>\r
-            system:cdap-etl-batch[4.0.0,4.2.0-SNAPSHOT),system:cdap-etl-realtime[4.0.0,4.2.0-SNAPSHOT),system:cdap-data-pipeline[4.0.0,4.2.0-SNAPSHOT),system:cdap-data-streams[4.0.0,4.2.0-SNAPSHOT)\r
-        </app.parents>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- DCAE DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-cdap-common</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-tca</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-\r
-        <!-- CDAP -->\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-etl-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-etl-api-spark</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-etl-realtime</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-data-pipeline</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-data-streams</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.apache.spark</groupId>\r
-            <artifactId>spark-streaming_2.10</artifactId>\r
-        </dependency>\r
-\r
-        <!-- CASK -->\r
-        <dependency>\r
-            <groupId>co.cask.http</groupId>\r
-            <artifactId>netty-http</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>co.cask.common</groupId>\r
-            <artifactId>common-http</artifactId>\r
-        </dependency>\r
-\r
-        <!-- HADOOP -->\r
-        <dependency>\r
-            <groupId>org.apache.hadoop</groupId>\r
-            <artifactId>hadoop-mapreduce-client-core</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.apache.hadoop</groupId>\r
-            <artifactId>hadoop-common</artifactId>\r
-        </dependency>\r
-\r
-        <!-- SPARK -->\r
-        <dependency>\r
-            <groupId>org.apache.spark</groupId>\r
-            <artifactId>spark-core_2.10</artifactId>\r
-        </dependency>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <!-- FIND BUGS -->\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-            <version>${findbugs.jsr305.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-            <version>${findbugs.annotations.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>hydrator-test</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-unit-test</artifactId>\r
-            <exclusions>\r
-                <exclusion>\r
-                    <artifactId>org.apache.httpcomponents</artifactId>\r
-                    <groupId>httpcore</groupId>\r
-                </exclusion>\r
-            </exclusions>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-\r
-\r
-    <build>\r
-        <plugins>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.felix</groupId>\r
-                <artifactId>maven-bundle-plugin</artifactId>\r
-                <configuration>\r
-                    <instructions>\r
-                        <!-- List of packages that are scanned for plugins -->\r
-                        <_exportcontents>\r
-                            org.openecomp.dcae.apod.analytics.dmaap.domain.response.*,\r
-                            org.openecomp.dcae.apod.analytics.dmaap.domain.config.*;\r
-                            org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.*;\r
-                            org.openecomp.dcae.apod.analytics.dmaap.service.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.common.settings.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.common.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.sparkcompute.tca.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap.*;\r
-                            org.openecomp.dcae.apod.analytics.cdap.plugins.transform.filter.*;\r
-                            com.google.common.base.*;\r
-                            com.google.inject.*;\r
-                            org.apache.http.*;\r
-                            org.aopalliance.*;\r
-                            javax.inject.*;\r
-                            org.apache.commons.*\r
-                        </_exportcontents>\r
-                    </instructions>\r
-                </configuration>\r
-            </plugin>\r
-\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-antrun-plugin</artifactId>\r
-                <executions>\r
-                    <!-- Create the config file for artifact which can be used to deploy the artifact.\r
-                         Sets the parents field to system:cdap-etl-batch and system:cdap-etl-realtime with whatever\r
-                         version range is set in the app.parents property.\r
-                         also sets a widget and doc property for each file contained in the widgets and docs directories. -->\r
-                    <execution>\r
-                        <id>create-artifact-config</id>\r
-                        <phase>prepare-package</phase>\r
-                        <configuration>\r
-                            <target>\r
-                                <script language="javascript"> <![CDATA[\r
-                  // for some reason, project.basedir evaluates to null if we just get the property here.\r
-                  // so we set main.basedir to project.basedir in the pom properties, then main.basedir is used here\r
-                  // where it evaluates correctly for whatever reason\r
-                  var baseDir = project.getProperty("main.basedir.plugins");\r
-                  var targetDir = project.getProperty("project.build.directory");\r
-                  var artifactId = project.getProperty("project.artifactId");\r
-                  var version = project.getProperty("project.version");\r
-\r
-                  var cfgFile = new java.io.File(targetDir, artifactId + "-" + version + ".json");\r
-                  if (!cfgFile.exists()) {\r
-                    cfgFile.createNewFile();\r
-                  }\r
-\r
-                  var parents = project.getProperty("app.parents").split(",");\r
-                  var config = {\r
-                    "parents": [ ],\r
-                    "properties": {}\r
-                  }\r
-                  for (i = 0; i < parents.length; i+=2) {\r
-                    // because name1[lo,hi],name2[lo,hi] gets split into "name1[lo", "hi]", "name2[lo", "hi]"\r
-                    // so we have to combine them again\r
-                    config.parents.push(parents[i] + "," + parents[i+1]);\r
-                  }\r
-\r
-                  // look in widgets directory for widget config for each plugin\r
-                  var widgetsDir = new java.io.File(baseDir, project.getProperty("widgets.dir"));\r
-                  if (widgetsDir.isDirectory()) {\r
-                    var widgetsFiles = widgetsDir.listFiles();\r
-                    for (i = 0; i < widgetsFiles.length; i++) {\r
-                      var widgetsFile = widgetsFiles[i];\r
-                      if (widgetsFile.isFile()) {\r
-                        var propertyName = "widgets." + widgetsFile.getName();\r
-                        // if the filename ends with .json\r
-                        if (propertyName.indexOf(".json", propertyName.length - 5) !== -1) {\r
-                          // strip the .json\r
-                          propertyName = propertyName.slice(0, -5);\r
-                          var contents = new java.lang.String(java.nio.file.Files.readAllBytes(widgetsFile.toPath()), java.nio.charset.StandardCharsets.UTF_8);\r
-                          var contentsAsJson = JSON.parse(contents);\r
-                          config.properties[propertyName] = JSON.stringify(contentsAsJson);\r
-                        }\r
-                      }\r
-                    }\r
-                  }\r
-\r
-                  // look in the docs directory for docs for each plugin\r
-                  var docsDir = new java.io.File(baseDir, project.getProperty("docs.dir"));\r
-                  if (docsDir.isDirectory()) {\r
-                    var docFiles = docsDir.listFiles();\r
-                    for (i = 0; i < docFiles.length; i++) {\r
-                      var docFile = docFiles[i];\r
-                      if (docFile.isFile()) {\r
-                        var propertyName = "doc." + docFile.getName();\r
-                        // if the filename ends with .md\r
-                        if (propertyName.indexOf(".md", propertyName.length - 3) !== -1) {\r
-                          // strip the extension\r
-                          propertyName = propertyName.slice(0, -3);\r
-                          var contents = new java.lang.String(java.nio.file.Files.readAllBytes(docFile.toPath()), java.nio.charset.StandardCharsets.UTF_8);\r
-                          config.properties[propertyName] = contents + "";\r
-                        }\r
-                      }\r
-                    }\r
-                  }\r
-\r
-                  var fw = new java.io.BufferedWriter(new java.io.FileWriter(cfgFile.getAbsoluteFile()));\r
-                  fw.write(JSON.stringify(config, null, 2));\r
-                  fw.close();\r
-                ]]></script>\r
-                            </target>\r
-                        </configuration>\r
-                        <goals>\r
-                            <goal>run</goal>\r
-                        </goals>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-\r
-        </plugins>\r
-    </build>\r
-\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>dcae-analytics</artifactId>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-cdap-plugins</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS CDAP CODE FOR PLUGINS -->
+    <name>DCAE Analytics CDAP Plugins</name>
+    <description>DCAE Analytics CDAP Plugins to build CDAP Pipelines</description>
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+        <main.basedir.plugins>${project.basedir}</main.basedir.plugins>
+        <widgets.dir>widgets</widgets.dir>
+        <docs.dir>docs</docs.dir>
+        <app.parents>
+            system:cdap-etl-batch[4.0.0,4.2.0-SNAPSHOT),system:cdap-etl-realtime[4.0.0,4.2.0-SNAPSHOT),system:cdap-data-pipeline[4.0.0,4.2.0-SNAPSHOT),system:cdap-data-streams[4.0.0,4.2.0-SNAPSHOT)
+        </app.parents>
+    </properties>
+
+    <dependencies>
+
+        <!-- DCAE DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-cdap-common</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-tca</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+
+        <!-- CDAP -->
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-etl-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-etl-api-spark</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-etl-realtime</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-data-pipeline</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-data-streams</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.spark</groupId>
+            <artifactId>spark-streaming_2.10</artifactId>
+        </dependency>
+
+        <!-- CASK -->
+        <dependency>
+            <groupId>co.cask.http</groupId>
+            <artifactId>netty-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>co.cask.common</groupId>
+            <artifactId>common-http</artifactId>
+        </dependency>
+
+        <!-- HADOOP -->
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-mapreduce-client-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+        </dependency>
+
+        <!-- SPARK -->
+        <dependency>
+            <groupId>org.apache.spark</groupId>
+            <artifactId>spark-core_2.10</artifactId>
+        </dependency>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- FIND BUGS -->
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+            <version>${findbugs.jsr305.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+            <version>${findbugs.annotations.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>hydrator-test</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-unit-test</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>org.apache.httpcomponents</artifactId>
+                    <groupId>httpcore</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+    </dependencies>
+
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <!-- List of packages that are scanned for plugins -->
+                        <_exportcontents>
+                            org.onap.dcae.apod.analytics.dmaap.domain.response.*,
+                            org.onap.dcae.apod.analytics.dmaap.domain.config.*;
+                            org.onap.dcae.apod.analytics.dmaap.service.subscriber.*;
+                            org.onap.dcae.apod.analytics.dmaap.service.*;
+                            org.onap.dcae.apod.analytics.cdap.common.settings.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.common.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.sparkcompute.tca.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap.*;
+                            org.onap.dcae.apod.analytics.cdap.plugins.transform.filter.*;
+                            com.google.common.base.*;
+                            com.google.inject.*;
+                            org.apache.http.*;
+                            org.aopalliance.*;
+                            javax.inject.*;
+                            org.apache.commons.*
+                        </_exportcontents>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <!-- Create the config file for artifact which can be used to deploy the artifact.
+                         Sets the parents field to system:cdap-etl-batch and system:cdap-etl-realtime with whatever
+                         version range is set in the app.parents property.
+                         also sets a widget and doc property for each file contained in the widgets and docs directories. -->
+                    <execution>
+                        <id>create-artifact-config</id>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <target>
+                                <script language="javascript"> <![CDATA[
+                  // for some reason, project.basedir evaluates to null if we just get the property here.
+                  // so we set main.basedir to project.basedir in the pom properties, then main.basedir is used here
+                  // where it evaluates correctly for whatever reason
+                  var baseDir = project.getProperty("main.basedir.plugins");
+                  var targetDir = project.getProperty("project.build.directory");
+                  var artifactId = project.getProperty("project.artifactId");
+                  var version = project.getProperty("project.version");
+
+                  var cfgFile = new java.io.File(targetDir, artifactId + "-" + version + ".json");
+                  if (!cfgFile.exists()) {
+                    cfgFile.createNewFile();
+                  }
+
+                  var parents = project.getProperty("app.parents").split(",");
+                  var config = {
+                    "parents": [ ],
+                    "properties": {}
+                  }
+                  for (i = 0; i < parents.length; i+=2) {
+                    // because name1[lo,hi],name2[lo,hi] gets split into "name1[lo", "hi]", "name2[lo", "hi]"
+                    // so we have to combine them again
+                    config.parents.push(parents[i] + "," + parents[i+1]);
+                  }
+
+                  // look in widgets directory for widget config for each plugin
+                  var widgetsDir = new java.io.File(baseDir, project.getProperty("widgets.dir"));
+                  if (widgetsDir.isDirectory()) {
+                    var widgetsFiles = widgetsDir.listFiles();
+                    for (i = 0; i < widgetsFiles.length; i++) {
+                      var widgetsFile = widgetsFiles[i];
+                      if (widgetsFile.isFile()) {
+                        var propertyName = "widgets." + widgetsFile.getName();
+                        // if the filename ends with .json
+                        if (propertyName.indexOf(".json", propertyName.length - 5) !== -1) {
+                          // strip the .json
+                          propertyName = propertyName.slice(0, -5);
+                          var contents = new java.lang.String(java.nio.file.Files.readAllBytes(widgetsFile.toPath()), java.nio.charset.StandardCharsets.UTF_8);
+                          var contentsAsJson = JSON.parse(contents);
+                          config.properties[propertyName] = JSON.stringify(contentsAsJson);
+                        }
+                      }
+                    }
+                  }
+
+                  // look in the docs directory for docs for each plugin
+                  var docsDir = new java.io.File(baseDir, project.getProperty("docs.dir"));
+                  if (docsDir.isDirectory()) {
+                    var docFiles = docsDir.listFiles();
+                    for (i = 0; i < docFiles.length; i++) {
+                      var docFile = docFiles[i];
+                      if (docFile.isFile()) {
+                        var propertyName = "doc." + docFile.getName();
+                        // if the filename ends with .md
+                        if (propertyName.indexOf(".md", propertyName.length - 3) !== -1) {
+                          // strip the extension
+                          propertyName = propertyName.slice(0, -3);
+                          var contents = new java.lang.String(java.nio.file.Files.readAllBytes(docFile.toPath()), java.nio.charset.StandardCharsets.UTF_8);
+                          config.properties[propertyName] = contents + "";
+                        }
+                      }
+                    }
+                  }
+
+                  var fw = new java.io.BufferedWriter(new java.io.FileWriter(cfgFile.getAbsoluteFile()));
+                  fw.write(JSON.stringify(config, null, 2));
+                  fw.close();
+                ]]></script>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+
+</project>
@@ -1,94 +1,94 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import org.apache.hadoop.conf.Configuration;\r
-import org.apache.hadoop.io.NullWritable;\r
-import org.apache.hadoop.mapreduce.JobContext;\r
-import org.apache.hadoop.mapreduce.OutputCommitter;\r
-import org.apache.hadoop.mapreduce.OutputFormat;\r
-import org.apache.hadoop.mapreduce.RecordWriter;\r
-import org.apache.hadoop.mapreduce.TaskAttemptContext;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.DMaaPSinkConfigMapper;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-\r
-import java.io.IOException;\r
-\r
-/**\r
- * DMaaP MR Output format used by DMaaP MR Sink Plugin to create a MR Publisher and pass to custom {@link\r
- * DMaaPMRRecordWriter}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/27/2017.\r
- */\r
-public class DMaaPMROutputFormat extends OutputFormat<String, NullWritable> {\r
-\r
-    @Override\r
-    public RecordWriter<String, NullWritable> getRecordWriter(TaskAttemptContext context) throws IOException,\r
-            InterruptedException {\r
-        final Configuration configuration = context.getConfiguration();\r
-        final DMaaPMRPublisherConfig publisherConfig = DMaaPSinkConfigMapper.map(configuration);\r
-        final DMaaPMRPublisher publisher = DMaaPMRFactory.create().createPublisher(publisherConfig);\r
-        return new DMaaPMRRecordWriter(publisher);\r
-    }\r
-\r
-    @Override\r
-    public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException {\r
-        // do nothing\r
-    }\r
-\r
-    @Override\r
-    public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException {\r
-        return new NoOpOutputCommitter();\r
-    }\r
-\r
-    /**\r
-     * A dummy implementation for {@link OutputCommitter} that does nothing.\r
-     */\r
-    protected static class NoOpOutputCommitter extends OutputCommitter {\r
-\r
-        @Override\r
-        public void setupJob(JobContext jobContext) throws IOException {\r
-            // no op\r
-        }\r
-\r
-        @Override\r
-        public void setupTask(TaskAttemptContext taskContext) throws IOException {\r
-            // no op\r
-        }\r
-\r
-        @Override\r
-        public boolean needsTaskCommit(TaskAttemptContext taskContext) throws IOException {\r
-            return false;\r
-        }\r
-\r
-        @Override\r
-        public void commitTask(TaskAttemptContext taskContext) throws IOException {\r
-            // no op\r
-        }\r
-\r
-        @Override\r
-        public void abortTask(TaskAttemptContext taskContext) throws IOException {\r
-            // no op\r
-        }\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.mapreduce.JobContext;
+import org.apache.hadoop.mapreduce.OutputCommitter;
+import org.apache.hadoop.mapreduce.OutputFormat;
+import org.apache.hadoop.mapreduce.RecordWriter;
+import org.apache.hadoop.mapreduce.TaskAttemptContext;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.DMaaPSinkConfigMapper;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+
+import java.io.IOException;
+
+/**
+ * DMaaP MR Output format used by DMaaP MR Sink Plugin to create a MR Publisher and pass to custom {@link
+ * DMaaPMRRecordWriter}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/27/2017.
+ */
+public class DMaaPMROutputFormat extends OutputFormat<String, NullWritable> {
+
+    @Override
+    public RecordWriter<String, NullWritable> getRecordWriter(TaskAttemptContext context) throws IOException,
+            InterruptedException {
+        final Configuration configuration = context.getConfiguration();
+        final DMaaPMRPublisherConfig publisherConfig = DMaaPSinkConfigMapper.map(configuration);
+        final DMaaPMRPublisher publisher = DMaaPMRFactory.create().createPublisher(publisherConfig);
+        return new DMaaPMRRecordWriter(publisher);
+    }
+
+    @Override
+    public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException {
+        // do nothing
+    }
+
+    @Override
+    public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException {
+        return new NoOpOutputCommitter();
+    }
+
+    /**
+     * A dummy implementation for {@link OutputCommitter} that does nothing.
+     */
+    protected static class NoOpOutputCommitter extends OutputCommitter {
+
+        @Override
+        public void setupJob(JobContext jobContext) throws IOException {
+            // no op
+        }
+
+        @Override
+        public void setupTask(TaskAttemptContext taskContext) throws IOException {
+            // no op
+        }
+
+        @Override
+        public boolean needsTaskCommit(TaskAttemptContext taskContext) throws IOException {
+            return false;
+        }
+
+        @Override
+        public void commitTask(TaskAttemptContext taskContext) throws IOException {
+            // no op
+        }
+
+        @Override
+        public void abortTask(TaskAttemptContext taskContext) throws IOException {
+            // no op
+        }
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import co.cask.cdap.api.data.batch.OutputFormatProvider;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-import java.util.LinkedHashMap;\r
-import java.util.Map;\r
-\r
-/**\r
- * DMaaP MR Output Format Provider used to create Batch Sink Plugin\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/27/2017.\r
- */\r
-public class DMaaPMROutputFormatProvider implements OutputFormatProvider {\r
-\r
-    private final Map<String, String> sinkConfig;\r
-\r
-\r
-    public DMaaPMROutputFormatProvider(DMaaPMRSinkPluginConfig sinkPluginConfig) {\r
-\r
-        // initialize Sink Config - with DMaaP MR Publisher config values\r
-        sinkConfig = new LinkedHashMap<>();\r
-\r
-        // Required fields for sink config\r
-        sinkConfig.put(DMaaPMRSinkHadoopConfigFields.HOST_NAME, sinkPluginConfig.getHostName());\r
-        sinkConfig.put(DMaaPMRSinkHadoopConfigFields.TOPIC_NAME, sinkPluginConfig.getTopicName());\r
-\r
-        final Integer configPortNumber = sinkPluginConfig.getPortNumber();\r
-        if (configPortNumber != null) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER, configPortNumber.toString());\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER,\r
-                    AnalyticsConstants.DEFAULT_PORT_NUMBER.toString());\r
-        }\r
-\r
-        final String configProtocol = sinkPluginConfig.getProtocol();\r
-        if (ValidationUtils.isPresent(configProtocol)) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PROTOCOL, configProtocol);\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PROTOCOL, AnalyticsConstants.DEFAULT_PROTOCOL);\r
-        }\r
-\r
-\r
-        final String configUserName = sinkPluginConfig.getUserName();\r
-        if (ValidationUtils.isPresent(configUserName)) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_NAME, configUserName);\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_NAME, AnalyticsConstants.DEFAULT_USER_NAME);\r
-        }\r
-\r
-        final String configUserPass = sinkPluginConfig.getUserPassword();\r
-        if (ValidationUtils.isPresent(configUserPass)) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_PASS, configUserPass);\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_PASS, AnalyticsConstants.DEFAULT_USER_PASSWORD);\r
-        }\r
-\r
-        final String configContentType = sinkPluginConfig.getContentType();\r
-        if (ValidationUtils.isPresent(configContentType)) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE, configContentType);\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE, AnalyticsConstants.DEFAULT_CONTENT_TYPE);\r
-        }\r
-\r
-\r
-        final Integer configMaxBatchSize = sinkPluginConfig.getMaxBatchSize();\r
-        if (configMaxBatchSize != null) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE, configMaxBatchSize.toString());\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE,\r
-                    String.valueOf(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_BATCH_SIZE));\r
-        }\r
-\r
-        final Integer configMaxRecoveryQueueSize = sinkPluginConfig.getMaxRecoveryQueueSize();\r
-        if (configMaxRecoveryQueueSize != null) {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE, configMaxRecoveryQueueSize.toString());\r
-        } else {\r
-            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE,\r
-                    String.valueOf(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE));\r
-        }\r
-\r
-    }\r
-\r
-    @Override\r
-    public String getOutputFormatClassName() {\r
-        return DMaaPMROutputFormat.class.getName();\r
-    }\r
-\r
-    @Override\r
-    public Map<String, String> getOutputFormatConfiguration() {\r
-        return sinkConfig;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import co.cask.cdap.api.data.batch.OutputFormatProvider;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * DMaaP MR Output Format Provider used to create Batch Sink Plugin
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/27/2017.
+ */
+public class DMaaPMROutputFormatProvider implements OutputFormatProvider {
+
+    private final Map<String, String> sinkConfig;
+
+
+    public DMaaPMROutputFormatProvider(DMaaPMRSinkPluginConfig sinkPluginConfig) {
+
+        // initialize Sink Config - with DMaaP MR Publisher config values
+        sinkConfig = new LinkedHashMap<>();
+
+        // Required fields for sink config
+        sinkConfig.put(DMaaPMRSinkHadoopConfigFields.HOST_NAME, sinkPluginConfig.getHostName());
+        sinkConfig.put(DMaaPMRSinkHadoopConfigFields.TOPIC_NAME, sinkPluginConfig.getTopicName());
+
+        final Integer configPortNumber = sinkPluginConfig.getPortNumber();
+        if (configPortNumber != null) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER, configPortNumber.toString());
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER,
+                    AnalyticsConstants.DEFAULT_PORT_NUMBER.toString());
+        }
+
+        final String configProtocol = sinkPluginConfig.getProtocol();
+        if (ValidationUtils.isPresent(configProtocol)) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PROTOCOL, configProtocol);
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.PROTOCOL, AnalyticsConstants.DEFAULT_PROTOCOL);
+        }
+
+
+        final String configUserName = sinkPluginConfig.getUserName();
+        if (ValidationUtils.isPresent(configUserName)) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_NAME, configUserName);
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_NAME, AnalyticsConstants.DEFAULT_USER_NAME);
+        }
+
+        final String configUserPass = sinkPluginConfig.getUserPassword();
+        if (ValidationUtils.isPresent(configUserPass)) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_PASS, configUserPass);
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.USER_PASS, AnalyticsConstants.DEFAULT_USER_PASSWORD);
+        }
+
+        final String configContentType = sinkPluginConfig.getContentType();
+        if (ValidationUtils.isPresent(configContentType)) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE, configContentType);
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE, AnalyticsConstants.DEFAULT_CONTENT_TYPE);
+        }
+
+
+        final Integer configMaxBatchSize = sinkPluginConfig.getMaxBatchSize();
+        if (configMaxBatchSize != null) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE, configMaxBatchSize.toString());
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE,
+                    String.valueOf(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_BATCH_SIZE));
+        }
+
+        final Integer configMaxRecoveryQueueSize = sinkPluginConfig.getMaxRecoveryQueueSize();
+        if (configMaxRecoveryQueueSize != null) {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE, configMaxRecoveryQueueSize.toString());
+        } else {
+            sinkConfig.put(DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE,
+                    String.valueOf(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE));
+        }
+
+    }
+
+    @Override
+    public String getOutputFormatClassName() {
+        return DMaaPMROutputFormat.class.getName();
+    }
+
+    @Override
+    public Map<String, String> getOutputFormatConfiguration() {
+        return sinkConfig;
+    }
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import org.apache.hadoop.io.NullWritable;\r
-import org.apache.hadoop.mapreduce.RecordWriter;\r
-import org.apache.hadoop.mapreduce.TaskAttemptContext;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.util.Arrays;\r
-\r
-/**\r
- * A simple implementation of {@link RecordWriter} which writes messages to DMaaP MR topic\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/27/2017.\r
- */\r
-public class DMaaPMRRecordWriter extends RecordWriter<String, NullWritable> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRRecordWriter.class);\r
-\r
-    private final DMaaPMRPublisher dMaaPMRPublisher;\r
-\r
-    public DMaaPMRRecordWriter(DMaaPMRPublisher dMaaPMRPublisher) {\r
-        this.dMaaPMRPublisher = dMaaPMRPublisher;\r
-    }\r
-\r
-    @Override\r
-    public void write(String message, NullWritable value) throws IOException, InterruptedException {\r
-        LOG.debug("Writing message to DMaaP MR Topic: {}", message);\r
-        dMaaPMRPublisher.publish(Arrays.asList(message));\r
-    }\r
-\r
-    @Override\r
-    public void close(TaskAttemptContext context) throws IOException, InterruptedException {\r
-        dMaaPMRPublisher.flush();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.mapreduce.RecordWriter;
+import org.apache.hadoop.mapreduce.TaskAttemptContext;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+/**
+ * A simple implementation of {@link RecordWriter} which writes messages to DMaaP MR topic
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/27/2017.
+ */
+public class DMaaPMRRecordWriter extends RecordWriter<String, NullWritable> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRRecordWriter.class);
+
+    private final DMaaPMRPublisher dMaaPMRPublisher;
+
+    public DMaaPMRRecordWriter(DMaaPMRPublisher dMaaPMRPublisher) {
+        this.dMaaPMRPublisher = dMaaPMRPublisher;
+    }
+
+    @Override
+    public void write(String message, NullWritable value) throws IOException, InterruptedException {
+        LOG.debug("Writing message to DMaaP MR Topic: {}", message);
+        dMaaPMRPublisher.publish(Arrays.asList(message));
+    }
+
+    @Override
+    public void close(TaskAttemptContext context) throws IOException, InterruptedException {
+        dMaaPMRPublisher.flush();
+    }
+}
@@ -1,90 +1,90 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Name;\r
-import co.cask.cdap.api.annotation.Plugin;\r
-import co.cask.cdap.api.data.batch.Output;\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.api.dataset.lib.KeyValue;\r
-import co.cask.cdap.etl.api.Emitter;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.batch.BatchSink;\r
-import co.cask.cdap.etl.api.batch.BatchSinkContext;\r
-import org.apache.hadoop.io.NullWritable;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.validator.DMaaPMRSinkPluginConfigValidator;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/26/2017.\r
- */\r
-@Plugin(type = BatchSink.PLUGIN_TYPE)\r
-@Name("DMaaPMRSink")\r
-@Description("A batch sink Plugin that publishes messages to DMaaP MR Topic.")\r
-public class DMaaPMRSink extends BatchSink<StructuredRecord, String, NullWritable> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRSink.class);\r
-\r
-    private final DMaaPMRSinkPluginConfig pluginConfig;\r
-\r
-    public DMaaPMRSink(final DMaaPMRSinkPluginConfig pluginConfig) {\r
-        LOG.debug("Creating DMaaP MR Sink Plugin with plugin Config: {}", pluginConfig);\r
-        this.pluginConfig = pluginConfig;\r
-    }\r
-\r
-    @Override\r
-    public void configurePipeline(final PipelineConfigurer pipelineConfigurer) {\r
-        super.configurePipeline(pipelineConfigurer);\r
-        ValidationUtils.validateSettings(pluginConfig, new DMaaPMRSinkPluginConfigValidator());\r
-        // validates that input schema contains the field provided in Sink Message Column Name property\r
-        final Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema();\r
-        CDAPPluginUtils.validateSchemaContainsFields(inputSchema, pluginConfig.getMessageColumnName());\r
-    }\r
-\r
-\r
-    @Override\r
-    public void prepareRun(BatchSinkContext context) throws Exception {\r
-        context.addOutput(Output.of(pluginConfig.getReferenceName(), new DMaaPMROutputFormatProvider(pluginConfig)));\r
-    }\r
-\r
-    @Override\r
-    public void transform(StructuredRecord structuredRecord,\r
-                          Emitter<KeyValue<String, NullWritable>> emitter) throws Exception {\r
-        // get incoming message from structured record\r
-        final String incomingMessage = structuredRecord.get(pluginConfig.getMessageColumnName());\r
-\r
-        // if incoming messages does not have message column name log warning as it should not happen\r
-        if (incomingMessage == null) {\r
-            LOG.warn("Column Name: {}, contains no message.Skipped for DMaaP MR Publishing....",\r
-                    pluginConfig.getMessageColumnName());\r
-        } else {\r
-\r
-            // emit the messages as key\r
-            emitter.emit(new KeyValue<String, NullWritable>(incomingMessage, null));\r
-        }\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Name;
+import co.cask.cdap.api.annotation.Plugin;
+import co.cask.cdap.api.data.batch.Output;
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.api.dataset.lib.KeyValue;
+import co.cask.cdap.etl.api.Emitter;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.batch.BatchSink;
+import co.cask.cdap.etl.api.batch.BatchSinkContext;
+import org.apache.hadoop.io.NullWritable;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.validator.DMaaPMRSinkPluginConfigValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/26/2017.
+ */
+@Plugin(type = BatchSink.PLUGIN_TYPE)
+@Name("DMaaPMRSink")
+@Description("A batch sink Plugin that publishes messages to DMaaP MR Topic.")
+public class DMaaPMRSink extends BatchSink<StructuredRecord, String, NullWritable> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRSink.class);
+
+    private final DMaaPMRSinkPluginConfig pluginConfig;
+
+    public DMaaPMRSink(final DMaaPMRSinkPluginConfig pluginConfig) {
+        LOG.debug("Creating DMaaP MR Sink Plugin with plugin Config: {}", pluginConfig);
+        this.pluginConfig = pluginConfig;
+    }
+
+    @Override
+    public void configurePipeline(final PipelineConfigurer pipelineConfigurer) {
+        super.configurePipeline(pipelineConfigurer);
+        ValidationUtils.validateSettings(pluginConfig, new DMaaPMRSinkPluginConfigValidator());
+        // validates that input schema contains the field provided in Sink Message Column Name property
+        final Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema();
+        CDAPPluginUtils.validateSchemaContainsFields(inputSchema, pluginConfig.getMessageColumnName());
+    }
+
+
+    @Override
+    public void prepareRun(BatchSinkContext context) throws Exception {
+        context.addOutput(Output.of(pluginConfig.getReferenceName(), new DMaaPMROutputFormatProvider(pluginConfig)));
+    }
+
+    @Override
+    public void transform(StructuredRecord structuredRecord,
+                          Emitter<KeyValue<String, NullWritable>> emitter) throws Exception {
+        // get incoming message from structured record
+        final String incomingMessage = structuredRecord.get(pluginConfig.getMessageColumnName());
+
+        // if incoming messages does not have message column name log warning as it should not happen
+        if (incomingMessage == null) {
+            LOG.warn("Column Name: {}, contains no message.Skipped for DMaaP MR Publishing....",
+                    pluginConfig.getMessageColumnName());
+        } else {
+
+            // emit the messages as key
+            emitter.emit(new KeyValue<String, NullWritable>(incomingMessage, null));
+        }
+    }
+}
@@ -1,37 +1,37 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.common;\r
-\r
-/**\r
- * Contract interface for all DCAE Analytics Plugin Schemas\r
- *\r
- * @author Rajiv Singla . Creation Date: 1/25/2017.\r
- */\r
-public interface PluginSchema {\r
-\r
-    /**\r
-     * Provides column name that will be used in Schema Definition\r
-     *\r
-     * @return Column name that will be used in Schema Definition\r
-     */\r
-    String getSchemaColumnName();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.common;
+
+/**
+ * Contract interface for all DCAE Analytics Plugin Schemas
+ *
+ * @author Rajiv Singla . Creation Date: 1/25/2017.
+ */
+public interface PluginSchema {
+
+    /**
+     * Provides column name that will be used in Schema Definition
+     *
+     * @return Column name that will be used in Schema Definition
+     */
+    String getSchemaColumnName();
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * Base class for all DMaaP MR Configs\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/17/2017.\r
- */\r
-public abstract class BaseDMaaPMRPluginConfig extends CDAPBasePluginConfig {\r
-\r
-    @Description("DMaaP Message Router HostName")\r
-    @Macro\r
-    protected String hostName;\r
-\r
-    @Description("DMaaP Message Router Host Port number. Defaults to Port 80")\r
-    @Nullable\r
-    @Macro\r
-    protected Integer portNumber;\r
-\r
-    @Description("DMaaP Message Router Topic Name")\r
-    @Macro\r
-    protected String topicName;\r
-\r
-    @Description("DMaaP Message Router HTTP Protocol e.g. HTTP or HTTPS. Defaults to HTTPS")\r
-    @Nullable\r
-    @Macro\r
-    protected String protocol;\r
-\r
-    @Description("DMaaP Message Router User Name used for AAF Authentication. Defaults to no authentication")\r
-    @Nullable\r
-    @Macro\r
-    protected String userName;\r
-\r
-    @Description("DMaaP Message Router User Password used for AAF Authentication. Defaults to no authentication")\r
-    @Nullable\r
-    @Macro\r
-    protected String userPassword;\r
-\r
-    @Description("DMaaP Message Router Content Type. Defaults to 'application/json'")\r
-    @Nullable\r
-    @Macro\r
-    protected String contentType;\r
-\r
-\r
-    public BaseDMaaPMRPluginConfig(final String referenceName, final String hostName, final String topicName) {\r
-        this.referenceName = referenceName;\r
-        this.hostName = hostName;\r
-        this.topicName = topicName;\r
-    }\r
-\r
-    /**\r
-     * Host Name for DMaaP MR Publisher or Subscriber\r
-     *\r
-     * @return host name\r
-     */\r
-    public String getHostName() {\r
-        return hostName;\r
-    }\r
-\r
-    /**\r
-     * Port Number for DMaaP MR Publisher or Subscriber\r
-     *\r
-     * @return port number\r
-     */\r
-    @Nullable\r
-    public Integer getPortNumber() {\r
-        return portNumber;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Topic Name for Subscriber or Publisher\r
-     *\r
-     * @return topic name\r
-     */\r
-    public String getTopicName() {\r
-        return topicName;\r
-    }\r
-\r
-\r
-    /**\r
-     * DMaaP MR HTTP or HTTPS protocol\r
-     *\r
-     * @return http or https protocol\r
-     */\r
-    @Nullable\r
-    public String getProtocol() {\r
-        return protocol;\r
-    }\r
-\r
-    /**\r
-     * User name used for DMaaP MR AAF Authentication\r
-     *\r
-     * @return User name for DMaaP MR AAF Authentication\r
-     */\r
-    @Nullable\r
-    public String getUserName() {\r
-        return userName;\r
-    }\r
-\r
-    /**\r
-     * User password used for DMaaP MR AAF Authentication\r
-     *\r
-     * @return User password used for DMaaP MR AAF Authentication\r
-     */\r
-    @Nullable\r
-    public String getUserPassword() {\r
-        return userPassword;\r
-    }\r
-\r
-    /**\r
-     * Content type used for DMaaP MR Topic e.g. 'application/json'\r
-     *\r
-     * @return content type for DMaaP MR Topic\r
-     */\r
-    @Nullable\r
-    public String getContentType() {\r
-        return contentType;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("referenceName", referenceName)\r
-                .add("hostName", hostName)\r
-                .add("portNumber", portNumber)\r
-                .add("topicName", topicName)\r
-                .add("protocol", protocol)\r
-                .add("userName", userName)\r
-                .add("userPassword", "xxxx")\r
-                .add("contentType", contentType)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;
+
+import javax.annotation.Nullable;
+
+/**
+ * Base class for all DMaaP MR Configs
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/17/2017.
+ */
+public abstract class BaseDMaaPMRPluginConfig extends CDAPBasePluginConfig {
+
+    @Description("DMaaP Message Router HostName")
+    @Macro
+    protected String hostName;
+
+    @Description("DMaaP Message Router Host Port number. Defaults to Port 80")
+    @Nullable
+    @Macro
+    protected Integer portNumber;
+
+    @Description("DMaaP Message Router Topic Name")
+    @Macro
+    protected String topicName;
+
+    @Description("DMaaP Message Router HTTP Protocol e.g. HTTP or HTTPS. Defaults to HTTPS")
+    @Nullable
+    @Macro
+    protected String protocol;
+
+    @Description("DMaaP Message Router User Name used for AAF Authentication. Defaults to no authentication")
+    @Nullable
+    @Macro
+    protected String userName;
+
+    @Description("DMaaP Message Router User Password used for AAF Authentication. Defaults to no authentication")
+    @Nullable
+    @Macro
+    protected String userPassword;
+
+    @Description("DMaaP Message Router Content Type. Defaults to 'application/json'")
+    @Nullable
+    @Macro
+    protected String contentType;
+
+
+    public BaseDMaaPMRPluginConfig(final String referenceName, final String hostName, final String topicName) {
+        this.referenceName = referenceName;
+        this.hostName = hostName;
+        this.topicName = topicName;
+    }
+
+    /**
+     * Host Name for DMaaP MR Publisher or Subscriber
+     *
+     * @return host name
+     */
+    public String getHostName() {
+        return hostName;
+    }
+
+    /**
+     * Port Number for DMaaP MR Publisher or Subscriber
+     *
+     * @return port number
+     */
+    @Nullable
+    public Integer getPortNumber() {
+        return portNumber;
+    }
+
+    /**
+     * DMaaP MR Topic Name for Subscriber or Publisher
+     *
+     * @return topic name
+     */
+    public String getTopicName() {
+        return topicName;
+    }
+
+
+    /**
+     * DMaaP MR HTTP or HTTPS protocol
+     *
+     * @return http or https protocol
+     */
+    @Nullable
+    public String getProtocol() {
+        return protocol;
+    }
+
+    /**
+     * User name used for DMaaP MR AAF Authentication
+     *
+     * @return User name for DMaaP MR AAF Authentication
+     */
+    @Nullable
+    public String getUserName() {
+        return userName;
+    }
+
+    /**
+     * User password used for DMaaP MR AAF Authentication
+     *
+     * @return User password used for DMaaP MR AAF Authentication
+     */
+    @Nullable
+    public String getUserPassword() {
+        return userPassword;
+    }
+
+    /**
+     * Content type used for DMaaP MR Topic e.g. 'application/json'
+     *
+     * @return content type for DMaaP MR Topic
+     */
+    @Nullable
+    public String getContentType() {
+        return contentType;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("referenceName", referenceName)
+                .add("hostName", hostName)
+                .add("portNumber", portNumber)
+                .add("topicName", topicName)
+                .add("protocol", protocol)
+                .add("userName", userName)
+                .add("userPassword", "xxxx")
+                .add("contentType", contentType)
+                .toString();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import com.google.common.base.Objects;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * DMaaP MR Publisher Config\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/17/2017.\r
- */\r
-public class DMaaPMRSinkPluginConfig extends BaseDMaaPMRPluginConfig {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Description("Column name of input schema which contains the message that needs to be written to DMaaP MR Topic")\r
-    @Macro\r
-    protected String messageColumnName;\r
-\r
-    @Description("DMaaP MR Publisher Max Batch Size. Defaults to no Batch")\r
-    @Nullable\r
-    @Macro\r
-    protected Integer maxBatchSize;\r
-\r
-    @Description("DMaaP MR Publisher Recovery Queue Size. Default to 1000K messages which can be buffered in memory " +\r
-            "in case DMaaP MR Publisher is temporarily unavailable")\r
-    @Nullable\r
-    @Macro\r
-    protected Integer maxRecoveryQueueSize;\r
-\r
-    // Required No Arg constructor\r
-    public DMaaPMRSinkPluginConfig() {\r
-        this(null, null, null, null);\r
-    }\r
-\r
-    public DMaaPMRSinkPluginConfig(String referenceName, String hostName, String topicName, String messageColumnName) {\r
-        super(referenceName, hostName, topicName);\r
-        this.messageColumnName = messageColumnName;\r
-    }\r
-\r
-    /**\r
-     * Column name of incoming Schema field that contains the message that needs to published to DMaaP MR Topic\r
-     *\r
-     * @return Column name of incoming schema which contains message that needs to published to DMaaP MR Topic\r
-     */\r
-    public String getMessageColumnName() {\r
-        return messageColumnName;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Publisher Max Batch Size.\r
-     *\r
-     * @return DMaaP MR Publisher Max Batch Size\r
-     */\r
-    @Nullable\r
-    public Integer getMaxBatchSize() {\r
-        return maxBatchSize;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Publisher Max Recovery Queue Size\r
-     *\r
-     * @return DMaaP MR Publisher Max Recovery Queue Size\r
-     */\r
-    @Nullable\r
-    public Integer getMaxRecoveryQueueSize() {\r
-        return maxRecoveryQueueSize;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("super", super.toString())\r
-                .add("messageColumnName", messageColumnName)\r
-                .add("maxBatchSize", maxBatchSize)\r
-                .add("maxRecoveryQueueSize", maxRecoveryQueueSize)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import com.google.common.base.Objects;
+
+import javax.annotation.Nullable;
+
+/**
+ * DMaaP MR Publisher Config
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/17/2017.
+ */
+public class DMaaPMRSinkPluginConfig extends BaseDMaaPMRPluginConfig {
+
+    private static final long serialVersionUID = 1L;
+
+    @Description("Column name of input schema which contains the message that needs to be written to DMaaP MR Topic")
+    @Macro
+    protected String messageColumnName;
+
+    @Description("DMaaP MR Publisher Max Batch Size. Defaults to no Batch")
+    @Nullable
+    @Macro
+    protected Integer maxBatchSize;
+
+    @Description("DMaaP MR Publisher Recovery Queue Size. Default to 1000K messages which can be buffered in memory " +
+            "in case DMaaP MR Publisher is temporarily unavailable")
+    @Nullable
+    @Macro
+    protected Integer maxRecoveryQueueSize;
+
+    // Required No Arg constructor
+    public DMaaPMRSinkPluginConfig() {
+        this(null, null, null, null);
+    }
+
+    public DMaaPMRSinkPluginConfig(String referenceName, String hostName, String topicName, String messageColumnName) {
+        super(referenceName, hostName, topicName);
+        this.messageColumnName = messageColumnName;
+    }
+
+    /**
+     * Column name of incoming Schema field that contains the message that needs to published to DMaaP MR Topic
+     *
+     * @return Column name of incoming schema which contains message that needs to published to DMaaP MR Topic
+     */
+    public String getMessageColumnName() {
+        return messageColumnName;
+    }
+
+    /**
+     * DMaaP MR Publisher Max Batch Size.
+     *
+     * @return DMaaP MR Publisher Max Batch Size
+     */
+    @Nullable
+    public Integer getMaxBatchSize() {
+        return maxBatchSize;
+    }
+
+    /**
+     * DMaaP MR Publisher Max Recovery Queue Size
+     *
+     * @return DMaaP MR Publisher Max Recovery Queue Size
+     */
+    @Nullable
+    public Integer getMaxRecoveryQueueSize() {
+        return maxRecoveryQueueSize;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("super", super.toString())
+                .add("messageColumnName", messageColumnName)
+                .add("maxBatchSize", maxBatchSize)
+                .add("maxRecoveryQueueSize", maxRecoveryQueueSize)
+                .toString();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import com.google.common.base.Objects;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * DMaaP MR Subscriber Config\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/17/2017.\r
- */\r
-public class DMaaPMRSourcePluginConfig extends BaseDMaaPMRPluginConfig {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Description("DMaaP MR Polling Interval in MS")\r
-    @Macro\r
-    protected Integer pollingInterval;\r
-\r
-    @Description("DMaaP Message Router Subscriber Consumer ID. Defaults to some randomly created userID")\r
-    @Nullable\r
-    @Macro\r
-    protected String consumerId;\r
-\r
-    @Description("DMaaP Message Router Subscriber Consumer Group. Defaults to some randomly created user Group")\r
-    @Nullable\r
-    @Macro\r
-    protected String consumerGroup;\r
-\r
-    @Description("DMaaP Message Router Subscriber Timeout in MS. Defaults to no timeout")\r
-    @Nullable\r
-    @Macro\r
-    protected Integer timeoutMS;\r
-\r
-    @Description("DMaaP Message Router Subscriber Message Limit. Defaults to no message limit")\r
-    @Nullable\r
-    @Macro\r
-    protected Integer messageLimit;\r
-\r
-    // Required No Arg constructor\r
-    public DMaaPMRSourcePluginConfig() {\r
-        this(null, null, null, 0);\r
-    }\r
-\r
-    public DMaaPMRSourcePluginConfig(String referenceName, String hostName, String topicName, Integer pollingInterval) {\r
-        super(referenceName, hostName, topicName);\r
-        this.pollingInterval = pollingInterval;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Polling interval\r
-     *\r
-     * @return DMaaP MR Subscriber Polling interval\r
-     */\r
-    public Integer getPollingInterval() {\r
-        return pollingInterval;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Consumer ID\r
-     *\r
-     * @return DMaaP MR Subscriber Consumer ID\r
-     */\r
-    @Nullable\r
-    public String getConsumerId() {\r
-        return consumerId;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Consumer Group\r
-     *\r
-     * @return DMaaP MR Subscriber Consumer Group\r
-     */\r
-    @Nullable\r
-    public String getConsumerGroup() {\r
-        return consumerGroup;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Timeout in MS\r
-     *\r
-     * @return DMaaP MR Subscriber Timeout in MS\r
-     */\r
-    @Nullable\r
-    public Integer getTimeoutMS() {\r
-        return timeoutMS;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber message limit\r
-     *\r
-     * @return DMaaP MR Subscriber Message limit\r
-     */\r
-    @Nullable\r
-    public Integer getMessageLimit() {\r
-        return messageLimit;\r
-    }\r
-\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("super", super.toString())\r
-                .add("pollingInterval", pollingInterval)\r
-                .add("consumerId", consumerId)\r
-                .add("consumerGroup", consumerGroup)\r
-                .add("timeoutMS", timeoutMS)\r
-                .add("messageLimit", messageLimit)\r
-                .toString();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import com.google.common.base.Objects;
+
+import javax.annotation.Nullable;
+
+/**
+ * DMaaP MR Subscriber Config
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/17/2017.
+ */
+public class DMaaPMRSourcePluginConfig extends BaseDMaaPMRPluginConfig {
+
+    private static final long serialVersionUID = 1L;
+
+    @Description("DMaaP MR Polling Interval in MS")
+    @Macro
+    protected Integer pollingInterval;
+
+    @Description("DMaaP Message Router Subscriber Consumer ID. Defaults to some randomly created userID")
+    @Nullable
+    @Macro
+    protected String consumerId;
+
+    @Description("DMaaP Message Router Subscriber Consumer Group. Defaults to some randomly created user Group")
+    @Nullable
+    @Macro
+    protected String consumerGroup;
+
+    @Description("DMaaP Message Router Subscriber Timeout in MS. Defaults to no timeout")
+    @Nullable
+    @Macro
+    protected Integer timeoutMS;
+
+    @Description("DMaaP Message Router Subscriber Message Limit. Defaults to no message limit")
+    @Nullable
+    @Macro
+    protected Integer messageLimit;
+
+    // Required No Arg constructor
+    public DMaaPMRSourcePluginConfig() {
+        this(null, null, null, 0);
+    }
+
+    public DMaaPMRSourcePluginConfig(String referenceName, String hostName, String topicName, Integer pollingInterval) {
+        super(referenceName, hostName, topicName);
+        this.pollingInterval = pollingInterval;
+    }
+
+    /**
+     * DMaaP MR Subscriber Polling interval
+     *
+     * @return DMaaP MR Subscriber Polling interval
+     */
+    public Integer getPollingInterval() {
+        return pollingInterval;
+    }
+
+    /**
+     * DMaaP MR Subscriber Consumer ID
+     *
+     * @return DMaaP MR Subscriber Consumer ID
+     */
+    @Nullable
+    public String getConsumerId() {
+        return consumerId;
+    }
+
+    /**
+     * DMaaP MR Subscriber Consumer Group
+     *
+     * @return DMaaP MR Subscriber Consumer Group
+     */
+    @Nullable
+    public String getConsumerGroup() {
+        return consumerGroup;
+    }
+
+    /**
+     * DMaaP MR Subscriber Timeout in MS
+     *
+     * @return DMaaP MR Subscriber Timeout in MS
+     */
+    @Nullable
+    public Integer getTimeoutMS() {
+        return timeoutMS;
+    }
+
+    /**
+     * DMaaP MR Subscriber message limit
+     *
+     * @return DMaaP MR Subscriber Message limit
+     */
+    @Nullable
+    public Integer getMessageLimit() {
+        return messageLimit;
+    }
+
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("super", super.toString())
+                .add("pollingInterval", pollingInterval)
+                .add("consumerId", consumerId)
+                .add("consumerGroup", consumerGroup)
+                .add("timeoutMS", timeoutMS)
+                .add("messageLimit", messageLimit)
+                .toString();
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import co.cask.cdap.api.annotation.Name;\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;\r
-\r
-/**\r
- * Configuration for Json Path Filter Plugin\r
- *\r
- * @author Rajiv Singla . Creation Date: 3/2/2017.\r
- */\r
-public class JsonPathFilterPluginConfig extends CDAPBasePluginConfig {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Name("incomingJsonFieldName")\r
-    @Description("Input schema field name that contain JSON used for filtering")\r
-    @Macro\r
-    protected String incomingJsonFieldName;\r
-\r
-\r
-    @Name("outputSchemaFieldName")\r
-    @Description("Name of the nullable boolean schema field name that will contain result of the filter matching")\r
-    @Macro\r
-    protected String outputSchemaFieldName;\r
-\r
-\r
-    @Name("jsonFilterMappings")\r
-    @Macro\r
-    @Description("Filters incoming JSON based on given filter mappings - in terms of JSON path and expected values." +\r
-            "Right hand side contains JSON path. Left hand side contains semicolon (';') separated expected values " +\r
-            "for that JSON Path. If all provided JSON Path mappings and corresponding values matches - " +\r
-            "output schema field will be marked as true")\r
-    protected String jsonFilterMappings;\r
-\r
-\r
-    @Name("schema")\r
-    @Description("Output Schema")\r
-    protected String schema;\r
-\r
-\r
-    public JsonPathFilterPluginConfig(final String referenceName, final String incomingJsonFieldName,\r
-                                      final String outputSchemaFieldName, final String jsonFilterMappings,\r
-                                      final String schema) {\r
-        this.referenceName = referenceName;\r
-        this.incomingJsonFieldName = incomingJsonFieldName;\r
-        this.outputSchemaFieldName = outputSchemaFieldName;\r
-        this.jsonFilterMappings = jsonFilterMappings;\r
-        this.schema = schema;\r
-    }\r
-\r
-    /**\r
-     * Provides incoming plugin schema field name which contains json used to apply filter\r
-     *\r
-     * @return  name of incoming schema field containing JSON to be filtered\r
-     */\r
-    public String getIncomingJsonFieldName() {\r
-        return incomingJsonFieldName;\r
-    }\r
-\r
-    /**\r
-     * Provides plugin output schema filed name that will contain result of filter application\r
-     * It must be nullable and boolean type\r
-     *\r
-     * @return name of outgoing schema filed name that will contain filtering result\r
-     */\r
-    public String getOutputSchemaFieldName() {\r
-        return outputSchemaFieldName;\r
-    }\r
-\r
-    /**\r
-     * Provides JSON filter mappings. LHS contains JSON path value and RHS contains expected\r
-     * values separated by semicolon\r
-     *\r
-     *\r
-     * @return String for JSON filter mappings\r
-     */\r
-    public String getJsonFilterMappings() {\r
-        return jsonFilterMappings;\r
-    }\r
-\r
-    /**\r
-     * Output Schema\r
-     *\r
-     * @return output schema string\r
-     */\r
-    public String getSchema() {\r
-        return schema;\r
-    }\r
-\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("referenceName", referenceName)\r
-                .add("incomingJsonFieldName", incomingJsonFieldName)\r
-                .add("outputSchemaFieldName", outputSchemaFieldName)\r
-                .add("jsonFilterMappings", jsonFilterMappings)\r
-                .add("schema", schema)\r
-                .toString();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import co.cask.cdap.api.annotation.Name;
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;
+
+/**
+ * Configuration for Json Path Filter Plugin
+ *
+ * @author Rajiv Singla . Creation Date: 3/2/2017.
+ */
+public class JsonPathFilterPluginConfig extends CDAPBasePluginConfig {
+
+    private static final long serialVersionUID = 1L;
+
+    @Name("incomingJsonFieldName")
+    @Description("Input schema field name that contain JSON used for filtering")
+    @Macro
+    protected String incomingJsonFieldName;
+
+
+    @Name("outputSchemaFieldName")
+    @Description("Name of the nullable boolean schema field name that will contain result of the filter matching")
+    @Macro
+    protected String outputSchemaFieldName;
+
+
+    @Name("jsonFilterMappings")
+    @Macro
+    @Description("Filters incoming JSON based on given filter mappings - in terms of JSON path and expected values." +
+            "Right hand side contains JSON path. Left hand side contains semicolon (';') separated expected values " +
+            "for that JSON Path. If all provided JSON Path mappings and corresponding values matches - " +
+            "output schema field will be marked as true")
+    protected String jsonFilterMappings;
+
+
+    @Name("schema")
+    @Description("Output Schema")
+    protected String schema;
+
+
+    public JsonPathFilterPluginConfig(final String referenceName, final String incomingJsonFieldName,
+                                      final String outputSchemaFieldName, final String jsonFilterMappings,
+                                      final String schema) {
+        this.referenceName = referenceName;
+        this.incomingJsonFieldName = incomingJsonFieldName;
+        this.outputSchemaFieldName = outputSchemaFieldName;
+        this.jsonFilterMappings = jsonFilterMappings;
+        this.schema = schema;
+    }
+
+    /**
+     * Provides incoming plugin schema field name which contains json used to apply filter
+     *
+     * @return  name of incoming schema field containing JSON to be filtered
+     */
+    public String getIncomingJsonFieldName() {
+        return incomingJsonFieldName;
+    }
+
+    /**
+     * Provides plugin output schema filed name that will contain result of filter application
+     * It must be nullable and boolean type
+     *
+     * @return name of outgoing schema filed name that will contain filtering result
+     */
+    public String getOutputSchemaFieldName() {
+        return outputSchemaFieldName;
+    }
+
+    /**
+     * Provides JSON filter mappings. LHS contains JSON path value and RHS contains expected
+     * values separated by semicolon
+     *
+     *
+     * @return String for JSON filter mappings
+     */
+    public String getJsonFilterMappings() {
+        return jsonFilterMappings;
+    }
+
+    /**
+     * Output Schema
+     *
+     * @return output schema string
+     */
+    public String getSchema() {
+        return schema;
+    }
+
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("referenceName", referenceName)
+                .add("incomingJsonFieldName", incomingJsonFieldName)
+                .add("outputSchemaFieldName", outputSchemaFieldName)
+                .add("jsonFilterMappings", jsonFilterMappings)
+                .add("schema", schema)
+                .toString();
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * Simple TCA Plugin Configuration\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 2/13/2017.\r
- */\r
-public class SimpleTCAPluginConfig extends CDAPBasePluginConfig {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Description("Field name containing VES Message")\r
-    @Macro\r
-    protected String vesMessageFieldName;\r
-\r
-    @Description("Policy JSON that need to be applied to VES Message")\r
-    @Macro\r
-    protected String policyJson;\r
-\r
-    @Description("Name of the output field that will contain the alert")\r
-    @Macro\r
-    protected String alertFieldName;\r
-\r
-    @Description("Name of the output field that will contain message type: INAPPLICABLE, COMPLIANT, NON_COMPLIANT")\r
-    @Macro\r
-    protected String messageTypeFieldName;\r
-\r
-    @Description("Specifies the output schema")\r
-    protected String schema;\r
-\r
-    @Description("Enables")\r
-    @Nullable\r
-    @Macro\r
-    protected Boolean enableAlertCEFFormat;\r
-\r
-\r
-    /**\r
-     * Creates an instance of TCA Plugin Configs\r
-     *\r
-     * @param vesMessageFieldName Ves message field name from incoming plugin schema\r
-     * @param policyJson TCA Policy Json String\r
-     * @param alertFieldName Alert field name that will be added in TCA plugin output schema\r
-     * @param messageTypeFieldName Message type field name that will be added in TCA plugin output schema\r
-     * @param schema TCA Plugin output schema\r
-     * @param enableAlertCEFFormat enables alert message to be formatted in VES format\r
-     */\r
-    public SimpleTCAPluginConfig(final String vesMessageFieldName, final String policyJson,\r
-                                 final String alertFieldName, final String messageTypeFieldName,\r
-                                 final String schema, final Boolean enableAlertCEFFormat) {\r
-        this.vesMessageFieldName = vesMessageFieldName;\r
-        this.policyJson = policyJson;\r
-        this.alertFieldName = alertFieldName;\r
-        this.messageTypeFieldName = messageTypeFieldName;\r
-        this.schema = schema;\r
-        this.enableAlertCEFFormat = enableAlertCEFFormat;\r
-    }\r
-\r
-    /**\r
-     * Name of the field containing VES Message\r
-     *\r
-     * @return VES Message field name\r
-     */\r
-    public String getVesMessageFieldName() {\r
-        return vesMessageFieldName;\r
-    }\r
-\r
-    /**\r
-     * Policy Json String\r
-     *\r
-     * @return Policy Json String\r
-     */\r
-    public String getPolicyJson() {\r
-        return policyJson;\r
-    }\r
-\r
-\r
-    /**\r
-     * Alert Field name in outgoing schema\r
-     *\r
-     * @return alert field name in outgoing schema\r
-     */\r
-    public String getAlertFieldName() {\r
-        return alertFieldName;\r
-    }\r
-\r
-    /**\r
-     * Returns output schema string\r
-     *\r
-     * @return output schema string\r
-     */\r
-    public String getSchema() {\r
-        return schema;\r
-    }\r
-\r
-    /**\r
-     * Return TCA message type - INAPPLICABLE, COMPLIANT, NON_COMPLIANT\r
-     *\r
-     * @return tca message type\r
-     */\r
-    public String getMessageTypeFieldName() {\r
-        return messageTypeFieldName;\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns if Alert output in Common Event format\r
-     *\r
-     * @return true if alert output is in common event format\r
-     */\r
-    @Nullable\r
-    public Boolean getEnableAlertCEFFormat() {\r
-        return enableAlertCEFFormat;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("referenceName", referenceName)\r
-                .add("vesMessageFieldName", vesMessageFieldName)\r
-                .add("policyJson", policyJson)\r
-                .add("alertFieldName", alertFieldName)\r
-                .add("messageTypeFieldName", messageTypeFieldName)\r
-                .add("schema", schema)\r
-                .add("enableAlertCEFFormat", true)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;
+
+import javax.annotation.Nullable;
+
+/**
+ * Simple TCA Plugin Configuration
+ * <p>
+ * @author Rajiv Singla . Creation Date: 2/13/2017.
+ */
+public class SimpleTCAPluginConfig extends CDAPBasePluginConfig {
+
+    private static final long serialVersionUID = 1L;
+
+    @Description("Field name containing VES Message")
+    @Macro
+    protected String vesMessageFieldName;
+
+    @Description("Policy JSON that need to be applied to VES Message")
+    @Macro
+    protected String policyJson;
+
+    @Description("Name of the output field that will contain the alert")
+    @Macro
+    protected String alertFieldName;
+
+    @Description("Name of the output field that will contain message type: INAPPLICABLE, COMPLIANT, NON_COMPLIANT")
+    @Macro
+    protected String messageTypeFieldName;
+
+    @Description("Specifies the output schema")
+    protected String schema;
+
+    @Description("Enables")
+    @Nullable
+    @Macro
+    protected Boolean enableAlertCEFFormat;
+
+
+    /**
+     * Creates an instance of TCA Plugin Configs
+     *
+     * @param vesMessageFieldName Ves message field name from incoming plugin schema
+     * @param policyJson TCA Policy Json String
+     * @param alertFieldName Alert field name that will be added in TCA plugin output schema
+     * @param messageTypeFieldName Message type field name that will be added in TCA plugin output schema
+     * @param schema TCA Plugin output schema
+     * @param enableAlertCEFFormat enables alert message to be formatted in VES format
+     */
+    public SimpleTCAPluginConfig(final String vesMessageFieldName, final String policyJson,
+                                 final String alertFieldName, final String messageTypeFieldName,
+                                 final String schema, final Boolean enableAlertCEFFormat) {
+        this.vesMessageFieldName = vesMessageFieldName;
+        this.policyJson = policyJson;
+        this.alertFieldName = alertFieldName;
+        this.messageTypeFieldName = messageTypeFieldName;
+        this.schema = schema;
+        this.enableAlertCEFFormat = enableAlertCEFFormat;
+    }
+
+    /**
+     * Name of the field containing VES Message
+     *
+     * @return VES Message field name
+     */
+    public String getVesMessageFieldName() {
+        return vesMessageFieldName;
+    }
+
+    /**
+     * Policy Json String
+     *
+     * @return Policy Json String
+     */
+    public String getPolicyJson() {
+        return policyJson;
+    }
+
+
+    /**
+     * Alert Field name in outgoing schema
+     *
+     * @return alert field name in outgoing schema
+     */
+    public String getAlertFieldName() {
+        return alertFieldName;
+    }
+
+    /**
+     * Returns output schema string
+     *
+     * @return output schema string
+     */
+    public String getSchema() {
+        return schema;
+    }
+
+    /**
+     * Return TCA message type - INAPPLICABLE, COMPLIANT, NON_COMPLIANT
+     *
+     * @return tca message type
+     */
+    public String getMessageTypeFieldName() {
+        return messageTypeFieldName;
+    }
+
+
+    /**
+     * Returns if Alert output in Common Event format
+     *
+     * @return true if alert output is in common event format
+     */
+    @Nullable
+    public Boolean getEnableAlertCEFFormat() {
+        return enableAlertCEFFormat;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("referenceName", referenceName)
+                .add("vesMessageFieldName", vesMessageFieldName)
+                .add("policyJson", policyJson)
+                .add("alertFieldName", alertFieldName)
+                .add("messageTypeFieldName", messageTypeFieldName)
+                .add("schema", schema)
+                .add("enableAlertCEFFormat", true)
+                .toString();
+    }
+}
@@ -1,59 +1,59 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.common.PluginSchema;\r
-\r
-/**\r
- * Output Schema for DMaaP MR Source Plugin\r
- *\r
- * @author Rajiv Singla . Creation Date: 1/25/2017.\r
- */\r
-public enum DMaaPSourceOutputSchema implements PluginSchema {\r
-\r
-    TIMESTAMP("ts"),\r
-    RESPONSE_CODE("responseCode"),\r
-    RESPONSE_MESSAGE("responseMessage"),\r
-    FETCHED_MESSAGE("message");\r
-\r
-    private String schemaColumnName;\r
-\r
-    DMaaPSourceOutputSchema(String schemaColumnName) {\r
-        this.schemaColumnName = schemaColumnName;\r
-    }\r
-\r
-    @Override\r
-    public String getSchemaColumnName() {\r
-        return schemaColumnName;\r
-    }\r
-\r
-    public static Schema getSchema() {\r
-        return Schema.recordOf(\r
-                "DMaaPMRSourcePluginResponse",\r
-                Schema.Field.of(TIMESTAMP.getSchemaColumnName(), Schema.of(Schema.Type.LONG)),\r
-                Schema.Field.of(RESPONSE_CODE.getSchemaColumnName(), Schema.of(Schema.Type.INT)),\r
-                Schema.Field.of(RESPONSE_MESSAGE.getSchemaColumnName(), Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of(FETCHED_MESSAGE.getSchemaColumnName(), Schema.of(Schema.Type.STRING))\r
-        );\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap;
+
+import co.cask.cdap.api.data.schema.Schema;
+import org.onap.dcae.apod.analytics.cdap.plugins.common.PluginSchema;
+
+/**
+ * Output Schema for DMaaP MR Source Plugin
+ *
+ * @author Rajiv Singla . Creation Date: 1/25/2017.
+ */
+public enum DMaaPSourceOutputSchema implements PluginSchema {
+
+    TIMESTAMP("ts"),
+    RESPONSE_CODE("responseCode"),
+    RESPONSE_MESSAGE("responseMessage"),
+    FETCHED_MESSAGE("message");
+
+    private String schemaColumnName;
+
+    DMaaPSourceOutputSchema(String schemaColumnName) {
+        this.schemaColumnName = schemaColumnName;
+    }
+
+    @Override
+    public String getSchemaColumnName() {
+        return schemaColumnName;
+    }
+
+    public static Schema getSchema() {
+        return Schema.recordOf(
+                "DMaaPMRSourcePluginResponse",
+                Schema.Field.of(TIMESTAMP.getSchemaColumnName(), Schema.of(Schema.Type.LONG)),
+                Schema.Field.of(RESPONSE_CODE.getSchemaColumnName(), Schema.of(Schema.Type.INT)),
+                Schema.Field.of(RESPONSE_MESSAGE.getSchemaColumnName(), Schema.of(Schema.Type.STRING)),
+                Schema.Field.of(FETCHED_MESSAGE.getSchemaColumnName(), Schema.of(Schema.Type.STRING))
+        );
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.sparkcompute.tca;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Name;\r
-import co.cask.cdap.api.annotation.Plugin;\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.format.StructuredRecord.Builder;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.StageMetrics;\r
-import co.cask.cdap.etl.api.batch.SparkCompute;\r
-import co.cask.cdap.etl.api.batch.SparkExecutionPluginContext;\r
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\r
-import org.apache.spark.api.java.JavaRDD;\r
-import org.apache.spark.api.java.function.Function;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.validator.SimpleTCAPluginConfigValidator;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/13/2017.\r
- */\r
-\r
-@Plugin(type = SparkCompute.PLUGIN_TYPE)\r
-@Name("SimpleTCAPlugin")\r
-@Description("Used to create TCA (Threshold Crossing Alert) based on given Policy")\r
-@SuppressFBWarnings("SE_INNER_CLASS")\r
-public class SimpleTCAPlugin extends SparkCompute<StructuredRecord, StructuredRecord> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleTCAPlugin.class);\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final SimpleTCAPluginConfig pluginConfig;\r
-\r
-    /**\r
-     * Create an instance of Simple TCA Plugin with give Simple TCA Plugin Config\r
-     *\r
-     * @param pluginConfig Simple TCA Plugin Config\r
-     */\r
-    public SimpleTCAPlugin(SimpleTCAPluginConfig pluginConfig) {\r
-        this.pluginConfig = pluginConfig;\r
-        LOG.info("Creating instance of Simple TCA Plugin with plugin config: {}", pluginConfig);\r
-    }\r
-\r
-    @Override\r
-    public void configurePipeline(PipelineConfigurer pipelineConfigurer) {\r
-        super.configurePipeline(pipelineConfigurer);\r
-        ValidationUtils.validateSettings(pluginConfig, new SimpleTCAPluginConfigValidator());\r
-        final Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema();\r
-        CDAPPluginUtils.validateSchemaContainsFields(inputSchema, pluginConfig.getVesMessageFieldName());\r
-        CDAPPluginUtils.setOutputSchema(pipelineConfigurer, pluginConfig.getSchema());\r
-    }\r
-\r
-    @Override\r
-    public JavaRDD<StructuredRecord> transform(final SparkExecutionPluginContext context,\r
-                                               final JavaRDD<StructuredRecord> input) throws Exception {\r
-        final StageMetrics metrics = context.getMetrics();\r
-\r
-        LOG.debug("Invoking Spark Transform for Simple TCA Plugin");\r
-        return input.map(new Function<StructuredRecord, StructuredRecord>() {\r
-\r
-            @Override\r
-            public StructuredRecord call(StructuredRecord inputStructuredRecord) throws Exception {\r
-                TCACalculatorMessageType calculatorMessageType;\r
-                String alertMessage = null;\r
-\r
-                // Get input structured record\r
-                final String cefMessage = inputStructuredRecord.get(pluginConfig.getVesMessageFieldName());\r
-\r
-                // Get TCA Policy\r
-                final TCAPolicy tcaPolicy = CDAPPluginUtils.readValue(pluginConfig.getPolicyJson(), TCAPolicy.class);\r
-\r
-                // create initial processor context\r
-                final TCACEFProcessorContext initialProcessorContext =\r
-                        new TCACEFProcessorContext(cefMessage, tcaPolicy);\r
-\r
-                final TCACEFJsonProcessor jsonProcessor = new TCACEFJsonProcessor();\r
-                final TCACEFProcessorContext jsonProcessorContext =\r
-                        jsonProcessor.processMessage(initialProcessorContext);\r
-\r
-                if (jsonProcessorContext.getCEFEventListener() != null) {\r
-\r
-                    LOG.debug("Json to CEF parsing successful. Parsed object {}",\r
-                            jsonProcessorContext.getCEFEventListener());\r
-\r
-                    // compute violations\r
-                    final TCACEFProcessorContext processorContextWithViolations =\r
-                            TCAUtils.computeThresholdViolations(jsonProcessorContext);\r
-\r
-                    // if violation are found then create alert message\r
-                    if (processorContextWithViolations.canProcessingContinue()) {\r
-\r
-                        alertMessage = TCAUtils.createTCAAlertString(processorContextWithViolations,\r
-                                pluginConfig.getReferenceName(), pluginConfig.getEnableAlertCEFFormat());\r
-                        calculatorMessageType = TCACalculatorMessageType.NON_COMPLIANT;\r
-\r
-                        LOG.debug("VES Threshold Violation Detected.An alert message is be generated: {}",\r
-                                alertMessage);\r
-\r
-                        final MetricsPerEventName metricsPerEventName =\r
-                                processorContextWithViolations.getMetricsPerEventName();\r
-                        if (metricsPerEventName != null\r
-                                && metricsPerEventName.getThresholds() != null\r
-                                && metricsPerEventName.getThresholds().get(0) != null) {\r
-                            final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);\r
-                            LOG.debug("CEF Message: {}, Violated Threshold: {}", cefMessage, violatedThreshold);\r
-                        }\r
-\r
-                        metrics.count(CDAPMetricsConstants.TCA_VES_NON_COMPLIANT_MESSAGES_METRIC, 1);\r
-\r
-                    } else {\r
-                        LOG.debug("No Threshold Violation Detected. No alert will be generated.");\r
-                        calculatorMessageType = TCACalculatorMessageType.COMPLIANT;\r
-                        metrics.count(CDAPMetricsConstants.TCA_VES_COMPLIANT_MESSAGES_METRIC, 1);\r
-                    }\r
-\r
-                } else {\r
-                    LOG.info("Unable to parse provided json message to CEF format. Invalid message: {}", cefMessage);\r
-                    calculatorMessageType = TCACalculatorMessageType.INAPPLICABLE;\r
-                }\r
-\r
-                LOG.debug("Calculator message type: {} for message: {}", calculatorMessageType, cefMessage);\r
-\r
-                final Schema outputSchema = Schema.parseJson(pluginConfig.getSchema());\r
-\r
-                // create new output record builder and copy any input record values to output record builder\r
-                final Builder outputRecordBuilder =\r
-                        CDAPPluginUtils.createOutputStructuredRecordBuilder(outputSchema, inputStructuredRecord);\r
-\r
-                // add alert field\r
-                final Builder outputRecordBuilderWithAlertField =\r
-                        CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(outputRecordBuilder,\r
-                                outputSchema, pluginConfig.getAlertFieldName(), alertMessage);\r
-\r
-                // add message field type\r
-                final Builder outRecordBuilderWithMessageTypeField =\r
-                        CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(outputRecordBuilderWithAlertField,\r
-                                outputSchema, pluginConfig.getMessageTypeFieldName(), calculatorMessageType.toString());\r
-\r
-                return outRecordBuilderWithMessageTypeField.build();\r
-            }\r
-        });\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.sparkcompute.tca;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Name;
+import co.cask.cdap.api.annotation.Plugin;
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.format.StructuredRecord.Builder;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.StageMetrics;
+import co.cask.cdap.etl.api.batch.SparkCompute;
+import co.cask.cdap.etl.api.batch.SparkExecutionPluginContext;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.apache.spark.api.java.JavaRDD;
+import org.apache.spark.api.java.function.Function;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.validator.SimpleTCAPluginConfigValidator;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/13/2017.
+ */
+
+@Plugin(type = SparkCompute.PLUGIN_TYPE)
+@Name("SimpleTCAPlugin")
+@Description("Used to create TCA (Threshold Crossing Alert) based on given Policy")
+@SuppressFBWarnings("SE_INNER_CLASS")
+public class SimpleTCAPlugin extends SparkCompute<StructuredRecord, StructuredRecord> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleTCAPlugin.class);
+    private static final long serialVersionUID = 1L;
+
+    private final SimpleTCAPluginConfig pluginConfig;
+
+    /**
+     * Create an instance of Simple TCA Plugin with give Simple TCA Plugin Config
+     *
+     * @param pluginConfig Simple TCA Plugin Config
+     */
+    public SimpleTCAPlugin(SimpleTCAPluginConfig pluginConfig) {
+        this.pluginConfig = pluginConfig;
+        LOG.info("Creating instance of Simple TCA Plugin with plugin config: {}", pluginConfig);
+    }
+
+    @Override
+    public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
+        super.configurePipeline(pipelineConfigurer);
+        ValidationUtils.validateSettings(pluginConfig, new SimpleTCAPluginConfigValidator());
+        final Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema();
+        CDAPPluginUtils.validateSchemaContainsFields(inputSchema, pluginConfig.getVesMessageFieldName());
+        CDAPPluginUtils.setOutputSchema(pipelineConfigurer, pluginConfig.getSchema());
+    }
+
+    @Override
+    public JavaRDD<StructuredRecord> transform(final SparkExecutionPluginContext context,
+                                               final JavaRDD<StructuredRecord> input) throws Exception {
+        final StageMetrics metrics = context.getMetrics();
+
+        LOG.debug("Invoking Spark Transform for Simple TCA Plugin");
+        return input.map(new Function<StructuredRecord, StructuredRecord>() {
+
+            @Override
+            public StructuredRecord call(StructuredRecord inputStructuredRecord) throws Exception {
+                TCACalculatorMessageType calculatorMessageType;
+                String alertMessage = null;
+
+                // Get input structured record
+                final String cefMessage = inputStructuredRecord.get(pluginConfig.getVesMessageFieldName());
+
+                // Get TCA Policy
+                final TCAPolicy tcaPolicy = CDAPPluginUtils.readValue(pluginConfig.getPolicyJson(), TCAPolicy.class);
+
+                // create initial processor context
+                final TCACEFProcessorContext initialProcessorContext =
+                        new TCACEFProcessorContext(cefMessage, tcaPolicy);
+
+                final TCACEFJsonProcessor jsonProcessor = new TCACEFJsonProcessor();
+                final TCACEFProcessorContext jsonProcessorContext =
+                        jsonProcessor.processMessage(initialProcessorContext);
+
+                if (jsonProcessorContext.getCEFEventListener() != null) {
+
+                    LOG.debug("Json to CEF parsing successful. Parsed object {}",
+                            jsonProcessorContext.getCEFEventListener());
+
+                    // compute violations
+                    final TCACEFProcessorContext processorContextWithViolations =
+                            TCAUtils.computeThresholdViolations(jsonProcessorContext);
+
+                    // if violation are found then create alert message
+                    if (processorContextWithViolations.canProcessingContinue()) {
+
+                        alertMessage = TCAUtils.createTCAAlertString(processorContextWithViolations,
+                                pluginConfig.getReferenceName(), pluginConfig.getEnableAlertCEFFormat());
+                        calculatorMessageType = TCACalculatorMessageType.NON_COMPLIANT;
+
+                        LOG.debug("VES Threshold Violation Detected.An alert message is be generated: {}",
+                                alertMessage);
+
+                        final MetricsPerEventName metricsPerEventName =
+                                processorContextWithViolations.getMetricsPerEventName();
+                        if (metricsPerEventName != null
+                                && metricsPerEventName.getThresholds() != null
+                                && metricsPerEventName.getThresholds().get(0) != null) {
+                            final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);
+                            LOG.debug("CEF Message: {}, Violated Threshold: {}", cefMessage, violatedThreshold);
+                        }
+
+                        metrics.count(CDAPMetricsConstants.TCA_VES_NON_COMPLIANT_MESSAGES_METRIC, 1);
+
+                    } else {
+                        LOG.debug("No Threshold Violation Detected. No alert will be generated.");
+                        calculatorMessageType = TCACalculatorMessageType.COMPLIANT;
+                        metrics.count(CDAPMetricsConstants.TCA_VES_COMPLIANT_MESSAGES_METRIC, 1);
+                    }
+
+                } else {
+                    LOG.info("Unable to parse provided json message to CEF format. Invalid message: {}", cefMessage);
+                    calculatorMessageType = TCACalculatorMessageType.INAPPLICABLE;
+                }
+
+                LOG.debug("Calculator message type: {} for message: {}", calculatorMessageType, cefMessage);
+
+                final Schema outputSchema = Schema.parseJson(pluginConfig.getSchema());
+
+                // create new output record builder and copy any input record values to output record builder
+                final Builder outputRecordBuilder =
+                        CDAPPluginUtils.createOutputStructuredRecordBuilder(outputSchema, inputStructuredRecord);
+
+                // add alert field
+                final Builder outputRecordBuilderWithAlertField =
+                        CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(outputRecordBuilder,
+                                outputSchema, pluginConfig.getAlertFieldName(), alertMessage);
+
+                // add message field type
+                final Builder outRecordBuilderWithMessageTypeField =
+                        CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(outputRecordBuilderWithAlertField,
+                                outputSchema, pluginConfig.getMessageTypeFieldName(), calculatorMessageType.toString());
+
+                return outRecordBuilderWithMessageTypeField.build();
+            }
+        });
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import com.google.common.base.Optional;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.apache.spark.streaming.receiver.Receiver;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.DMaaPMRUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.DMaaPSourceConfigMapper;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.List;\r
-import java.util.concurrent.TimeUnit;\r
-\r
-/**\r
- * DMaaP MR Receiver which calls DMaaP MR Topic and stores structured records\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/19/2017.\r
- */\r
-public class DMaaPMRReceiver extends Receiver<StructuredRecord> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRReceiver.class);\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final DMaaPMRSourcePluginConfig pluginConfig;\r
-    private final transient Metrics metrics;\r
-\r
-    public DMaaPMRReceiver(final StorageLevel storageLevel, final DMaaPMRSourcePluginConfig pluginConfig,\r
-                           final Metrics metrics) {\r
-        super(storageLevel);\r
-        this.pluginConfig = pluginConfig;\r
-        this.metrics = metrics;\r
-        LOG.debug("Created DMaaP MR Receiver instance with plugin Config: {}", pluginConfig);\r
-    }\r
-\r
-    @Override\r
-    public void onStart() {\r
-\r
-        // create DMaaP MR Subscriber\r
-        final DMaaPMRSubscriber subscriber =\r
-                DMaaPMRFactory.create().createSubscriber(DMaaPSourceConfigMapper.map(pluginConfig));\r
-\r
-        // Start a new thread with indefinite loop until receiver is stopped\r
-        new Thread() {\r
-            @Override\r
-            public void run() {\r
-                while (!isStopped()) {\r
-                    storeStructuredRecords(subscriber);\r
-                    try {\r
-                        final Integer pollingInterval = pluginConfig.getPollingInterval();\r
-                        LOG.debug("DMaaP MR Receiver sleeping for polling interval: {}", pollingInterval);\r
-                        TimeUnit.MILLISECONDS.sleep(pollingInterval);\r
-                    } catch (InterruptedException e) {\r
-                        final String errorMessage = String.format(\r
-                                "Interrupted Exception while DMaaP MR Receiver sleeping polling interval: %s", e);\r
-                        throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-                    }\r
-                }\r
-            }\r
-        }.start();\r
-\r
-    }\r
-\r
-    @Override\r
-    public void onStop() {\r
-        LOG.debug("Stopping DMaaP MR Receiver with plugin config: {}", pluginConfig);\r
-    }\r
-\r
-    /**\r
-     * Fetches records from DMaaP MR Subscriber and store them as structured records\r
-     *\r
-     * @param subscriber DMaaP MR Subscriber Instance\r
-     */\r
-    public void storeStructuredRecords(final DMaaPMRSubscriber subscriber) {\r
-\r
-        LOG.debug("DMaaP MR Receiver start fetching messages from DMaaP MR Topic");\r
-\r
-        // Fetch messages from DMaaP MR Topic\r
-        final Optional<List<String>> subscriberMessagesOptional =\r
-                DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-\r
-        // store records\r
-        if (subscriberMessagesOptional.isPresent()) {\r
-            final List<String> messages = subscriberMessagesOptional.get();\r
-            for (final String message : messages) {\r
-                store(CDAPPluginUtils.createDMaaPMRResponseStructuredRecord(message));\r
-            }\r
-            LOG.debug("Stored DMaaP Subscriber messages as Structured Records. Message count {}", messages.size());\r
-        }\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.metrics.Metrics;
+import com.google.common.base.Optional;
+import org.apache.spark.storage.StorageLevel;
+import org.apache.spark.streaming.receiver.Receiver;
+import org.onap.dcae.apod.analytics.cdap.common.utils.DMaaPMRUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.DMaaPSourceConfigMapper;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * DMaaP MR Receiver which calls DMaaP MR Topic and stores structured records
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/19/2017.
+ */
+public class DMaaPMRReceiver extends Receiver<StructuredRecord> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRReceiver.class);
+    private static final long serialVersionUID = 1L;
+
+    private final DMaaPMRSourcePluginConfig pluginConfig;
+    private final transient Metrics metrics;
+
+    public DMaaPMRReceiver(final StorageLevel storageLevel, final DMaaPMRSourcePluginConfig pluginConfig,
+                           final Metrics metrics) {
+        super(storageLevel);
+        this.pluginConfig = pluginConfig;
+        this.metrics = metrics;
+        LOG.debug("Created DMaaP MR Receiver instance with plugin Config: {}", pluginConfig);
+    }
+
+    @Override
+    public void onStart() {
+
+        // create DMaaP MR Subscriber
+        final DMaaPMRSubscriber subscriber =
+                DMaaPMRFactory.create().createSubscriber(DMaaPSourceConfigMapper.map(pluginConfig));
+
+        // Start a new thread with indefinite loop until receiver is stopped
+        new Thread() {
+            @Override
+            public void run() {
+                while (!isStopped()) {
+                    storeStructuredRecords(subscriber);
+                    try {
+                        final Integer pollingInterval = pluginConfig.getPollingInterval();
+                        LOG.debug("DMaaP MR Receiver sleeping for polling interval: {}", pollingInterval);
+                        TimeUnit.MILLISECONDS.sleep(pollingInterval);
+                    } catch (InterruptedException e) {
+                        final String errorMessage = String.format(
+                                "Interrupted Exception while DMaaP MR Receiver sleeping polling interval: %s", e);
+                        throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+                    }
+                }
+            }
+        }.start();
+
+    }
+
+    @Override
+    public void onStop() {
+        LOG.debug("Stopping DMaaP MR Receiver with plugin config: {}", pluginConfig);
+    }
+
+    /**
+     * Fetches records from DMaaP MR Subscriber and store them as structured records
+     *
+     * @param subscriber DMaaP MR Subscriber Instance
+     */
+    public void storeStructuredRecords(final DMaaPMRSubscriber subscriber) {
+
+        LOG.debug("DMaaP MR Receiver start fetching messages from DMaaP MR Topic");
+
+        // Fetch messages from DMaaP MR Topic
+        final Optional<List<String>> subscriberMessagesOptional =
+                DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+
+        // store records
+        if (subscriberMessagesOptional.isPresent()) {
+            final List<String> messages = subscriberMessagesOptional.get();
+            for (final String message : messages) {
+                store(CDAPPluginUtils.createDMaaPMRResponseStructuredRecord(message));
+            }
+            LOG.debug("Stored DMaaP Subscriber messages as Structured Records. Message count {}", messages.size());
+        }
+    }
+
+}
@@ -1,70 +1,70 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Name;\r
-import co.cask.cdap.api.annotation.Plugin;\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.streaming.StreamingContext;\r
-import co.cask.cdap.etl.api.streaming.StreamingSource;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.apache.spark.streaming.api.java.JavaDStream;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap.DMaaPSourceOutputSchema;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.validator.DMaaPMRSourcePluginConfigValidator;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * DMaaP MR Source Plugin which polls DMaaP MR topic at frequent intervals\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/18/2017.\r
- */\r
-@Plugin(type = StreamingSource.PLUGIN_TYPE)\r
-@Name("DMaaPMRSource")\r
-@Description("Fetches DMaaP MR Messages at regular intervals")\r
-public class DMaaPMRSource extends StreamingSource<StructuredRecord> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRSource.class);\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final DMaaPMRSourcePluginConfig pluginConfig;\r
-\r
-    public DMaaPMRSource(final DMaaPMRSourcePluginConfig pluginConfig) {\r
-        LOG.debug("Creating DMaaP MR Source plugin with plugin Config: {}", pluginConfig);\r
-        this.pluginConfig = pluginConfig;\r
-    }\r
-\r
-    @Override\r
-    public void configurePipeline(PipelineConfigurer pipelineConfigurer) {\r
-        ValidationUtils.validateSettings(pluginConfig, new DMaaPMRSourcePluginConfigValidator());\r
-        pipelineConfigurer.getStageConfigurer().setOutputSchema(DMaaPSourceOutputSchema.getSchema());\r
-    }\r
-\r
-    @Override\r
-    public JavaDStream<StructuredRecord> getStream(final StreamingContext streamingContext) throws Exception {\r
-        return streamingContext.getSparkStreamingContext().receiverStream(\r
-                new DMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), pluginConfig, streamingContext.getMetrics()));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Name;
+import co.cask.cdap.api.annotation.Plugin;
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.streaming.StreamingContext;
+import co.cask.cdap.etl.api.streaming.StreamingSource;
+import org.apache.spark.storage.StorageLevel;
+import org.apache.spark.streaming.api.java.JavaDStream;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap.DMaaPSourceOutputSchema;
+import org.onap.dcae.apod.analytics.cdap.plugins.validator.DMaaPMRSourcePluginConfigValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * DMaaP MR Source Plugin which polls DMaaP MR topic at frequent intervals
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/18/2017.
+ */
+@Plugin(type = StreamingSource.PLUGIN_TYPE)
+@Name("DMaaPMRSource")
+@Description("Fetches DMaaP MR Messages at regular intervals")
+public class DMaaPMRSource extends StreamingSource<StructuredRecord> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRSource.class);
+    private static final long serialVersionUID = 1L;
+
+    private final DMaaPMRSourcePluginConfig pluginConfig;
+
+    public DMaaPMRSource(final DMaaPMRSourcePluginConfig pluginConfig) {
+        LOG.debug("Creating DMaaP MR Source plugin with plugin Config: {}", pluginConfig);
+        this.pluginConfig = pluginConfig;
+    }
+
+    @Override
+    public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
+        ValidationUtils.validateSettings(pluginConfig, new DMaaPMRSourcePluginConfigValidator());
+        pipelineConfigurer.getStageConfigurer().setOutputSchema(DMaaPSourceOutputSchema.getSchema());
+    }
+
+    @Override
+    public JavaDStream<StructuredRecord> getStream(final StreamingContext streamingContext) throws Exception {
+        return streamingContext.getSparkStreamingContext().receiverStream(
+                new DMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), pluginConfig, streamingContext.getMetrics()));
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.apache.spark.streaming.receiver.Receiver;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.DMaaPSourceConfigMapper;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.FileNotFoundException;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.List;\r
-import java.util.concurrent.TimeUnit;\r
-\r
-import static org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils.readValue;\r
-import static org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils.writeValueAsString;\r
-\r
-/**\r
- * DMaaP MR Receiver which calls DMaaP MR Topic and stores structured records\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/19/2017.\r
- */\r
-public class MockDMaaPMRReceiver extends Receiver<StructuredRecord> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(MockDMaaPMRReceiver.class);\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private static final String MOCK_MESSAGE_FILE_LOCATION = "ves_mock_messages.json";\r
-    private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =\r
-            new TypeReference<List<EventListener>>() {\r
-            };\r
-\r
-    private final DMaaPMRSourcePluginConfig pluginConfig;\r
-\r
-    public MockDMaaPMRReceiver(final StorageLevel storageLevel, final DMaaPMRSourcePluginConfig pluginConfig) {\r
-        super(storageLevel);\r
-        this.pluginConfig = pluginConfig;\r
-        LOG.debug("Created DMaaP MR Receiver instance with plugin Config: {}", pluginConfig);\r
-    }\r
-\r
-    @Override\r
-    public void onStart() {\r
-\r
-        // create DMaaP MR Subscriber\r
-        final DMaaPMRSubscriber subscriber =\r
-                DMaaPMRFactory.create().createSubscriber(DMaaPSourceConfigMapper.map(pluginConfig));\r
-        storeStructuredRecords(subscriber);\r
-\r
-    }\r
-\r
-    @Override\r
-    public void onStop() {\r
-        LOG.debug("Stopping DMaaP MR Receiver with plugin config: {}", pluginConfig);\r
-    }\r
-\r
-    /**\r
-     * Fetches records from DMaaP MR Subscriber and store them as structured records\r
-     *\r
-     * @param subscriber DMaaP MR Subscriber Instance\r
-     */\r
-    public void storeStructuredRecords(final DMaaPMRSubscriber subscriber) {\r
-\r
-        LOG.debug("DMaaP MR Receiver start fetching messages from DMaaP MR Topic");\r
-        \r
-        try (InputStream resourceAsStream =\r
-                     Thread.currentThread().getContextClassLoader().getResourceAsStream(MOCK_MESSAGE_FILE_LOCATION)) {\r
-\r
-            if (resourceAsStream == null) {\r
-                LOG.error("Unable to find file at location: {}", MOCK_MESSAGE_FILE_LOCATION);\r
-                throw new DCAEAnalyticsRuntimeException("Unable to find file", LOG, new FileNotFoundException());\r
-            }\r
-\r
-            List<EventListener> eventListeners = readValue(resourceAsStream, EVENT_LISTENER_TYPE_REFERENCE);\r
-\r
-            final int totalMessageCount = eventListeners.size();\r
-            LOG.debug("Mock message count to be written to cdap stream: ()", totalMessageCount);\r
-\r
-            int i = 1;\r
-            for (EventListener eventListener : eventListeners) {\r
-                if (isStopped()) {\r
-                    return;\r
-                }\r
-                final String eventListenerString = writeValueAsString(eventListener);\r
-                LOG.debug("=======>> Writing message to cdap stream no: {} of {}", i, totalMessageCount);\r
-                store(CDAPPluginUtils.createDMaaPMRResponseStructuredRecord(eventListenerString));\r
-                i++;\r
-                try {\r
-                    TimeUnit.MILLISECONDS.sleep(pluginConfig.getPollingInterval());\r
-                } catch (InterruptedException e) {\r
-                    LOG.error("Error while sleeping");\r
-                    throw new DCAEAnalyticsRuntimeException("Error while sleeping", LOG, e);\r
-                }\r
-\r
-            }\r
-\r
-            LOG.debug("Finished writing mock messages to CDAP Stream");\r
-\r
-        } catch (IOException e) {\r
-            LOG.error("Error while parsing json file");\r
-            throw new DCAEAnalyticsRuntimeException("Error while parsing mock json file", LOG, e);\r
-        }\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import com.fasterxml.jackson.core.type.TypeReference;
+import org.apache.spark.storage.StorageLevel;
+import org.apache.spark.streaming.receiver.Receiver;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.DMaaPSourceConfigMapper;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static org.onap.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils.readValue;
+import static org.onap.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils.writeValueAsString;
+
+/**
+ * DMaaP MR Receiver which calls DMaaP MR Topic and stores structured records
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/19/2017.
+ */
+public class MockDMaaPMRReceiver extends Receiver<StructuredRecord> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MockDMaaPMRReceiver.class);
+    private static final long serialVersionUID = 1L;
+
+    private static final String MOCK_MESSAGE_FILE_LOCATION = "ves_mock_messages.json";
+    private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =
+            new TypeReference<List<EventListener>>() {
+            };
+
+    private final DMaaPMRSourcePluginConfig pluginConfig;
+
+    public MockDMaaPMRReceiver(final StorageLevel storageLevel, final DMaaPMRSourcePluginConfig pluginConfig) {
+        super(storageLevel);
+        this.pluginConfig = pluginConfig;
+        LOG.debug("Created DMaaP MR Receiver instance with plugin Config: {}", pluginConfig);
+    }
+
+    @Override
+    public void onStart() {
+
+        // create DMaaP MR Subscriber
+        final DMaaPMRSubscriber subscriber =
+                DMaaPMRFactory.create().createSubscriber(DMaaPSourceConfigMapper.map(pluginConfig));
+        storeStructuredRecords(subscriber);
+
+    }
+
+    @Override
+    public void onStop() {
+        LOG.debug("Stopping DMaaP MR Receiver with plugin config: {}", pluginConfig);
+    }
+
+    /**
+     * Fetches records from DMaaP MR Subscriber and store them as structured records
+     *
+     * @param subscriber DMaaP MR Subscriber Instance
+     */
+    public void storeStructuredRecords(final DMaaPMRSubscriber subscriber) {
+
+        LOG.debug("DMaaP MR Receiver start fetching messages from DMaaP MR Topic");
+        
+        try (InputStream resourceAsStream =
+                     Thread.currentThread().getContextClassLoader().getResourceAsStream(MOCK_MESSAGE_FILE_LOCATION)) {
+
+            if (resourceAsStream == null) {
+                LOG.error("Unable to find file at location: {}", MOCK_MESSAGE_FILE_LOCATION);
+                throw new DCAEAnalyticsRuntimeException("Unable to find file", LOG, new FileNotFoundException());
+            }
+
+            List<EventListener> eventListeners = readValue(resourceAsStream, EVENT_LISTENER_TYPE_REFERENCE);
+
+            final int totalMessageCount = eventListeners.size();
+            LOG.debug("Mock message count to be written to cdap stream: ()", totalMessageCount);
+
+            int i = 1;
+            for (EventListener eventListener : eventListeners) {
+                if (isStopped()) {
+                    return;
+                }
+                final String eventListenerString = writeValueAsString(eventListener);
+                LOG.debug("=======>> Writing message to cdap stream no: {} of {}", i, totalMessageCount);
+                store(CDAPPluginUtils.createDMaaPMRResponseStructuredRecord(eventListenerString));
+                i++;
+                try {
+                    TimeUnit.MILLISECONDS.sleep(pluginConfig.getPollingInterval());
+                } catch (InterruptedException e) {
+                    LOG.error("Error while sleeping");
+                    throw new DCAEAnalyticsRuntimeException("Error while sleeping", LOG, e);
+                }
+
+            }
+
+            LOG.debug("Finished writing mock messages to CDAP Stream");
+
+        } catch (IOException e) {
+            LOG.error("Error while parsing json file");
+            throw new DCAEAnalyticsRuntimeException("Error while parsing mock json file", LOG, e);
+        }
+    }
+
+}
@@ -1,73 +1,73 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Name;\r
-import co.cask.cdap.api.annotation.Plugin;\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.streaming.StreamingContext;\r
-import co.cask.cdap.etl.api.streaming.StreamingSource;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.apache.spark.streaming.api.java.JavaDStream;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * A mock implementation of DMaaP MR Receiver which sends mock ves messages\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 2/15/2017.\r
- */\r
-@Plugin(type = StreamingSource.PLUGIN_TYPE)\r
-@Name("MockDMaaPMRSource")\r
-@Description("Fetches DMaaP MR Messages at regular intervals")\r
-public class MockDMaaPMRSource extends StreamingSource<StructuredRecord> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(MockDMaaPMRSource.class);\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final DMaaPMRSourcePluginConfig pluginConfig;\r
-\r
-    public MockDMaaPMRSource(final DMaaPMRSourcePluginConfig pluginConfig) {\r
-        LOG.debug("Creating DMaaP MR Source plugin with plugin Config: {}", pluginConfig);\r
-        this.pluginConfig = pluginConfig;\r
-    }\r
-\r
-    @Override\r
-    public void configurePipeline(PipelineConfigurer pipelineConfigurer) {\r
-        final Integer pollingInterval = pluginConfig.getPollingInterval();\r
-        if (pollingInterval == null) {\r
-            final String errorMessage = "Polling Interval field must be present";\r
-            throw new CDAPSettingsException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        } else {\r
-            LOG.info("Mock Message will be send every ms: {}", pollingInterval);\r
-        }\r
-    }\r
-\r
-    @Override\r
-    public JavaDStream<StructuredRecord> getStream(final StreamingContext streamingContext) throws Exception {\r
-        return streamingContext.getSparkStreamingContext().receiverStream(\r
-                new MockDMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), pluginConfig));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Name;
+import co.cask.cdap.api.annotation.Plugin;
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.streaming.StreamingContext;
+import co.cask.cdap.etl.api.streaming.StreamingSource;
+import org.apache.spark.storage.StorageLevel;
+import org.apache.spark.streaming.api.java.JavaDStream;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A mock implementation of DMaaP MR Receiver which sends mock ves messages
+ * <p>
+ * @author Rajiv Singla . Creation Date: 2/15/2017.
+ */
+@Plugin(type = StreamingSource.PLUGIN_TYPE)
+@Name("MockDMaaPMRSource")
+@Description("Fetches DMaaP MR Messages at regular intervals")
+public class MockDMaaPMRSource extends StreamingSource<StructuredRecord> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MockDMaaPMRSource.class);
+    private static final long serialVersionUID = 1L;
+
+    private final DMaaPMRSourcePluginConfig pluginConfig;
+
+    public MockDMaaPMRSource(final DMaaPMRSourcePluginConfig pluginConfig) {
+        LOG.debug("Creating DMaaP MR Source plugin with plugin Config: {}", pluginConfig);
+        this.pluginConfig = pluginConfig;
+    }
+
+    @Override
+    public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
+        final Integer pollingInterval = pluginConfig.getPollingInterval();
+        if (pollingInterval == null) {
+            final String errorMessage = "Polling Interval field must be present";
+            throw new CDAPSettingsException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        } else {
+            LOG.info("Mock Message will be send every ms: {}", pollingInterval);
+        }
+    }
+
+    @Override
+    public JavaDStream<StructuredRecord> getStream(final StreamingContext streamingContext) throws Exception {
+        return streamingContext.getSparkStreamingContext().receiverStream(
+                new MockDMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), pluginConfig));
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.transform.filter;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Name;\r
-import co.cask.cdap.api.annotation.Plugin;\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.Emitter;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.Transform;\r
-import co.cask.cdap.etl.api.TransformContext;\r
-import com.google.common.base.Splitter;\r
-import com.google.common.collect.Maps;\r
-import com.google.common.collect.Sets;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter.JsonPathFilterPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.validator.JsonPathFilterPluginConfigValidator;\r
-import org.openecomp.dcae.apod.analytics.common.service.filter.JsonMessageFilterProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.common.utils.MessageProcessorUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-/**\r
- * Json Path filter Plugin filters incoming schema field based of given json path expected values\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 3/2/2017.\r
- */\r
-\r
-@Plugin(type = Transform.PLUGIN_TYPE)\r
-@Name("JsonPathFilter")\r
-@Description("Filters incoming schema field based of given json path expected values")\r
-public class JsonPathFilter extends Transform<StructuredRecord, StructuredRecord> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(JsonPathFilter.class);\r
-\r
-    private final JsonPathFilterPluginConfig pluginConfig;\r
-    private final Map<String, Set<String>> jsonFilterPathMappings;\r
-\r
-    public JsonPathFilter(final JsonPathFilterPluginConfig pluginConfig) {\r
-        this.pluginConfig = pluginConfig;\r
-        jsonFilterPathMappings = Maps.newHashMap();\r
-        LOG.info("Created instance of Json Path Filter Plugin with plugin config: {}", pluginConfig);\r
-    }\r
-\r
-\r
-    @Override\r
-    public void initialize(final TransformContext context) throws Exception {\r
-        super.initialize(context);\r
-        populateJsonFilterMapping();\r
-    }\r
-\r
-    @Override\r
-    public void configurePipeline(final PipelineConfigurer pipelineConfigurer) {\r
-        super.configurePipeline(pipelineConfigurer);\r
-        ValidationUtils.validateSettings(pluginConfig, new JsonPathFilterPluginConfigValidator());\r
-        final Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema();\r
-        CDAPPluginUtils.validateSchemaContainsFields(inputSchema, pluginConfig.getIncomingJsonFieldName());\r
-        populateJsonFilterMapping();\r
-        CDAPPluginUtils.setOutputSchema(pipelineConfigurer, pluginConfig.getSchema());\r
-    }\r
-\r
-    @Override\r
-    public void transform(final StructuredRecord inputStructuredRecord, final Emitter<StructuredRecord> emitter)\r
-            throws Exception {\r
-\r
-        // get input json message\r
-        final String jsonMessage = inputStructuredRecord.get(pluginConfig.getIncomingJsonFieldName());\r
-\r
-        // process Json Filter Mappings\r
-        final JsonMessageFilterProcessorContext jsonMessageFilterProcessorContext =\r
-                MessageProcessorUtils.processJsonFilterMappings(jsonMessage, jsonFilterPathMappings);\r
-\r
-        // create new output record builder and copy any input Structured record values to output record builder\r
-        final Schema outputSchema = Schema.parseJson(pluginConfig.getSchema());\r
-        final StructuredRecord.Builder outputRecordBuilder =\r
-                CDAPPluginUtils.createOutputStructuredRecordBuilder(outputSchema, inputStructuredRecord);\r
-\r
-        // add json filter matched field\r
-        final StructuredRecord.Builder outputRecordBuilderWithMatchedField =\r
-                CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(outputRecordBuilder,\r
-                        outputSchema, pluginConfig.getOutputSchemaFieldName(),\r
-                        jsonMessageFilterProcessorContext.getMatched());\r
-\r
-        // emit structured record with filtering matched field\r
-        final StructuredRecord outputStructuredRecord = outputRecordBuilderWithMatchedField.build();\r
-\r
-        LOG.debug("Incoming Json Message: {}.Json Path Filter Output Matched Field: {}", jsonMessage,\r
-                outputStructuredRecord.get(pluginConfig.getOutputSchemaFieldName()));\r
-\r
-        emitter.emit(outputStructuredRecord);\r
-\r
-    }\r
-\r
-    /**\r
-     * Populates Json Filter Mapping\r
-     */\r
-    private void populateJsonFilterMapping() {\r
-        final Map<String, String> fieldMappings =\r
-                CDAPPluginUtils.extractFieldMappings(pluginConfig.getJsonFilterMappings());\r
-        if (fieldMappings.isEmpty()) {\r
-            throw new IllegalArgumentException("No Field Mapping found. Invalid Filter mapping configuration");\r
-        }\r
-        final Splitter semiColonSplitter = Splitter.on(";");\r
-        for (Map.Entry<String, String> fieldMappingEntry : fieldMappings.entrySet()) {\r
-            jsonFilterPathMappings.put(fieldMappingEntry.getKey(),\r
-                    Sets.newLinkedHashSet(semiColonSplitter.split(fieldMappingEntry.getValue())));\r
-        }\r
-        LOG.info("Input Json Filter Mappings: {}", jsonFilterPathMappings);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.transform.filter;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Name;
+import co.cask.cdap.api.annotation.Plugin;
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.Emitter;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.Transform;
+import co.cask.cdap.etl.api.TransformContext;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter.JsonPathFilterPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.validator.JsonPathFilterPluginConfigValidator;
+import org.onap.dcae.apod.analytics.common.service.filter.JsonMessageFilterProcessorContext;
+import org.onap.dcae.apod.analytics.common.utils.MessageProcessorUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Json Path filter Plugin filters incoming schema field based of given json path expected values
+ * <p>
+ * @author Rajiv Singla . Creation Date: 3/2/2017.
+ */
+
+@Plugin(type = Transform.PLUGIN_TYPE)
+@Name("JsonPathFilter")
+@Description("Filters incoming schema field based of given json path expected values")
+public class JsonPathFilter extends Transform<StructuredRecord, StructuredRecord> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(JsonPathFilter.class);
+
+    private final JsonPathFilterPluginConfig pluginConfig;
+    private final Map<String, Set<String>> jsonFilterPathMappings;
+
+    public JsonPathFilter(final JsonPathFilterPluginConfig pluginConfig) {
+        this.pluginConfig = pluginConfig;
+        jsonFilterPathMappings = Maps.newHashMap();
+        LOG.info("Created instance of Json Path Filter Plugin with plugin config: {}", pluginConfig);
+    }
+
+
+    @Override
+    public void initialize(final TransformContext context) throws Exception {
+        super.initialize(context);
+        populateJsonFilterMapping();
+    }
+
+    @Override
+    public void configurePipeline(final PipelineConfigurer pipelineConfigurer) {
+        super.configurePipeline(pipelineConfigurer);
+        ValidationUtils.validateSettings(pluginConfig, new JsonPathFilterPluginConfigValidator());
+        final Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema();
+        CDAPPluginUtils.validateSchemaContainsFields(inputSchema, pluginConfig.getIncomingJsonFieldName());
+        populateJsonFilterMapping();
+        CDAPPluginUtils.setOutputSchema(pipelineConfigurer, pluginConfig.getSchema());
+    }
+
+    @Override
+    public void transform(final StructuredRecord inputStructuredRecord, final Emitter<StructuredRecord> emitter)
+            throws Exception {
+
+        // get input json message
+        final String jsonMessage = inputStructuredRecord.get(pluginConfig.getIncomingJsonFieldName());
+
+        // process Json Filter Mappings
+        final JsonMessageFilterProcessorContext jsonMessageFilterProcessorContext =
+                MessageProcessorUtils.processJsonFilterMappings(jsonMessage, jsonFilterPathMappings);
+
+        // create new output record builder and copy any input Structured record values to output record builder
+        final Schema outputSchema = Schema.parseJson(pluginConfig.getSchema());
+        final StructuredRecord.Builder outputRecordBuilder =
+                CDAPPluginUtils.createOutputStructuredRecordBuilder(outputSchema, inputStructuredRecord);
+
+        // add json filter matched field
+        final StructuredRecord.Builder outputRecordBuilderWithMatchedField =
+                CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(outputRecordBuilder,
+                        outputSchema, pluginConfig.getOutputSchemaFieldName(),
+                        jsonMessageFilterProcessorContext.getMatched());
+
+        // emit structured record with filtering matched field
+        final StructuredRecord outputStructuredRecord = outputRecordBuilderWithMatchedField.build();
+
+        LOG.debug("Incoming Json Message: {}.Json Path Filter Output Matched Field: {}", jsonMessage,
+                outputStructuredRecord.get(pluginConfig.getOutputSchemaFieldName()));
+
+        emitter.emit(outputStructuredRecord);
+
+    }
+
+    /**
+     * Populates Json Filter Mapping
+     */
+    private void populateJsonFilterMapping() {
+        final Map<String, String> fieldMappings =
+                CDAPPluginUtils.extractFieldMappings(pluginConfig.getJsonFilterMappings());
+        if (fieldMappings.isEmpty()) {
+            throw new IllegalArgumentException("No Field Mapping found. Invalid Filter mapping configuration");
+        }
+        final Splitter semiColonSplitter = Splitter.on(";");
+        for (Map.Entry<String, String> fieldMappingEntry : fieldMappings.entrySet()) {
+            jsonFilterPathMappings.put(fieldMappingEntry.getKey(),
+                    Sets.newLinkedHashSet(semiColonSplitter.split(fieldMappingEntry.getValue())));
+        }
+        LOG.info("Input Json Filter Mappings: {}", jsonFilterPathMappings);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.utils;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import com.google.common.base.Function;\r
-import com.google.common.base.Splitter;\r
-import com.google.common.collect.Lists;\r
-import com.google.common.collect.Maps;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap.DMaaPSourceOutputSchema;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.util.Arrays;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.annotation.Nonnull;\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/26/2017.\r
- */\r
-public abstract class CDAPPluginUtils extends AnalyticsModelJsonUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(CDAPPluginUtils.class);\r
-\r
-    public static final Function<Schema, Schema.Type> SCHEMA_TO_TYPE_FUNCTION = new Function<Schema, Schema.Type>() {\r
-        @Override\r
-        public Schema.Type apply(@Nonnull Schema schema) {\r
-            return schema.getType();\r
-        }\r
-    };\r
-\r
-\r
-\r
-    private CDAPPluginUtils() {\r
-        // private constructor\r
-    }\r
-\r
-    /**\r
-     * Validates if CDAP Schema contains expected fields\r
-     *\r
-     * @param schema schema that need to be validated\r
-     * @param expectedFields fields that are expected to be in the schema\r
-     */\r
-\r
-    public static void validateSchemaContainsFields(@Nullable final Schema schema, final String... expectedFields) {\r
-\r
-        LOG.debug("Validating schema:{} contains expected fields:{}", schema, Arrays.toString(expectedFields));\r
-\r
-        if (schema == null) {\r
-            // If input schema is null then no validation possible\r
-            LOG.warn("Input Schema is null. No validation possible");\r
-        } else {\r
-            // Check if expected fields are indeed present in the schema\r
-            for (String expectedField : expectedFields) {\r
-                final Schema.Field schemaField = schema.getField(expectedField);\r
-                if (schemaField == null) {\r
-                    final String errorMessage = String.format(\r
-                            "Unable to find expected field: %s, in schema: %s", expectedField, schema);\r
-                    throw new CDAPSettingsException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-                }\r
-            }\r
-            LOG.debug("Successfully validated schema:{}, contains expected fields:{}", schema,\r
-                    Arrays.toString(expectedFields));\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates a new Structured Record containing DMaaP MR fetched message\r
-     *\r
-     * @param message DMaaP MR fetch message\r
-     *\r
-     * @return Structured record containing DMaaP MR Message\r
-     */\r
-    public static StructuredRecord createDMaaPMRResponseStructuredRecord(final String message) {\r
-        StructuredRecord.Builder recordBuilder = StructuredRecord.builder(DMaaPSourceOutputSchema.getSchema());\r
-        recordBuilder\r
-                .set(DMaaPSourceOutputSchema.TIMESTAMP.getSchemaColumnName(), System.nanoTime())\r
-                .set(DMaaPSourceOutputSchema.RESPONSE_CODE.getSchemaColumnName(), 200)\r
-                .set(DMaaPSourceOutputSchema.RESPONSE_MESSAGE.getSchemaColumnName(), "OK")\r
-                .set(DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName(), message);\r
-        return recordBuilder.build();\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates output StructuredRecord Builder which has copied values from input StructuredRecord\r
-     *\r
-     * @param outputSchema output Schema\r
-     * @param inputStructuredRecord input Structured Record\r
-     *\r
-     * @return output Structured Record builder with pre populated values from input structured record\r
-     */\r
-    public static StructuredRecord.Builder createOutputStructuredRecordBuilder(\r
-            @Nonnull final Schema outputSchema,\r
-            @Nonnull final StructuredRecord inputStructuredRecord) {\r
-\r
-        // Get input structured Record Schema\r
-        final Schema inputSchema = inputStructuredRecord.getSchema();\r
-        // Create new instance of output Structured Record Builder from output Schema\r
-        final StructuredRecord.Builder outputStructuredRecordBuilder = StructuredRecord.builder(outputSchema);\r
-\r
-        // iterate over input fields and if output schema has field with same name copy the value to out record builder\r
-        for (Schema.Field inputField : inputSchema.getFields()) {\r
-            final String inputFieldName = inputField.getName();\r
-            if (outputSchema.getField(inputFieldName) != null) {\r
-                outputStructuredRecordBuilder.set(inputFieldName, inputStructuredRecord.get(inputFieldName));\r
-            }\r
-        }\r
-\r
-        return outputStructuredRecordBuilder;\r
-    }\r
-\r
-\r
-    /**\r
-     * Adds Field value to StructuredRecord Builder if schema contains that field Name\r
-     *\r
-     * @param structuredRecordBuilder structured record builder\r
-     * @param structuredRecordSchema schema for structured record builder\r
-     * @param fieldName field name\r
-     * @param fieldValue field value\r
-     *\r
-     * @return structured record builder with populated field name and value if schema contains field name\r
-     */\r
-    public static StructuredRecord.Builder addFieldValueToStructuredRecordBuilder(\r
-            @Nonnull final StructuredRecord.Builder structuredRecordBuilder,\r
-            @Nonnull final Schema structuredRecordSchema,\r
-            @Nonnull final String fieldName,\r
-            final Object fieldValue) {\r
-\r
-        // check if schema contains field Name\r
-        if (structuredRecordSchema.getField(fieldName) != null) {\r
-            structuredRecordBuilder.set(fieldName, fieldValue);\r
-        } else {\r
-            LOG.info("Unable to populate value for field Name: {} with field value: {}. " +\r
-                            "Schema Fields: {} does not contain field name: {}",\r
-                    fieldName, fieldValue, structuredRecordSchema.getFields(), fieldName);\r
-        }\r
-\r
-        return structuredRecordBuilder;\r
-    }\r
-\r
-\r
-    /**\r
-     * Validates that given schema String has fieldName of expected type. If field does not exist in given schema\r
-     * then validation will pass with warning. If field does exist in given schema then this validation will return\r
-     * true if field type is same as expected type else false\r
-     *\r
-     * @param schemaString CDAP Plugin output or input schema string\r
-     * @param fieldName field name\r
-     * @param expectedFieldType expected schema field type\r
-     *\r
-     * @return true if field type matches expected field type else false. If field does not exist in\r
-     * give schema validation will pass but will generate a warning message\r
-     */\r
-    public static boolean validateSchemaFieldType(@Nonnull final String schemaString,\r
-                                                  @Nonnull final String fieldName,\r
-                                                  @Nonnull final Schema.Type expectedFieldType) {\r
-\r
-        try {\r
-            // parse given schema String\r
-            final Schema outputSchema = Schema.parseJson(schemaString);\r
-            final Schema.Field schemaField = outputSchema.getField(fieldName);\r
-\r
-            // if given schema does contain field then validated fieldName type\r
-            if (schemaField != null) {\r
-\r
-                final List<Schema> schemas = new LinkedList<>();\r
-\r
-                // if it is a union type then grab all union schemas\r
-                if (outputSchema.getField(fieldName).getSchema().getType() == Schema.Type.UNION) {\r
-                    final List<Schema> unionFieldSchemas =\r
-                            outputSchema.getField(fieldName).getSchema().getUnionSchemas();\r
-                    schemas.addAll(unionFieldSchemas);\r
-                } else {\r
-                    // if not union type the just get the field schema\r
-                    final Schema fieldSchema = outputSchema.getField(fieldName).getSchema();\r
-                    schemas.add(fieldSchema);\r
-                }\r
-\r
-                // get all schema types\r
-                final List<Schema.Type> fieldTypes =\r
-                        Lists.transform(schemas, CDAPPluginUtils.SCHEMA_TO_TYPE_FUNCTION);\r
-\r
-                // if all schema types does not contain expected field type then return false\r
-                if (!fieldTypes.contains(expectedFieldType)) {\r
-                    LOG.error("Validation failed for fieldName: {} is NOT of expected Type: {} in schema: {}",\r
-                            fieldName, expectedFieldType, outputSchema);\r
-                    return false;\r
-                }\r
-\r
-                // field type validation passed\r
-                LOG.debug("Successfully validated fieldName: {} is of expected Type: {}",\r
-                        fieldName, expectedFieldType);\r
-\r
-                return true;\r
-\r
-            } else {\r
-\r
-                // if field does not exist then the validation will pass but will generate warning message\r
-                LOG.warn("Validation of field type not possible. Field name: {} does not exist in schema: {}",\r
-                        fieldName, outputSchema);\r
-                return true;\r
-            }\r
-\r
-        } catch (IOException e) {\r
-            final String errorMessage =\r
-                    String.format("Unable to parse schema: %s for field type validation. " +\r
-                                    "Field Name: %s, Expected Field Type: %s Exception: %s",\r
-                            schemaString, fieldName, expectedFieldType, e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Parses provided schema String as Schema object and set it as output Schema format\r
-     *\r
-     * @param pipelineConfigurer plugin pipeline configurer\r
-     * @param schemaString schema String to be set as output schema\r
-     */\r
-    public static void setOutputSchema(final PipelineConfigurer pipelineConfigurer, final String schemaString) {\r
-        try {\r
-            final Schema outputSchema = Schema.parseJson(schemaString);\r
-            pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema);\r
-        } catch (IOException e) {\r
-            final String errorMessage = String.format(\r
-                    "Schema specified is not a valid JSON. Schema String: %s, Exception: %s", schemaString, e);\r
-            throw new CDAPSettingsException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Parses incoming plugin config mapping to key value map. If any of the key value map is blank an Illegal Argument\r
-     * exception will be thrown\r
-     *\r
-     * @param mappingFieldString field Mapping String\r
-     *\r
-     * @return map containing mapping key values\r
-     */\r
-    public static Map<String, String> extractFieldMappings(final String mappingFieldString) {\r
-        final Map<String, String> fieldMappings = Maps.newHashMap();\r
-        if (StringUtils.isNotBlank(mappingFieldString)) {\r
-            final Splitter commaSplitter = Splitter.on(",");\r
-            for (String fieldMapping : commaSplitter.split(mappingFieldString)) {\r
-                final String[] keyValueMappings = fieldMapping.split(":");\r
-                if (keyValueMappings.length != 2 ||\r
-                        StringUtils.isBlank(keyValueMappings[0]) ||\r
-                        StringUtils.isBlank(keyValueMappings[1])) {\r
-                    final String errorMessage = "Field Mapping key or value is Blank. All field mappings must " +\r
-                            "be present in mappings: " + mappingFieldString;\r
-                    throw new DCAEAnalyticsRuntimeException(\r
-                            errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-                }\r
-                fieldMappings.put(keyValueMappings[0].trim(), keyValueMappings[1].trim());\r
-            }\r
-        }\r
-        return fieldMappings;\r
-    }\r
-\r
-\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.utils;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import com.google.common.base.Function;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap.DMaaPSourceOutputSchema;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/26/2017.
+ */
+public abstract class CDAPPluginUtils extends AnalyticsModelJsonUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(CDAPPluginUtils.class);
+
+    public static final Function<Schema, Schema.Type> SCHEMA_TO_TYPE_FUNCTION = new Function<Schema, Schema.Type>() {
+        @Override
+        public Schema.Type apply(@Nonnull Schema schema) {
+            return schema.getType();
+        }
+    };
+
+
+
+    private CDAPPluginUtils() {
+        // private constructor
+    }
+
+    /**
+     * Validates if CDAP Schema contains expected fields
+     *
+     * @param schema schema that need to be validated
+     * @param expectedFields fields that are expected to be in the schema
+     */
+
+    public static void validateSchemaContainsFields(@Nullable final Schema schema, final String... expectedFields) {
+
+        LOG.debug("Validating schema:{} contains expected fields:{}", schema, Arrays.toString(expectedFields));
+
+        if (schema == null) {
+            // If input schema is null then no validation possible
+            LOG.warn("Input Schema is null. No validation possible");
+        } else {
+            // Check if expected fields are indeed present in the schema
+            for (String expectedField : expectedFields) {
+                final Schema.Field schemaField = schema.getField(expectedField);
+                if (schemaField == null) {
+                    final String errorMessage = String.format(
+                            "Unable to find expected field: %s, in schema: %s", expectedField, schema);
+                    throw new CDAPSettingsException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+                }
+            }
+            LOG.debug("Successfully validated schema:{}, contains expected fields:{}", schema,
+                    Arrays.toString(expectedFields));
+        }
+    }
+
+
+    /**
+     * Creates a new Structured Record containing DMaaP MR fetched message
+     *
+     * @param message DMaaP MR fetch message
+     *
+     * @return Structured record containing DMaaP MR Message
+     */
+    public static StructuredRecord createDMaaPMRResponseStructuredRecord(final String message) {
+        StructuredRecord.Builder recordBuilder = StructuredRecord.builder(DMaaPSourceOutputSchema.getSchema());
+        recordBuilder
+                .set(DMaaPSourceOutputSchema.TIMESTAMP.getSchemaColumnName(), System.nanoTime())
+                .set(DMaaPSourceOutputSchema.RESPONSE_CODE.getSchemaColumnName(), 200)
+                .set(DMaaPSourceOutputSchema.RESPONSE_MESSAGE.getSchemaColumnName(), "OK")
+                .set(DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName(), message);
+        return recordBuilder.build();
+    }
+
+
+    /**
+     * Creates output StructuredRecord Builder which has copied values from input StructuredRecord
+     *
+     * @param outputSchema output Schema
+     * @param inputStructuredRecord input Structured Record
+     *
+     * @return output Structured Record builder with pre populated values from input structured record
+     */
+    public static StructuredRecord.Builder createOutputStructuredRecordBuilder(
+            @Nonnull final Schema outputSchema,
+            @Nonnull final StructuredRecord inputStructuredRecord) {
+
+        // Get input structured Record Schema
+        final Schema inputSchema = inputStructuredRecord.getSchema();
+        // Create new instance of output Structured Record Builder from output Schema
+        final StructuredRecord.Builder outputStructuredRecordBuilder = StructuredRecord.builder(outputSchema);
+
+        // iterate over input fields and if output schema has field with same name copy the value to out record builder
+        for (Schema.Field inputField : inputSchema.getFields()) {
+            final String inputFieldName = inputField.getName();
+            if (outputSchema.getField(inputFieldName) != null) {
+                outputStructuredRecordBuilder.set(inputFieldName, inputStructuredRecord.get(inputFieldName));
+            }
+        }
+
+        return outputStructuredRecordBuilder;
+    }
+
+
+    /**
+     * Adds Field value to StructuredRecord Builder if schema contains that field Name
+     *
+     * @param structuredRecordBuilder structured record builder
+     * @param structuredRecordSchema schema for structured record builder
+     * @param fieldName field name
+     * @param fieldValue field value
+     *
+     * @return structured record builder with populated field name and value if schema contains field name
+     */
+    public static StructuredRecord.Builder addFieldValueToStructuredRecordBuilder(
+            @Nonnull final StructuredRecord.Builder structuredRecordBuilder,
+            @Nonnull final Schema structuredRecordSchema,
+            @Nonnull final String fieldName,
+            final Object fieldValue) {
+
+        // check if schema contains field Name
+        if (structuredRecordSchema.getField(fieldName) != null) {
+            structuredRecordBuilder.set(fieldName, fieldValue);
+        } else {
+            LOG.info("Unable to populate value for field Name: {} with field value: {}. " +
+                            "Schema Fields: {} does not contain field name: {}",
+                    fieldName, fieldValue, structuredRecordSchema.getFields(), fieldName);
+        }
+
+        return structuredRecordBuilder;
+    }
+
+
+    /**
+     * Validates that given schema String has fieldName of expected type. If field does not exist in given schema
+     * then validation will pass with warning. If field does exist in given schema then this validation will return
+     * true if field type is same as expected type else false
+     *
+     * @param schemaString CDAP Plugin output or input schema string
+     * @param fieldName field name
+     * @param expectedFieldType expected schema field type
+     *
+     * @return true if field type matches expected field type else false. If field does not exist in
+     * give schema validation will pass but will generate a warning message
+     */
+    public static boolean validateSchemaFieldType(@Nonnull final String schemaString,
+                                                  @Nonnull final String fieldName,
+                                                  @Nonnull final Schema.Type expectedFieldType) {
+
+        try {
+            // parse given schema String
+            final Schema outputSchema = Schema.parseJson(schemaString);
+            final Schema.Field schemaField = outputSchema.getField(fieldName);
+
+            // if given schema does contain field then validated fieldName type
+            if (schemaField != null) {
+
+                final List<Schema> schemas = new LinkedList<>();
+
+                // if it is a union type then grab all union schemas
+                if (outputSchema.getField(fieldName).getSchema().getType() == Schema.Type.UNION) {
+                    final List<Schema> unionFieldSchemas =
+                            outputSchema.getField(fieldName).getSchema().getUnionSchemas();
+                    schemas.addAll(unionFieldSchemas);
+                } else {
+                    // if not union type the just get the field schema
+                    final Schema fieldSchema = outputSchema.getField(fieldName).getSchema();
+                    schemas.add(fieldSchema);
+                }
+
+                // get all schema types
+                final List<Schema.Type> fieldTypes =
+                        Lists.transform(schemas, CDAPPluginUtils.SCHEMA_TO_TYPE_FUNCTION);
+
+                // if all schema types does not contain expected field type then return false
+                if (!fieldTypes.contains(expectedFieldType)) {
+                    LOG.error("Validation failed for fieldName: {} is NOT of expected Type: {} in schema: {}",
+                            fieldName, expectedFieldType, outputSchema);
+                    return false;
+                }
+
+                // field type validation passed
+                LOG.debug("Successfully validated fieldName: {} is of expected Type: {}",
+                        fieldName, expectedFieldType);
+
+                return true;
+
+            } else {
+
+                // if field does not exist then the validation will pass but will generate warning message
+                LOG.warn("Validation of field type not possible. Field name: {} does not exist in schema: {}",
+                        fieldName, outputSchema);
+                return true;
+            }
+
+        } catch (IOException e) {
+            final String errorMessage =
+                    String.format("Unable to parse schema: %s for field type validation. " +
+                                    "Field Name: %s, Expected Field Type: %s Exception: %s",
+                            schemaString, fieldName, expectedFieldType, e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+    }
+
+
+    /**
+     * Parses provided schema String as Schema object and set it as output Schema format
+     *
+     * @param pipelineConfigurer plugin pipeline configurer
+     * @param schemaString schema String to be set as output schema
+     */
+    public static void setOutputSchema(final PipelineConfigurer pipelineConfigurer, final String schemaString) {
+        try {
+            final Schema outputSchema = Schema.parseJson(schemaString);
+            pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema);
+        } catch (IOException e) {
+            final String errorMessage = String.format(
+                    "Schema specified is not a valid JSON. Schema String: %s, Exception: %s", schemaString, e);
+            throw new CDAPSettingsException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+    }
+
+
+    /**
+     * Parses incoming plugin config mapping to key value map. If any of the key value map is blank an Illegal Argument
+     * exception will be thrown
+     *
+     * @param mappingFieldString field Mapping String
+     *
+     * @return map containing mapping key values
+     */
+    public static Map<String, String> extractFieldMappings(final String mappingFieldString) {
+        final Map<String, String> fieldMappings = Maps.newHashMap();
+        if (StringUtils.isNotBlank(mappingFieldString)) {
+            final Splitter commaSplitter = Splitter.on(",");
+            for (String fieldMapping : commaSplitter.split(mappingFieldString)) {
+                final String[] keyValueMappings = fieldMapping.split(":");
+                if (keyValueMappings.length != 2 ||
+                        StringUtils.isBlank(keyValueMappings[0]) ||
+                        StringUtils.isBlank(keyValueMappings[1])) {
+                    final String errorMessage = "Field Mapping key or value is Blank. All field mappings must " +
+                            "be present in mappings: " + mappingFieldString;
+                    throw new DCAEAnalyticsRuntimeException(
+                            errorMessage, LOG, new IllegalArgumentException(errorMessage));
+                }
+                fieldMappings.put(keyValueMappings[0].trim(), keyValueMappings[1].trim());
+            }
+        }
+        return fieldMappings;
+    }
+
+
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.utils;\r
-\r
-import com.google.common.base.Function;\r
-import org.apache.hadoop.conf.Configuration;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;\r
-\r
-/**\r
- * Function that converts {@link Configuration} to {@link DMaaPMRPublisherConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/26/2017.\r
- */\r
-public class DMaaPSinkConfigMapper implements Function<Configuration, DMaaPMRPublisherConfig> {\r
-\r
-    /**\r
-     * Static method to map {@link Configuration} to {@link DMaaPMRPublisherConfig}\r
-     *\r
-     * @param sinkPluginConfig DMaaP Sink Plugin Config\r
-     *\r
-     * @return DMaaP MR Publisher Config\r
-     */\r
-    public static DMaaPMRPublisherConfig map(final Configuration sinkPluginConfig) {\r
-        return new DMaaPSinkConfigMapper().apply(sinkPluginConfig);\r
-    }\r
-\r
-    /**\r
-     * Converts {@link Configuration} to {@link DMaaPMRPublisherConfig}\r
-     *\r
-     * @param configuration Hadoop Configuration containing DMaaP MR Sink field values\r
-     *\r
-     * @return DMaaP MR Publisher Config\r
-     */\r
-    @Nonnull\r
-    @Override\r
-    public DMaaPMRPublisherConfig apply(@Nonnull Configuration configuration) {\r
-\r
-        // Create a new publisher settings builder\r
-        final String hostName = configuration.get(DMaaPMRSinkHadoopConfigFields.HOST_NAME);\r
-        final String topicName = configuration.get(DMaaPMRSinkHadoopConfigFields.TOPIC_NAME);\r
-\r
-        if (isEmpty(hostName) || isEmpty(topicName)) {\r
-            throw new IllegalStateException("DMaaP MR Sink Host Name and Topic Name must be present");\r
-        }\r
-\r
-        final DMaaPMRPublisherConfig.Builder publisherConfigBuilder =\r
-                new DMaaPMRPublisherConfig.Builder(hostName, topicName);\r
-\r
-        // Setup up any optional publisher parameters if they are present\r
-        final String portNumber = configuration.get(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER);\r
-        if (portNumber != null) {\r
-            publisherConfigBuilder.setPortNumber(Integer.parseInt(portNumber));\r
-        }\r
-\r
-        final String protocol = configuration.get(DMaaPMRSinkHadoopConfigFields.PROTOCOL);\r
-        if (isPresent(protocol)) {\r
-            publisherConfigBuilder.setProtocol(protocol);\r
-        }\r
-\r
-        final String userName = configuration.get(DMaaPMRSinkHadoopConfigFields.USER_NAME);\r
-        if (isPresent(userName)) {\r
-            publisherConfigBuilder.setUserName(userName);\r
-        }\r
-\r
-        final String userPassword = configuration.get(DMaaPMRSinkHadoopConfigFields.USER_PASS);\r
-        if (isPresent(userPassword)) {\r
-            publisherConfigBuilder.setUserPassword(userPassword);\r
-        }\r
-\r
-        final String contentType = configuration.get(DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE);\r
-        if (isPresent(contentType)) {\r
-            publisherConfigBuilder.setContentType(contentType);\r
-        }\r
-\r
-        final String maxBatchSize = configuration.get(DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE);\r
-        if (maxBatchSize != null) {\r
-            publisherConfigBuilder.setMaxBatchSize(Integer.parseInt(maxBatchSize));\r
-        }\r
-\r
-        final String maxRecoveryQueueSize = configuration.get(DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE);\r
-        if (maxRecoveryQueueSize != null) {\r
-            publisherConfigBuilder.setMaxRecoveryQueueSize(Integer.parseInt(maxRecoveryQueueSize));\r
-        }\r
-\r
-        return publisherConfigBuilder.build();\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.utils;
+
+import com.google.common.base.Function;
+import org.apache.hadoop.conf.Configuration;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+
+import javax.annotation.Nonnull;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;
+
+/**
+ * Function that converts {@link Configuration} to {@link DMaaPMRPublisherConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/26/2017.
+ */
+public class DMaaPSinkConfigMapper implements Function<Configuration, DMaaPMRPublisherConfig> {
+
+    /**
+     * Static method to map {@link Configuration} to {@link DMaaPMRPublisherConfig}
+     *
+     * @param sinkPluginConfig DMaaP Sink Plugin Config
+     *
+     * @return DMaaP MR Publisher Config
+     */
+    public static DMaaPMRPublisherConfig map(final Configuration sinkPluginConfig) {
+        return new DMaaPSinkConfigMapper().apply(sinkPluginConfig);
+    }
+
+    /**
+     * Converts {@link Configuration} to {@link DMaaPMRPublisherConfig}
+     *
+     * @param configuration Hadoop Configuration containing DMaaP MR Sink field values
+     *
+     * @return DMaaP MR Publisher Config
+     */
+    @Nonnull
+    @Override
+    public DMaaPMRPublisherConfig apply(@Nonnull Configuration configuration) {
+
+        // Create a new publisher settings builder
+        final String hostName = configuration.get(DMaaPMRSinkHadoopConfigFields.HOST_NAME);
+        final String topicName = configuration.get(DMaaPMRSinkHadoopConfigFields.TOPIC_NAME);
+
+        if (isEmpty(hostName) || isEmpty(topicName)) {
+            throw new IllegalStateException("DMaaP MR Sink Host Name and Topic Name must be present");
+        }
+
+        final DMaaPMRPublisherConfig.Builder publisherConfigBuilder =
+                new DMaaPMRPublisherConfig.Builder(hostName, topicName);
+
+        // Setup up any optional publisher parameters if they are present
+        final String portNumber = configuration.get(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER);
+        if (portNumber != null) {
+            publisherConfigBuilder.setPortNumber(Integer.parseInt(portNumber));
+        }
+
+        final String protocol = configuration.get(DMaaPMRSinkHadoopConfigFields.PROTOCOL);
+        if (isPresent(protocol)) {
+            publisherConfigBuilder.setProtocol(protocol);
+        }
+
+        final String userName = configuration.get(DMaaPMRSinkHadoopConfigFields.USER_NAME);
+        if (isPresent(userName)) {
+            publisherConfigBuilder.setUserName(userName);
+        }
+
+        final String userPassword = configuration.get(DMaaPMRSinkHadoopConfigFields.USER_PASS);
+        if (isPresent(userPassword)) {
+            publisherConfigBuilder.setUserPassword(userPassword);
+        }
+
+        final String contentType = configuration.get(DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE);
+        if (isPresent(contentType)) {
+            publisherConfigBuilder.setContentType(contentType);
+        }
+
+        final String maxBatchSize = configuration.get(DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE);
+        if (maxBatchSize != null) {
+            publisherConfigBuilder.setMaxBatchSize(Integer.parseInt(maxBatchSize));
+        }
+
+        final String maxRecoveryQueueSize = configuration.get(DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE);
+        if (maxRecoveryQueueSize != null) {
+            publisherConfigBuilder.setMaxRecoveryQueueSize(Integer.parseInt(maxRecoveryQueueSize));
+        }
+
+        return publisherConfigBuilder.build();
+
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.utils;\r
-\r
-import com.google.common.base.Function;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;\r
-\r
-/**\r
- * Function that converts {@link DMaaPMRSourcePluginConfig} to {@link DMaaPMRSubscriberConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/18/2017.\r
- */\r
-public class DMaaPSourceConfigMapper implements Function<DMaaPMRSourcePluginConfig, DMaaPMRSubscriberConfig> {\r
-\r
-    /**\r
-     * Static factory method to map {@link DMaaPMRSourcePluginConfig} to {@link DMaaPMRSubscriberConfig}\r
-     *\r
-     * @param pluginConfig DMaaP MR Souce Plugin Config\r
-     *\r
-     * @return DMaaP MR Subscriber Config\r
-     */\r
-    public static DMaaPMRSubscriberConfig map(final DMaaPMRSourcePluginConfig pluginConfig) {\r
-        return new DMaaPSourceConfigMapper().apply(pluginConfig);\r
-    }\r
-\r
-    /**\r
-     * Converts {@link DMaaPMRSourcePluginConfig} to {@link DMaaPMRSubscriberConfig} object\r
-     *\r
-     * @param sourcePluginConfig DMaaP MR Source Plugin Config\r
-     *\r
-     * @return DMaaP MR Subscriber Config\r
-     */\r
-    @Nonnull\r
-    @Override\r
-    public DMaaPMRSubscriberConfig apply(@Nonnull DMaaPMRSourcePluginConfig sourcePluginConfig) {\r
-\r
-        // Create a new subscriber settings builder\r
-        final String hostName = sourcePluginConfig.getHostName();\r
-        final String topicName = sourcePluginConfig.getTopicName();\r
-        if (isEmpty(hostName) || isEmpty(topicName)) {\r
-            throw new IllegalStateException("DMaaP MR Source Host Name and Topic Name must be present");\r
-        }\r
-        final DMaaPMRSubscriberConfig.Builder subscriberConfigBuilder = new DMaaPMRSubscriberConfig.Builder(\r
-                hostName, topicName);\r
-\r
-        // Setup up any optional subscriber parameters if they are present\r
-        final Integer subscriberHostPortNumber = sourcePluginConfig.getPortNumber();\r
-        if (subscriberHostPortNumber != null) {\r
-            subscriberConfigBuilder.setPortNumber(subscriberHostPortNumber);\r
-        }\r
-\r
-        final String subscriberProtocol = sourcePluginConfig.getProtocol();\r
-        if (isPresent(subscriberProtocol)) {\r
-            subscriberConfigBuilder.setProtocol(subscriberProtocol);\r
-        }\r
-\r
-        final String subscriberUserName = sourcePluginConfig.getUserName();\r
-        if (isPresent(subscriberUserName)) {\r
-            subscriberConfigBuilder.setUserName(subscriberUserName);\r
-        }\r
-\r
-        final String subscriberUserPassword = sourcePluginConfig.getUserPassword();\r
-        if (isPresent(subscriberUserPassword)) {\r
-            subscriberConfigBuilder.setUserPassword(subscriberUserPassword);\r
-        }\r
-\r
-        final String subscriberContentType = sourcePluginConfig.getContentType();\r
-        if (isPresent(subscriberContentType)) {\r
-            subscriberConfigBuilder.setContentType(subscriberContentType);\r
-        }\r
-\r
-        final String subscriberConsumerId = sourcePluginConfig.getConsumerId();\r
-        if (isPresent(subscriberConsumerId)) {\r
-            subscriberConfigBuilder.setConsumerId(subscriberConsumerId);\r
-        }\r
-\r
-        final String subscriberConsumerGroup = sourcePluginConfig.getConsumerGroup();\r
-        if (isPresent(subscriberConsumerGroup)) {\r
-            subscriberConfigBuilder.setConsumerGroup(subscriberConsumerGroup);\r
-        }\r
-\r
-        final Integer subscriberTimeoutMS = sourcePluginConfig.getTimeoutMS();\r
-        if (subscriberTimeoutMS != null) {\r
-            subscriberConfigBuilder.setTimeoutMS(subscriberTimeoutMS);\r
-        }\r
-        final Integer subscriberMessageLimit = sourcePluginConfig.getMessageLimit();\r
-        if (subscriberMessageLimit != null) {\r
-            subscriberConfigBuilder.setMessageLimit(subscriberMessageLimit);\r
-        }\r
-\r
-        // return Subscriber config\r
-        return subscriberConfigBuilder.build();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.utils;
+
+import com.google.common.base.Function;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+
+import javax.annotation.Nonnull;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;
+
+/**
+ * Function that converts {@link DMaaPMRSourcePluginConfig} to {@link DMaaPMRSubscriberConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/18/2017.
+ */
+public class DMaaPSourceConfigMapper implements Function<DMaaPMRSourcePluginConfig, DMaaPMRSubscriberConfig> {
+
+    /**
+     * Static factory method to map {@link DMaaPMRSourcePluginConfig} to {@link DMaaPMRSubscriberConfig}
+     *
+     * @param pluginConfig DMaaP MR Souce Plugin Config
+     *
+     * @return DMaaP MR Subscriber Config
+     */
+    public static DMaaPMRSubscriberConfig map(final DMaaPMRSourcePluginConfig pluginConfig) {
+        return new DMaaPSourceConfigMapper().apply(pluginConfig);
+    }
+
+    /**
+     * Converts {@link DMaaPMRSourcePluginConfig} to {@link DMaaPMRSubscriberConfig} object
+     *
+     * @param sourcePluginConfig DMaaP MR Source Plugin Config
+     *
+     * @return DMaaP MR Subscriber Config
+     */
+    @Nonnull
+    @Override
+    public DMaaPMRSubscriberConfig apply(@Nonnull DMaaPMRSourcePluginConfig sourcePluginConfig) {
+
+        // Create a new subscriber settings builder
+        final String hostName = sourcePluginConfig.getHostName();
+        final String topicName = sourcePluginConfig.getTopicName();
+        if (isEmpty(hostName) || isEmpty(topicName)) {
+            throw new IllegalStateException("DMaaP MR Source Host Name and Topic Name must be present");
+        }
+        final DMaaPMRSubscriberConfig.Builder subscriberConfigBuilder = new DMaaPMRSubscriberConfig.Builder(
+                hostName, topicName);
+
+        // Setup up any optional subscriber parameters if they are present
+        final Integer subscriberHostPortNumber = sourcePluginConfig.getPortNumber();
+        if (subscriberHostPortNumber != null) {
+            subscriberConfigBuilder.setPortNumber(subscriberHostPortNumber);
+        }
+
+        final String subscriberProtocol = sourcePluginConfig.getProtocol();
+        if (isPresent(subscriberProtocol)) {
+            subscriberConfigBuilder.setProtocol(subscriberProtocol);
+        }
+
+        final String subscriberUserName = sourcePluginConfig.getUserName();
+        if (isPresent(subscriberUserName)) {
+            subscriberConfigBuilder.setUserName(subscriberUserName);
+        }
+
+        final String subscriberUserPassword = sourcePluginConfig.getUserPassword();
+        if (isPresent(subscriberUserPassword)) {
+            subscriberConfigBuilder.setUserPassword(subscriberUserPassword);
+        }
+
+        final String subscriberContentType = sourcePluginConfig.getContentType();
+        if (isPresent(subscriberContentType)) {
+            subscriberConfigBuilder.setContentType(subscriberContentType);
+        }
+
+        final String subscriberConsumerId = sourcePluginConfig.getConsumerId();
+        if (isPresent(subscriberConsumerId)) {
+            subscriberConfigBuilder.setConsumerId(subscriberConsumerId);
+        }
+
+        final String subscriberConsumerGroup = sourcePluginConfig.getConsumerGroup();
+        if (isPresent(subscriberConsumerGroup)) {
+            subscriberConfigBuilder.setConsumerGroup(subscriberConsumerGroup);
+        }
+
+        final Integer subscriberTimeoutMS = sourcePluginConfig.getTimeoutMS();
+        if (subscriberTimeoutMS != null) {
+            subscriberConfigBuilder.setTimeoutMS(subscriberTimeoutMS);
+        }
+        final Integer subscriberMessageLimit = sourcePluginConfig.getMessageLimit();
+        if (subscriberMessageLimit != null) {
+            subscriberConfigBuilder.setMessageLimit(subscriberMessageLimit);
+        }
+
+        // return Subscriber config
+        return subscriberConfigBuilder.build();
+    }
+}
@@ -1,72 +1,72 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.BaseDMaaPMRPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-/**\r
- * Validates plugin config values which are common in DMaaP MR Configs - {@link BaseDMaaPMRPluginConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/23/2017.\r
- *\r
- * @param <T> {@link BaseDMaaPMRPluginConfig} Sub classes\r
- */\r
-public abstract class BaseDMaaPMRPluginConfigValidator<T extends BaseDMaaPMRPluginConfig> implements\r
-        CDAPAppSettingsValidator<T, GenericValidationResponse<T>> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Validates the {@link BaseDMaaPMRPluginConfig} parameters\r
-     *\r
-     * @param baseDMaaPMRPluginConfig DMaaP MR Plugin Config\r
-     *\r
-     * @return Validation Response containing validation errors if any\r
-     */\r
-    @Override\r
-    public GenericValidationResponse<T> validateAppSettings(final T baseDMaaPMRPluginConfig) {\r
-\r
-        final GenericValidationResponse<T> validationResponse = new GenericValidationResponse<>();\r
-\r
-        if (ValidationUtils.isEmpty(baseDMaaPMRPluginConfig.getHostName())) {\r
-            validationResponse.addErrorMessage(\r
-                    "hostName",\r
-                    "DMaaPMRPluginConfig - hostname field is undefined: " + baseDMaaPMRPluginConfig);\r
-        }\r
-\r
-        if (baseDMaaPMRPluginConfig.getPortNumber() == null) {\r
-            validationResponse.addErrorMessage(\r
-                    "port Number",\r
-                    "DMaaPMRPluginConfig - host port number field is undefined: " + baseDMaaPMRPluginConfig);\r
-        }\r
-\r
-        if (ValidationUtils.isEmpty(baseDMaaPMRPluginConfig.getTopicName())) {\r
-            validationResponse.addErrorMessage(\r
-                    "topic Name",\r
-                    "DMaaPMRSourcePluginConfig - topic name field is undefined: " + baseDMaaPMRPluginConfig);\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.BaseDMaaPMRPluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+/**
+ * Validates plugin config values which are common in DMaaP MR Configs - {@link BaseDMaaPMRPluginConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/23/2017.
+ *
+ * @param <T> {@link BaseDMaaPMRPluginConfig} Sub classes
+ */
+public abstract class BaseDMaaPMRPluginConfigValidator<T extends BaseDMaaPMRPluginConfig> implements
+        CDAPAppSettingsValidator<T, GenericValidationResponse<T>> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Validates the {@link BaseDMaaPMRPluginConfig} parameters
+     *
+     * @param baseDMaaPMRPluginConfig DMaaP MR Plugin Config
+     *
+     * @return Validation Response containing validation errors if any
+     */
+    @Override
+    public GenericValidationResponse<T> validateAppSettings(final T baseDMaaPMRPluginConfig) {
+
+        final GenericValidationResponse<T> validationResponse = new GenericValidationResponse<>();
+
+        if (ValidationUtils.isEmpty(baseDMaaPMRPluginConfig.getHostName())) {
+            validationResponse.addErrorMessage(
+                    "hostName",
+                    "DMaaPMRPluginConfig - hostname field is undefined: " + baseDMaaPMRPluginConfig);
+        }
+
+        if (baseDMaaPMRPluginConfig.getPortNumber() == null) {
+            validationResponse.addErrorMessage(
+                    "port Number",
+                    "DMaaPMRPluginConfig - host port number field is undefined: " + baseDMaaPMRPluginConfig);
+        }
+
+        if (ValidationUtils.isEmpty(baseDMaaPMRPluginConfig.getTopicName())) {
+            validationResponse.addErrorMessage(
+                    "topic Name",
+                    "DMaaPMRSourcePluginConfig - topic name field is undefined: " + baseDMaaPMRPluginConfig);
+        }
+
+        return validationResponse;
+    }
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-/**\r
- * Validates plugin config values in {@link DMaaPMRSinkPluginConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMRSinkPluginConfigValidator extends BaseDMaaPMRPluginConfigValidator<DMaaPMRSinkPluginConfig> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Validates plugin config values in {@link DMaaPMRSinkPluginConfig}\r
-     *\r
-     * @param sinkPluginConfig Sink Plugin Config\r
-     *\r
-     * @return Validation response containing validation errors if any\r
-     */\r
-    @Override\r
-    public GenericValidationResponse<DMaaPMRSinkPluginConfig> validateAppSettings(\r
-            final DMaaPMRSinkPluginConfig sinkPluginConfig) {\r
-\r
-        // validate settings in BaseDMaaPMRPluginConfig\r
-        final GenericValidationResponse<DMaaPMRSinkPluginConfig> validationResponse =\r
-                super.validateAppSettings(sinkPluginConfig);\r
-\r
-        if (ValidationUtils.isEmpty(sinkPluginConfig.getMessageColumnName())) {\r
-            validationResponse.addErrorMessage("messageColumn Name",\r
-                    "DMaaPMRSinkPluginConfig - message column name field is undefined: " + sinkPluginConfig);\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+/**
+ * Validates plugin config values in {@link DMaaPMRSinkPluginConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMRSinkPluginConfigValidator extends BaseDMaaPMRPluginConfigValidator<DMaaPMRSinkPluginConfig> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Validates plugin config values in {@link DMaaPMRSinkPluginConfig}
+     *
+     * @param sinkPluginConfig Sink Plugin Config
+     *
+     * @return Validation response containing validation errors if any
+     */
+    @Override
+    public GenericValidationResponse<DMaaPMRSinkPluginConfig> validateAppSettings(
+            final DMaaPMRSinkPluginConfig sinkPluginConfig) {
+
+        // validate settings in BaseDMaaPMRPluginConfig
+        final GenericValidationResponse<DMaaPMRSinkPluginConfig> validationResponse =
+                super.validateAppSettings(sinkPluginConfig);
+
+        if (ValidationUtils.isEmpty(sinkPluginConfig.getMessageColumnName())) {
+            validationResponse.addErrorMessage("messageColumn Name",
+                    "DMaaPMRSinkPluginConfig - message column name field is undefined: " + sinkPluginConfig);
+        }
+
+        return validationResponse;
+    }
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-/**\r
- * Validates plugin config values in {@link DMaaPMRSourcePluginConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMRSourcePluginConfigValidator extends BaseDMaaPMRPluginConfigValidator<DMaaPMRSourcePluginConfig> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Validates plugin config values in {@link DMaaPMRSourcePluginConfig}\r
-     *\r
-     * @param sourcePluginConfig Source Plugin Config\r
-     *\r
-     * @return Validation response containing validation errors if any\r
-     */\r
-    @Override\r
-    public GenericValidationResponse<DMaaPMRSourcePluginConfig> validateAppSettings(\r
-            final DMaaPMRSourcePluginConfig sourcePluginConfig) {\r
-\r
-        // validate settings in BaseDMaaPMRPluginConfig\r
-        final GenericValidationResponse<DMaaPMRSourcePluginConfig> validationResponse =\r
-                super.validateAppSettings(sourcePluginConfig);\r
-\r
-        if (sourcePluginConfig.getPollingInterval() == null) {\r
-            validationResponse.addErrorMessage(\r
-                    "port Number",\r
-                    "DMaaPMRSourcePluginConfig - polling interval is undefined: " + sourcePluginConfig);\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+/**
+ * Validates plugin config values in {@link DMaaPMRSourcePluginConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMRSourcePluginConfigValidator extends BaseDMaaPMRPluginConfigValidator<DMaaPMRSourcePluginConfig> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Validates plugin config values in {@link DMaaPMRSourcePluginConfig}
+     *
+     * @param sourcePluginConfig Source Plugin Config
+     *
+     * @return Validation response containing validation errors if any
+     */
+    @Override
+    public GenericValidationResponse<DMaaPMRSourcePluginConfig> validateAppSettings(
+            final DMaaPMRSourcePluginConfig sourcePluginConfig) {
+
+        // validate settings in BaseDMaaPMRPluginConfig
+        final GenericValidationResponse<DMaaPMRSourcePluginConfig> validationResponse =
+                super.validateAppSettings(sourcePluginConfig);
+
+        if (sourcePluginConfig.getPollingInterval() == null) {
+            validationResponse.addErrorMessage(
+                    "port Number",
+                    "DMaaPMRSourcePluginConfig - polling interval is undefined: " + sourcePluginConfig);
+        }
+
+        return validationResponse;
+    }
+}
@@ -1,83 +1,83 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter.JsonPathFilterPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-/**\r
- * Validator to validate {@link JsonPathFilterPluginConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 3/2/2017.\r
- */\r
-public class JsonPathFilterPluginConfigValidator implements CDAPAppSettingsValidator<JsonPathFilterPluginConfig,\r
-        GenericValidationResponse<JsonPathFilterPluginConfig>> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public GenericValidationResponse<JsonPathFilterPluginConfig> validateAppSettings(\r
-            final JsonPathFilterPluginConfig jsonPathFilterPluginConfig) {\r
-\r
-        final GenericValidationResponse<JsonPathFilterPluginConfig> validationResponse =\r
-                new GenericValidationResponse<>();\r
-\r
-        final String jsonFilterMappings = jsonPathFilterPluginConfig.getJsonFilterMappings();\r
-        if (ValidationUtils.isEmpty(jsonFilterMappings)) {\r
-\r
-            validationResponse.addErrorMessage("JsonFilterMappings", "Json Filter Mappings must be present");\r
-        }\r
-\r
-\r
-        final String matchedField = jsonPathFilterPluginConfig.getOutputSchemaFieldName();\r
-        final String outputSchemaJson = jsonPathFilterPluginConfig.getSchema();\r
-\r
-        if (ValidationUtils.isEmpty(outputSchemaJson)) {\r
-\r
-            validationResponse.addErrorMessage("output schema", "Output schema is not present");\r
-\r
-        } else {\r
-\r
-            // validate matched output field type is boolean\r
-            if (matchedField != null &&\r
-                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, matchedField, Schema.Type.BOOLEAN)) {\r
-                validationResponse.addErrorMessage("OutputSchemaFieldName",\r
-                        String.format(\r
-                                "OutputSchemaFieldName: %s must be marked as boolean type", matchedField));\r
-            }\r
-\r
-            // validate matched output field type is nullable\r
-            if (matchedField != null &&\r
-                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, matchedField, Schema.Type.NULL)) {\r
-                validationResponse.addErrorMessage("OutputSchemaFieldName",\r
-                        String.format(\r
-                                "OutputSchemaFieldName: %s must be marked as nullable type", matchedField));\r
-            }\r
-\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import co.cask.cdap.api.data.schema.Schema;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter.JsonPathFilterPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+/**
+ * Validator to validate {@link JsonPathFilterPluginConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 3/2/2017.
+ */
+public class JsonPathFilterPluginConfigValidator implements CDAPAppSettingsValidator<JsonPathFilterPluginConfig,
+        GenericValidationResponse<JsonPathFilterPluginConfig>> {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public GenericValidationResponse<JsonPathFilterPluginConfig> validateAppSettings(
+            final JsonPathFilterPluginConfig jsonPathFilterPluginConfig) {
+
+        final GenericValidationResponse<JsonPathFilterPluginConfig> validationResponse =
+                new GenericValidationResponse<>();
+
+        final String jsonFilterMappings = jsonPathFilterPluginConfig.getJsonFilterMappings();
+        if (ValidationUtils.isEmpty(jsonFilterMappings)) {
+
+            validationResponse.addErrorMessage("JsonFilterMappings", "Json Filter Mappings must be present");
+        }
+
+
+        final String matchedField = jsonPathFilterPluginConfig.getOutputSchemaFieldName();
+        final String outputSchemaJson = jsonPathFilterPluginConfig.getSchema();
+
+        if (ValidationUtils.isEmpty(outputSchemaJson)) {
+
+            validationResponse.addErrorMessage("output schema", "Output schema is not present");
+
+        } else {
+
+            // validate matched output field type is boolean
+            if (matchedField != null &&
+                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, matchedField, Schema.Type.BOOLEAN)) {
+                validationResponse.addErrorMessage("OutputSchemaFieldName",
+                        String.format(
+                                "OutputSchemaFieldName: %s must be marked as boolean type", matchedField));
+            }
+
+            // validate matched output field type is nullable
+            if (matchedField != null &&
+                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, matchedField, Schema.Type.NULL)) {
+                validationResponse.addErrorMessage("OutputSchemaFieldName",
+                        String.format(
+                                "OutputSchemaFieldName: %s must be marked as nullable type", matchedField));
+            }
+
+        }
+
+        return validationResponse;
+    }
+}
@@ -1,91 +1,91 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-/**\r
- * Validator that validate {@link SimpleTCAPluginConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 2/21/2017.\r
- */\r
-public class SimpleTCAPluginConfigValidator implements CDAPAppSettingsValidator<SimpleTCAPluginConfig,\r
-        GenericValidationResponse<SimpleTCAPluginConfig>> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public GenericValidationResponse<SimpleTCAPluginConfig> validateAppSettings(\r
-            final SimpleTCAPluginConfig tcaPluginConfig) {\r
-\r
-        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse = new GenericValidationResponse<>();\r
-\r
-        if (ValidationUtils.isEmpty(tcaPluginConfig.getVesMessageFieldName())) {\r
-            validationResponse.addErrorMessage("vesMessageFieldName",\r
-                    "Missing VES Message Field Name from plugin incoming schema");\r
-        }\r
-\r
-        if (ValidationUtils.isEmpty(tcaPluginConfig.getPolicyJson())) {\r
-            validationResponse.addErrorMessage("policyJson",\r
-                    "Missing tca Policy Json");\r
-        }\r
-\r
-        final String alertFieldValue = tcaPluginConfig.getAlertFieldName();\r
-        final String alertFieldName = "alertFieldName";\r
-        if (ValidationUtils.isEmpty(alertFieldValue)) {\r
-            validationResponse.addErrorMessage(alertFieldName,\r
-                    "Missing alert Field Name that will be placed in plugin outgoing schema");\r
-        }\r
-\r
-        if (ValidationUtils.isEmpty(tcaPluginConfig.getMessageTypeFieldName())) {\r
-            validationResponse.addErrorMessage("messageTypeField",\r
-                    "Missing message Type Field Name that will be placed in plugin outgoing schema");\r
-        }\r
-\r
-\r
-        final String outputSchemaJson = tcaPluginConfig.getSchema();\r
-        if (ValidationUtils.isEmpty(outputSchemaJson)) {\r
-            validationResponse.addErrorMessage("output schema", "Output schema is not present");\r
-        } else {\r
-            // validate output schema - alert field name is of type string\r
-            if (alertFieldValue != null &&\r
-                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, alertFieldValue, Schema.Type.STRING)) {\r
-                validationResponse.addErrorMessage(alertFieldName,\r
-                        String.format(\r
-                                "Alert Field Name: %s must be String type", alertFieldValue));\r
-            }\r
-            // validate output schema - alert field name is nullable\r
-            if (alertFieldValue != null &&\r
-                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, alertFieldValue, Schema.Type.NULL)) {\r
-                validationResponse.addErrorMessage(alertFieldName,\r
-                        String.format(\r
-                                "Alert Field Name: %s must be marked as nullable type", alertFieldValue));\r
-            }\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import co.cask.cdap.api.data.schema.Schema;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+/**
+ * Validator that validate {@link SimpleTCAPluginConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 2/21/2017.
+ */
+public class SimpleTCAPluginConfigValidator implements CDAPAppSettingsValidator<SimpleTCAPluginConfig,
+        GenericValidationResponse<SimpleTCAPluginConfig>> {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public GenericValidationResponse<SimpleTCAPluginConfig> validateAppSettings(
+            final SimpleTCAPluginConfig tcaPluginConfig) {
+
+        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse = new GenericValidationResponse<>();
+
+        if (ValidationUtils.isEmpty(tcaPluginConfig.getVesMessageFieldName())) {
+            validationResponse.addErrorMessage("vesMessageFieldName",
+                    "Missing VES Message Field Name from plugin incoming schema");
+        }
+
+        if (ValidationUtils.isEmpty(tcaPluginConfig.getPolicyJson())) {
+            validationResponse.addErrorMessage("policyJson",
+                    "Missing tca Policy Json");
+        }
+
+        final String alertFieldValue = tcaPluginConfig.getAlertFieldName();
+        final String alertFieldName = "alertFieldName";
+        if (ValidationUtils.isEmpty(alertFieldValue)) {
+            validationResponse.addErrorMessage(alertFieldName,
+                    "Missing alert Field Name that will be placed in plugin outgoing schema");
+        }
+
+        if (ValidationUtils.isEmpty(tcaPluginConfig.getMessageTypeFieldName())) {
+            validationResponse.addErrorMessage("messageTypeField",
+                    "Missing message Type Field Name that will be placed in plugin outgoing schema");
+        }
+
+
+        final String outputSchemaJson = tcaPluginConfig.getSchema();
+        if (ValidationUtils.isEmpty(outputSchemaJson)) {
+            validationResponse.addErrorMessage("output schema", "Output schema is not present");
+        } else {
+            // validate output schema - alert field name is of type string
+            if (alertFieldValue != null &&
+                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, alertFieldValue, Schema.Type.STRING)) {
+                validationResponse.addErrorMessage(alertFieldName,
+                        String.format(
+                                "Alert Field Name: %s must be String type", alertFieldValue));
+            }
+            // validate output schema - alert field name is nullable
+            if (alertFieldValue != null &&
+                    !CDAPPluginUtils.validateSchemaFieldType(outputSchemaJson, alertFieldValue, Schema.Type.NULL)) {
+                validationResponse.addErrorMessage(alertFieldName,
+                        String.format(
+                                "Alert Field Name: %s must be marked as nullable type", alertFieldValue));
+            }
+        }
+
+        return validationResponse;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.StageMetrics;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.apache.hadoop.conf.Configuration;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPPluginConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter.TestJsonPathFilterPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.TestSimpleTCAPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-import java.io.IOException;\r
-import java.io.Serializable;\r
-import java.util.LinkedHashMap;\r
-import java.util.Map;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/23/2017.\r
- */\r
-public abstract class BaseAnalyticsCDAPPluginsUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =\r
-            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();\r
-\r
-    protected static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";\r
-    protected static final String CEF_MESSAGE_JSON_FILE_LOCATION = "data/json/cef/cef_message.json";\r
-    protected static final String CEF_NON_COMPLIANT_MESSAGE_JSON_FILE_LOCATION =\r
-            "data/json/cef/cef_message_with_threshold_violation.json";\r
-\r
-\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME = "testDMaaPMRSource";\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_HOST_NAME = "dcae-msrt-mtl1-ftl.homer.com";\r
-    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER = 3905;\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME = "com.dcae.dmaap.FTL.DcaeTestVESSub";\r
-    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL = 1000;\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_PROTOCOL = "https";\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_USERNAME = "username";\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_PASSWORD = "password";\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE = "application/json";\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP = "G1";\r
-    protected static final String DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID = "C1";\r
-    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT = 100;\r
-    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_TIMEOUT = 10000;\r
-\r
-\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME = "testDMaaPMRSINK";\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_HOST_NAME = "dcae-msrt-mtl1-ftl.homer.com";\r
-    protected static final Integer DMAAP_MR_SINK_PLUGIN_PORT_NUMBER = 3905;\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_TOPIC_NAME = "com.dcae.dmaap.FTL.DcaeTestVESPub";\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_PROTOCOL = "https";\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_USERNAME = "username";\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_PASSWORD = "password";\r
-    protected static final String DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE = "application/json";\r
-    protected static final String DMAAP_MR_SINK_MESSAGE_COLUMN_NAME = "message";\r
-    protected static final Integer DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE = 10;\r
-    protected static final Integer DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE = 100;\r
-\r
-    protected static final String VES_MESSAGE_FIELD_NAME = "message";\r
-    protected static final String TCA_PLUGIN_ALERT_FIELD_NAME = "alert";\r
-    protected static final String TCA_PLUGIN_MESSAGE_TYPE_FIELD_NAME = "tcaMessageType";\r
-\r
-\r
-    protected static final String JSON_PATH_FILTER_PLUGIN_REFERENCE_NAME = "JsonPathFilter";\r
-    protected static final String JSON_PATH_FILTER_PLUGIN_INCOMING_JSON_FIELD_NAME = "message";\r
-    protected static final String JSON_PATH_FILTER_PLUGIN_OUTPUT_SCHEMA_FILED_NAME = "filterMatched";\r
-    protected static final String JSON_PATH_FILTER_PLUGIN_JSON_FILTER_MAPPINGS =\r
-            "$.event.commonEventHeader.domain:measurementsForVfScaling," +\r
-                    "$.event.commonEventHeader.eventName:vLoadBalancer;vFirewall";\r
-    protected static final String JSON_PATH_FILTER_PLUGIN_JSON_FILTER_OUTPUT_SCHEMA =\r
-            "{\"type\":\"record\"," +\r
-                    "\"name\":\"etlSchemaBody\",\"fields\":" +\r
-                    "[" +\r
-                    "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                    "{\"name\":\"filterMatched\",\"type\":[\"boolean\",\"null\"]}," +\r
-                    "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                    "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                    "{\"name\":\"message\",\"type\":\"string\"}" +\r
-                    "]" +\r
-                    "}";\r
-\r
-    protected static class MockStageMetrics implements StageMetrics, Serializable {\r
-\r
-        @Override\r
-        public void count(String metricName, int delta) {\r
-            LOG.debug("Mocking metric count, MetricName: {}, Delta: {}", metricName, delta);\r
-        }\r
-\r
-        @Override\r
-        public void gauge(String metricName, long value) {\r
-            LOG.debug("Mocking metric guage, MetricName: {}, Value: {}", metricName, value);\r
-        }\r
-\r
-        @Override\r
-        public void pipelineCount(String metricName, int delta) {\r
-            LOG.debug("Mocking metric pipelineCount, MetricName: {}, Delta: {}", metricName, delta);\r
-        }\r
-\r
-        @Override\r
-        public void pipelineGauge(String metricName, long value) {\r
-            LOG.debug("Mocking metric guage, pipelineGauge: {}, Value: {}", metricName, value);\r
-        }\r
-    }\r
-\r
-    protected static TestDMaaPMRSourcePluginConfig getTestDMaaPMRSourcePluginConfig() {\r
-        final TestDMaaPMRSourcePluginConfig sourcePluginConfig = new TestDMaaPMRSourcePluginConfig();\r
-        sourcePluginConfig.setReferenceName(DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME);\r
-        sourcePluginConfig.setHostName(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME);\r
-        sourcePluginConfig.setPortNumber(DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER);\r
-        sourcePluginConfig.setTopicName(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME);\r
-        sourcePluginConfig.setPollingInterval(DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL);\r
-        sourcePluginConfig.setProtocol(DMAAP_MR_SOURCE_PLUGIN_PROTOCOL);\r
-        sourcePluginConfig.setUserName(DMAAP_MR_SOURCE_PLUGIN_USERNAME);\r
-        sourcePluginConfig.setUserPassword(DMAAP_MR_SOURCE_PLUGIN_PASSWORD);\r
-        sourcePluginConfig.setContentType(DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE);\r
-        sourcePluginConfig.setConsumerGroup(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP);\r
-        sourcePluginConfig.setConsumerId(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID);\r
-        sourcePluginConfig.setMessageLimit(DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT);\r
-        sourcePluginConfig.setTimeoutMS(DMAAP_MR_SOURCE_PLUGIN_TIMEOUT);\r
-        return sourcePluginConfig;\r
-    }\r
-\r
-    protected static TestDMaaPMRSinkPluginConfig getTestDMaaPMRSinkPluginConfig() {\r
-        final TestDMaaPMRSinkPluginConfig sinkPluginConfig = new TestDMaaPMRSinkPluginConfig();\r
-        sinkPluginConfig.setReferenceName(DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME);\r
-        sinkPluginConfig.setHostName(DMAAP_MR_SINK_PLUGIN_HOST_NAME);\r
-        sinkPluginConfig.setPortNumber(DMAAP_MR_SINK_PLUGIN_PORT_NUMBER);\r
-        sinkPluginConfig.setTopicName(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME);\r
-        sinkPluginConfig.setProtocol(DMAAP_MR_SINK_PLUGIN_PROTOCOL);\r
-        sinkPluginConfig.setUserName(DMAAP_MR_SINK_PLUGIN_USERNAME);\r
-        sinkPluginConfig.setUserPassword(DMAAP_MR_SINK_PLUGIN_PASSWORD);\r
-        sinkPluginConfig.setContentType(DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE);\r
-        sinkPluginConfig.setMessageColumnName(DMAAP_MR_SINK_MESSAGE_COLUMN_NAME);\r
-        sinkPluginConfig.setMaxBatchSize(DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE);\r
-        sinkPluginConfig.setMaxRecoveryQueueSize(DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE);\r
-        return sinkPluginConfig;\r
-    }\r
-\r
-\r
-    protected static Configuration getTestConfiguration() {\r
-        final Configuration configuration = new Configuration();\r
-        final Map<String, String> sinkConfigurationMap = createSinkConfigurationMap();\r
-        for (Map.Entry<String, String> property : sinkConfigurationMap.entrySet()) {\r
-            configuration.set(property.getKey(), property.getValue());\r
-        }\r
-        return configuration;\r
-    }\r
-\r
-    protected static Map<String, String> createSinkConfigurationMap() {\r
-\r
-        Map<String, String> sinkConfig = new LinkedHashMap<>();\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.HOST_NAME, DMAAP_MR_SINK_PLUGIN_HOST_NAME);\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.TOPIC_NAME, DMAAP_MR_SINK_PLUGIN_TOPIC_NAME);\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.PORT_NUMBER,\r
-                DMAAP_MR_SINK_PLUGIN_PORT_NUMBER.toString());\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.PROTOCOL, DMAAP_MR_SINK_PLUGIN_PROTOCOL);\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.USER_NAME, DMAAP_MR_SINK_PLUGIN_USERNAME);\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.USER_PASS, DMAAP_MR_SINK_PLUGIN_PASSWORD);\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE,\r
-                DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE);\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE,\r
-                DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE.toString());\r
-        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE,\r
-                DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE.toString());\r
-        return sinkConfig;\r
-    }\r
-\r
-    protected static Schema getDMaaPMRSinkTestSchema() {\r
-        return Schema.recordOf(\r
-                "DMaaPMRSinkTestSchema",\r
-                Schema.Field.of("message", Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of("field1", Schema.of(Schema.Type.STRING))\r
-        );\r
-    }\r
-\r
-\r
-    protected static TestSimpleTCAPluginConfig getTestSimpleTCAPluginConfig() {\r
-        final String policyJson;\r
-        try {\r
-            policyJson = fromStream(TCA_POLICY_JSON_FILE_LOCATION);\r
-        } catch (IOException e) {\r
-            throw new RuntimeException("Error while parsing policy", e);\r
-        }\r
-        return new TestSimpleTCAPluginConfig(VES_MESSAGE_FIELD_NAME, policyJson, TCA_PLUGIN_ALERT_FIELD_NAME,\r
-                TCA_PLUGIN_MESSAGE_TYPE_FIELD_NAME, getSimpleTCAPluginInputSchema().toString(), false);\r
-    }\r
-\r
-    protected static Schema getSimpleTCAPluginInputSchema() {\r
-        return Schema.recordOf(\r
-                "TestSimpleTCAPluginInputSchema",\r
-                Schema.Field.of("message", Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of("inputField1", Schema.nullableOf(Schema.of(Schema.Type.STRING))),\r
-                Schema.Field.of("inputField2", Schema.nullableOf(Schema.of(Schema.Type.STRING)))\r
-        );\r
-    }\r
-\r
-    protected static Schema getJsonFilterPluginInputSchema() {\r
-        return Schema.recordOf(\r
-                "TestJsonFilterInputSchema",\r
-                Schema.Field.of("ts", Schema.of(Schema.Type.LONG)),\r
-                Schema.Field.of("responseCode", Schema.of(Schema.Type.INT)),\r
-                Schema.Field.of("responseMessage", Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of("message", Schema.of(Schema.Type.STRING))\r
-        );\r
-    }\r
-\r
-    protected static TestJsonPathFilterPluginConfig getJsonPathFilterPluginConfig() {\r
-        return new TestJsonPathFilterPluginConfig(JSON_PATH_FILTER_PLUGIN_REFERENCE_NAME,\r
-                JSON_PATH_FILTER_PLUGIN_INCOMING_JSON_FIELD_NAME,\r
-                JSON_PATH_FILTER_PLUGIN_OUTPUT_SCHEMA_FILED_NAME,\r
-                JSON_PATH_FILTER_PLUGIN_JSON_FILTER_MAPPINGS,\r
-                JSON_PATH_FILTER_PLUGIN_JSON_FILTER_OUTPUT_SCHEMA);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins;
+
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.StageMetrics;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.apache.hadoop.conf.Configuration;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPPluginConstants;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter.TestJsonPathFilterPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.TestSimpleTCAPluginConfig;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/23/2017.
+ */
+public abstract class BaseAnalyticsCDAPPluginsUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =
+            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();
+
+    protected static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";
+    protected static final String CEF_MESSAGE_JSON_FILE_LOCATION = "data/json/cef/cef_message.json";
+    protected static final String CEF_NON_COMPLIANT_MESSAGE_JSON_FILE_LOCATION =
+            "data/json/cef/cef_message_with_threshold_violation.json";
+
+
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME = "testDMaaPMRSource";
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_HOST_NAME = "dcae-msrt-mtl1-ftl.homer.com";
+    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER = 3905;
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME = "com.dcae.dmaap.FTL.DcaeTestVESSub";
+    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL = 1000;
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_PROTOCOL = "https";
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_USERNAME = "username";
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_PASSWORD = "password";
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE = "application/json";
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP = "G1";
+    protected static final String DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID = "C1";
+    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT = 100;
+    protected static final Integer DMAAP_MR_SOURCE_PLUGIN_TIMEOUT = 10000;
+
+
+    protected static final String DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME = "testDMaaPMRSINK";
+    protected static final String DMAAP_MR_SINK_PLUGIN_HOST_NAME = "dcae-msrt-mtl1-ftl.homer.com";
+    protected static final Integer DMAAP_MR_SINK_PLUGIN_PORT_NUMBER = 3905;
+    protected static final String DMAAP_MR_SINK_PLUGIN_TOPIC_NAME = "com.dcae.dmaap.FTL.DcaeTestVESPub";
+    protected static final String DMAAP_MR_SINK_PLUGIN_PROTOCOL = "https";
+    protected static final String DMAAP_MR_SINK_PLUGIN_USERNAME = "username";
+    protected static final String DMAAP_MR_SINK_PLUGIN_PASSWORD = "password";
+    protected static final String DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE = "application/json";
+    protected static final String DMAAP_MR_SINK_MESSAGE_COLUMN_NAME = "message";
+    protected static final Integer DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE = 10;
+    protected static final Integer DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE = 100;
+
+    protected static final String VES_MESSAGE_FIELD_NAME = "message";
+    protected static final String TCA_PLUGIN_ALERT_FIELD_NAME = "alert";
+    protected static final String TCA_PLUGIN_MESSAGE_TYPE_FIELD_NAME = "tcaMessageType";
+
+
+    protected static final String JSON_PATH_FILTER_PLUGIN_REFERENCE_NAME = "JsonPathFilter";
+    protected static final String JSON_PATH_FILTER_PLUGIN_INCOMING_JSON_FIELD_NAME = "message";
+    protected static final String JSON_PATH_FILTER_PLUGIN_OUTPUT_SCHEMA_FILED_NAME = "filterMatched";
+    protected static final String JSON_PATH_FILTER_PLUGIN_JSON_FILTER_MAPPINGS =
+            "$.event.commonEventHeader.domain:measurementsForVfScaling," +
+                    "$.event.commonEventHeader.eventName:vLoadBalancer;vFirewall";
+    protected static final String JSON_PATH_FILTER_PLUGIN_JSON_FILTER_OUTPUT_SCHEMA =
+            "{\"type\":\"record\"," +
+                    "\"name\":\"etlSchemaBody\",\"fields\":" +
+                    "[" +
+                    "{\"name\":\"ts\",\"type\":\"long\"}," +
+                    "{\"name\":\"filterMatched\",\"type\":[\"boolean\",\"null\"]}," +
+                    "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                    "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                    "{\"name\":\"message\",\"type\":\"string\"}" +
+                    "]" +
+                    "}";
+
+    protected static class MockStageMetrics implements StageMetrics, Serializable {
+
+        @Override
+        public void count(String metricName, int delta) {
+            LOG.debug("Mocking metric count, MetricName: {}, Delta: {}", metricName, delta);
+        }
+
+        @Override
+        public void gauge(String metricName, long value) {
+            LOG.debug("Mocking metric guage, MetricName: {}, Value: {}", metricName, value);
+        }
+
+        @Override
+        public void pipelineCount(String metricName, int delta) {
+            LOG.debug("Mocking metric pipelineCount, MetricName: {}, Delta: {}", metricName, delta);
+        }
+
+        @Override
+        public void pipelineGauge(String metricName, long value) {
+            LOG.debug("Mocking metric guage, pipelineGauge: {}, Value: {}", metricName, value);
+        }
+    }
+
+    protected static TestDMaaPMRSourcePluginConfig getTestDMaaPMRSourcePluginConfig() {
+        final TestDMaaPMRSourcePluginConfig sourcePluginConfig = new TestDMaaPMRSourcePluginConfig();
+        sourcePluginConfig.setReferenceName(DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME);
+        sourcePluginConfig.setHostName(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME);
+        sourcePluginConfig.setPortNumber(DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER);
+        sourcePluginConfig.setTopicName(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME);
+        sourcePluginConfig.setPollingInterval(DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL);
+        sourcePluginConfig.setProtocol(DMAAP_MR_SOURCE_PLUGIN_PROTOCOL);
+        sourcePluginConfig.setUserName(DMAAP_MR_SOURCE_PLUGIN_USERNAME);
+        sourcePluginConfig.setUserPassword(DMAAP_MR_SOURCE_PLUGIN_PASSWORD);
+        sourcePluginConfig.setContentType(DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE);
+        sourcePluginConfig.setConsumerGroup(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP);
+        sourcePluginConfig.setConsumerId(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID);
+        sourcePluginConfig.setMessageLimit(DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT);
+        sourcePluginConfig.setTimeoutMS(DMAAP_MR_SOURCE_PLUGIN_TIMEOUT);
+        return sourcePluginConfig;
+    }
+
+    protected static TestDMaaPMRSinkPluginConfig getTestDMaaPMRSinkPluginConfig() {
+        final TestDMaaPMRSinkPluginConfig sinkPluginConfig = new TestDMaaPMRSinkPluginConfig();
+        sinkPluginConfig.setReferenceName(DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME);
+        sinkPluginConfig.setHostName(DMAAP_MR_SINK_PLUGIN_HOST_NAME);
+        sinkPluginConfig.setPortNumber(DMAAP_MR_SINK_PLUGIN_PORT_NUMBER);
+        sinkPluginConfig.setTopicName(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME);
+        sinkPluginConfig.setProtocol(DMAAP_MR_SINK_PLUGIN_PROTOCOL);
+        sinkPluginConfig.setUserName(DMAAP_MR_SINK_PLUGIN_USERNAME);
+        sinkPluginConfig.setUserPassword(DMAAP_MR_SINK_PLUGIN_PASSWORD);
+        sinkPluginConfig.setContentType(DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE);
+        sinkPluginConfig.setMessageColumnName(DMAAP_MR_SINK_MESSAGE_COLUMN_NAME);
+        sinkPluginConfig.setMaxBatchSize(DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE);
+        sinkPluginConfig.setMaxRecoveryQueueSize(DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE);
+        return sinkPluginConfig;
+    }
+
+
+    protected static Configuration getTestConfiguration() {
+        final Configuration configuration = new Configuration();
+        final Map<String, String> sinkConfigurationMap = createSinkConfigurationMap();
+        for (Map.Entry<String, String> property : sinkConfigurationMap.entrySet()) {
+            configuration.set(property.getKey(), property.getValue());
+        }
+        return configuration;
+    }
+
+    protected static Map<String, String> createSinkConfigurationMap() {
+
+        Map<String, String> sinkConfig = new LinkedHashMap<>();
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.HOST_NAME, DMAAP_MR_SINK_PLUGIN_HOST_NAME);
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.TOPIC_NAME, DMAAP_MR_SINK_PLUGIN_TOPIC_NAME);
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.PORT_NUMBER,
+                DMAAP_MR_SINK_PLUGIN_PORT_NUMBER.toString());
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.PROTOCOL, DMAAP_MR_SINK_PLUGIN_PROTOCOL);
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.USER_NAME, DMAAP_MR_SINK_PLUGIN_USERNAME);
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.USER_PASS, DMAAP_MR_SINK_PLUGIN_PASSWORD);
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.CONTENT_TYPE,
+                DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE);
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.MAX_BATCH_SIZE,
+                DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE.toString());
+        sinkConfig.put(CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields.MAX_RECOVER_QUEUE_SIZE,
+                DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE.toString());
+        return sinkConfig;
+    }
+
+    protected static Schema getDMaaPMRSinkTestSchema() {
+        return Schema.recordOf(
+                "DMaaPMRSinkTestSchema",
+                Schema.Field.of("message", Schema.of(Schema.Type.STRING)),
+                Schema.Field.of("field1", Schema.of(Schema.Type.STRING))
+        );
+    }
+
+
+    protected static TestSimpleTCAPluginConfig getTestSimpleTCAPluginConfig() {
+        final String policyJson;
+        try {
+            policyJson = fromStream(TCA_POLICY_JSON_FILE_LOCATION);
+        } catch (IOException e) {
+            throw new RuntimeException("Error while parsing policy", e);
+        }
+        return new TestSimpleTCAPluginConfig(VES_MESSAGE_FIELD_NAME, policyJson, TCA_PLUGIN_ALERT_FIELD_NAME,
+                TCA_PLUGIN_MESSAGE_TYPE_FIELD_NAME, getSimpleTCAPluginInputSchema().toString(), false);
+    }
+
+    protected static Schema getSimpleTCAPluginInputSchema() {
+        return Schema.recordOf(
+                "TestSimpleTCAPluginInputSchema",
+                Schema.Field.of("message", Schema.of(Schema.Type.STRING)),
+                Schema.Field.of("inputField1", Schema.nullableOf(Schema.of(Schema.Type.STRING))),
+                Schema.Field.of("inputField2", Schema.nullableOf(Schema.of(Schema.Type.STRING)))
+        );
+    }
+
+    protected static Schema getJsonFilterPluginInputSchema() {
+        return Schema.recordOf(
+                "TestJsonFilterInputSchema",
+                Schema.Field.of("ts", Schema.of(Schema.Type.LONG)),
+                Schema.Field.of("responseCode", Schema.of(Schema.Type.INT)),
+                Schema.Field.of("responseMessage", Schema.of(Schema.Type.STRING)),
+                Schema.Field.of("message", Schema.of(Schema.Type.STRING))
+        );
+    }
+
+    protected static TestJsonPathFilterPluginConfig getJsonPathFilterPluginConfig() {
+        return new TestJsonPathFilterPluginConfig(JSON_PATH_FILTER_PLUGIN_REFERENCE_NAME,
+                JSON_PATH_FILTER_PLUGIN_INCOMING_JSON_FIELD_NAME,
+                JSON_PATH_FILTER_PLUGIN_OUTPUT_SCHEMA_FILED_NAME,
+                JSON_PATH_FILTER_PLUGIN_JSON_FILTER_MAPPINGS,
+                JSON_PATH_FILTER_PLUGIN_JSON_FILTER_OUTPUT_SCHEMA);
+    }
+
+}
@@ -1,77 +1,77 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-import java.util.Map;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMROutputFormatProviderTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testDMaaPMROutputFormatProviderWhenConfigIsMissingNonRequiredValues() throws Exception {\r
-        final TestDMaaPMRSinkPluginConfig sinkPluginConfig = new TestDMaaPMRSinkPluginConfig();\r
-        sinkPluginConfig.setHostName(DMAAP_MR_SINK_PLUGIN_HOST_NAME);\r
-        sinkPluginConfig.setTopicName(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME);\r
-        final DMaaPMROutputFormatProvider dMaaPMROutputFormatProvider =\r
-                new DMaaPMROutputFormatProvider(sinkPluginConfig);\r
-        final Map<String, String> outputFormatConfiguration =\r
-                dMaaPMROutputFormatProvider.getOutputFormatConfiguration();\r
-        final String hostName = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.HOST_NAME);\r
-        assertTrue(hostName.equals(DMAAP_MR_SINK_PLUGIN_HOST_NAME));\r
-        final String topicName = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.TOPIC_NAME);\r
-        assertTrue(topicName.equals(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));\r
-        final String portNumber = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER);\r
-        assertTrue(portNumber.equals(AnalyticsConstants.DEFAULT_PORT_NUMBER.toString()));\r
-        final String protocol = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.PROTOCOL);\r
-        assertTrue(protocol.equals(AnalyticsConstants.DEFAULT_PROTOCOL));\r
-    }\r
-\r
-    @Test\r
-    public void testGetOutputFormatClassName() throws Exception {\r
-        final DMaaPMROutputFormatProvider dMaaPMROutputFormatProvider =\r
-                new DMaaPMROutputFormatProvider(getTestDMaaPMRSinkPluginConfig());\r
-        final String outputFormatClassName = dMaaPMROutputFormatProvider.getOutputFormatClassName();\r
-        assertTrue(outputFormatClassName.equals(DMaaPMROutputFormat.class.getName()));\r
-    }\r
-\r
-    @Test\r
-    public void testGetOutputFormatConfiguration() throws Exception {\r
-        final TestDMaaPMRSinkPluginConfig testDMaaPMRSinkPluginConfig = getTestDMaaPMRSinkPluginConfig();\r
-        final DMaaPMROutputFormatProvider dMaaPMROutputFormatProvider =\r
-                new DMaaPMROutputFormatProvider(testDMaaPMRSinkPluginConfig);\r
-        final Map<String, String> outputFormatConfiguration =\r
-                dMaaPMROutputFormatProvider.getOutputFormatConfiguration();\r
-        assertTrue(outputFormatConfiguration.size() == 9);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPPluginConstants.DMaaPMRSinkHadoopConfigFields;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+import java.util.Map;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMROutputFormatProviderTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+
+    @Test
+    public void testDMaaPMROutputFormatProviderWhenConfigIsMissingNonRequiredValues() throws Exception {
+        final TestDMaaPMRSinkPluginConfig sinkPluginConfig = new TestDMaaPMRSinkPluginConfig();
+        sinkPluginConfig.setHostName(DMAAP_MR_SINK_PLUGIN_HOST_NAME);
+        sinkPluginConfig.setTopicName(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME);
+        final DMaaPMROutputFormatProvider dMaaPMROutputFormatProvider =
+                new DMaaPMROutputFormatProvider(sinkPluginConfig);
+        final Map<String, String> outputFormatConfiguration =
+                dMaaPMROutputFormatProvider.getOutputFormatConfiguration();
+        final String hostName = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.HOST_NAME);
+        assertTrue(hostName.equals(DMAAP_MR_SINK_PLUGIN_HOST_NAME));
+        final String topicName = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.TOPIC_NAME);
+        assertTrue(topicName.equals(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));
+        final String portNumber = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.PORT_NUMBER);
+        assertTrue(portNumber.equals(AnalyticsConstants.DEFAULT_PORT_NUMBER.toString()));
+        final String protocol = outputFormatConfiguration.get(DMaaPMRSinkHadoopConfigFields.PROTOCOL);
+        assertTrue(protocol.equals(AnalyticsConstants.DEFAULT_PROTOCOL));
+    }
+
+    @Test
+    public void testGetOutputFormatClassName() throws Exception {
+        final DMaaPMROutputFormatProvider dMaaPMROutputFormatProvider =
+                new DMaaPMROutputFormatProvider(getTestDMaaPMRSinkPluginConfig());
+        final String outputFormatClassName = dMaaPMROutputFormatProvider.getOutputFormatClassName();
+        assertTrue(outputFormatClassName.equals(DMaaPMROutputFormat.class.getName()));
+    }
+
+    @Test
+    public void testGetOutputFormatConfiguration() throws Exception {
+        final TestDMaaPMRSinkPluginConfig testDMaaPMRSinkPluginConfig = getTestDMaaPMRSinkPluginConfig();
+        final DMaaPMROutputFormatProvider dMaaPMROutputFormatProvider =
+                new DMaaPMROutputFormatProvider(testDMaaPMRSinkPluginConfig);
+        final Map<String, String> outputFormatConfiguration =
+                dMaaPMROutputFormatProvider.getOutputFormatConfiguration();
+        assertTrue(outputFormatConfiguration.size() == 9);
+
+    }
+
+}
@@ -1,75 +1,75 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import org.apache.hadoop.io.NullWritable;\r
-import org.apache.hadoop.mapreduce.JobContext;\r
-import org.apache.hadoop.mapreduce.OutputCommitter;\r
-import org.apache.hadoop.mapreduce.RecordWriter;\r
-import org.apache.hadoop.mapreduce.TaskAttemptContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertTrue;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMROutputFormatTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private DMaaPMROutputFormat dMaaPMROutputFormat;\r
-\r
-    @Before\r
-    public void before() {\r
-        dMaaPMROutputFormat = new DMaaPMROutputFormat();\r
-    }\r
-\r
-    @Test\r
-    public void testGetRecordWriter() throws Exception {\r
-        final TaskAttemptContext taskAttemptContext = Mockito.mock(TaskAttemptContext.class);\r
-        when(taskAttemptContext.getConfiguration()).thenReturn(getTestConfiguration());\r
-        final RecordWriter<String, NullWritable> recordWriter = dMaaPMROutputFormat.getRecordWriter(taskAttemptContext);\r
-        assertNotNull(recordWriter);\r
-        final JobContext jobContext = Mockito.mock(JobContext.class);\r
-        dMaaPMROutputFormat.checkOutputSpecs(jobContext);\r
-    }\r
-\r
-    @Test\r
-    public void testGetOutputCommitter() throws Exception {\r
-        final TaskAttemptContext taskAttemptContext = Mockito.mock(TaskAttemptContext.class);\r
-        final OutputCommitter outputCommitter = dMaaPMROutputFormat.getOutputCommitter(taskAttemptContext);\r
-        assertTrue(outputCommitter.getClass().equals(DMaaPMROutputFormat.NoOpOutputCommitter.class));\r
-        final JobContext jobContext = Mockito.mock(JobContext.class);\r
-        outputCommitter.setupJob(jobContext);\r
-        outputCommitter.setupTask(taskAttemptContext);\r
-        assertFalse(outputCommitter.needsTaskCommit(taskAttemptContext));\r
-        outputCommitter.commitJob(jobContext);\r
-        outputCommitter.commitTask(taskAttemptContext);\r
-        outputCommitter.abortTask(taskAttemptContext);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.mapreduce.JobContext;
+import org.apache.hadoop.mapreduce.OutputCommitter;
+import org.apache.hadoop.mapreduce.RecordWriter;
+import org.apache.hadoop.mapreduce.TaskAttemptContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMROutputFormatTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private DMaaPMROutputFormat dMaaPMROutputFormat;
+
+    @Before
+    public void before() {
+        dMaaPMROutputFormat = new DMaaPMROutputFormat();
+    }
+
+    @Test
+    public void testGetRecordWriter() throws Exception {
+        final TaskAttemptContext taskAttemptContext = Mockito.mock(TaskAttemptContext.class);
+        when(taskAttemptContext.getConfiguration()).thenReturn(getTestConfiguration());
+        final RecordWriter<String, NullWritable> recordWriter = dMaaPMROutputFormat.getRecordWriter(taskAttemptContext);
+        assertNotNull(recordWriter);
+        final JobContext jobContext = Mockito.mock(JobContext.class);
+        dMaaPMROutputFormat.checkOutputSpecs(jobContext);
+    }
+
+    @Test
+    public void testGetOutputCommitter() throws Exception {
+        final TaskAttemptContext taskAttemptContext = Mockito.mock(TaskAttemptContext.class);
+        final OutputCommitter outputCommitter = dMaaPMROutputFormat.getOutputCommitter(taskAttemptContext);
+        assertTrue(outputCommitter.getClass().equals(DMaaPMROutputFormat.NoOpOutputCommitter.class));
+        final JobContext jobContext = Mockito.mock(JobContext.class);
+        outputCommitter.setupJob(jobContext);
+        outputCommitter.setupTask(taskAttemptContext);
+        assertFalse(outputCommitter.needsTaskCommit(taskAttemptContext));
+        outputCommitter.commitJob(jobContext);
+        outputCommitter.commitTask(taskAttemptContext);
+        outputCommitter.abortTask(taskAttemptContext);
+
+    }
+
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import org.apache.hadoop.mapreduce.TaskAttemptContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-\r
-import java.util.Arrays;\r
-\r
-import static org.mockito.Mockito.times;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMRRecordWriterTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private DMaaPMRPublisher publisher;\r
-    private DMaaPMRRecordWriter dMaaPMRRecordWriter;\r
-\r
-    @Before\r
-    public void before() {\r
-        publisher = Mockito.mock(DMaaPMRPublisher.class);\r
-        dMaaPMRRecordWriter = new DMaaPMRRecordWriter(publisher);\r
-    }\r
-\r
-    @Test\r
-    public void testWrite() throws Exception {\r
-        final String testMessage = "test Message";\r
-        dMaaPMRRecordWriter.write(testMessage, null);\r
-        Mockito.verify(publisher, times(1)).publish(Arrays.asList(testMessage));\r
-    }\r
-\r
-    @Test\r
-    public void testClose() throws Exception {\r
-        final TaskAttemptContext taskAttemptContext = Mockito.mock(TaskAttemptContext.class);\r
-        dMaaPMRRecordWriter.close(taskAttemptContext);\r
-        Mockito.verify(publisher, times(1)).flush();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import org.apache.hadoop.mapreduce.TaskAttemptContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+
+import java.util.Arrays;
+
+import static org.mockito.Mockito.times;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMRRecordWriterTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private DMaaPMRPublisher publisher;
+    private DMaaPMRRecordWriter dMaaPMRRecordWriter;
+
+    @Before
+    public void before() {
+        publisher = Mockito.mock(DMaaPMRPublisher.class);
+        dMaaPMRRecordWriter = new DMaaPMRRecordWriter(publisher);
+    }
+
+    @Test
+    public void testWrite() throws Exception {
+        final String testMessage = "test Message";
+        dMaaPMRRecordWriter.write(testMessage, null);
+        Mockito.verify(publisher, times(1)).publish(Arrays.asList(testMessage));
+    }
+
+    @Test
+    public void testClose() throws Exception {
+        final TaskAttemptContext taskAttemptContext = Mockito.mock(TaskAttemptContext.class);
+        dMaaPMRRecordWriter.close(taskAttemptContext);
+        Mockito.verify(publisher, times(1)).flush();
+    }
+
+}
@@ -1,95 +1,95 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.Emitter;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.StageConfigurer;\r
-import co.cask.cdap.etl.api.batch.BatchSinkContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMRSinkTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private DMaaPMRSink dMaaPMRSink;\r
-\r
-    @Before\r
-    public void before() {\r
-        dMaaPMRSink = new DMaaPMRSink(getTestDMaaPMRSinkPluginConfig());\r
-    }\r
-\r
-    @Test\r
-    public void testConfigurePipeline() throws Exception {\r
-        final PipelineConfigurer pipelineConfigurer = Mockito.mock(PipelineConfigurer.class);\r
-        final StageConfigurer stageConfigurer = Mockito.mock(StageConfigurer.class);\r
-        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);\r
-        when(stageConfigurer.getInputSchema()).thenReturn(getDMaaPMRSinkTestSchema());\r
-        dMaaPMRSink.configurePipeline(pipelineConfigurer);\r
-        verify(stageConfigurer, times(1)).getInputSchema();\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testConfigurePipelineWithInvalidSchema() throws Exception {\r
-        final PipelineConfigurer pipelineConfigurer = Mockito.mock(PipelineConfigurer.class);\r
-        final StageConfigurer stageConfigurer = Mockito.mock(StageConfigurer.class);\r
-        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);\r
-        when(stageConfigurer.getInputSchema()).thenReturn(Schema.recordOf(\r
-                "DMaaPMRSinkInvalidSchema",\r
-                Schema.Field.of("message1", Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of("field1", Schema.of(Schema.Type.STRING))\r
-        ));\r
-        dMaaPMRSink.configurePipeline(pipelineConfigurer);\r
-    }\r
-\r
-    @Test\r
-    public void testPrepareRun() throws Exception {\r
-        final BatchSinkContext batchSinkContext = Mockito.mock(BatchSinkContext.class);\r
-        dMaaPMRSink.prepareRun(batchSinkContext);\r
-    }\r
-\r
-    @Test\r
-    @SuppressWarnings("unchecked")\r
-    public void testTransform() throws Exception {\r
-        final StructuredRecord structuredRecord = Mockito.mock(StructuredRecord.class);\r
-        final Emitter emitter = Mockito.mock(Emitter.class);\r
-        final String incomingTestMessage = "test message";\r
-        when(structuredRecord.get(\r
-                eq(getTestDMaaPMRSinkPluginConfig().getMessageColumnName()))).thenReturn(incomingTestMessage);\r
-        doNothing().when(emitter).emit(any());\r
-        dMaaPMRSink.transform(structuredRecord, emitter);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.batch.sink.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.Emitter;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.StageConfigurer;
+import co.cask.cdap.etl.api.batch.BatchSinkContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMRSinkTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private DMaaPMRSink dMaaPMRSink;
+
+    @Before
+    public void before() {
+        dMaaPMRSink = new DMaaPMRSink(getTestDMaaPMRSinkPluginConfig());
+    }
+
+    @Test
+    public void testConfigurePipeline() throws Exception {
+        final PipelineConfigurer pipelineConfigurer = Mockito.mock(PipelineConfigurer.class);
+        final StageConfigurer stageConfigurer = Mockito.mock(StageConfigurer.class);
+        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);
+        when(stageConfigurer.getInputSchema()).thenReturn(getDMaaPMRSinkTestSchema());
+        dMaaPMRSink.configurePipeline(pipelineConfigurer);
+        verify(stageConfigurer, times(1)).getInputSchema();
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testConfigurePipelineWithInvalidSchema() throws Exception {
+        final PipelineConfigurer pipelineConfigurer = Mockito.mock(PipelineConfigurer.class);
+        final StageConfigurer stageConfigurer = Mockito.mock(StageConfigurer.class);
+        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);
+        when(stageConfigurer.getInputSchema()).thenReturn(Schema.recordOf(
+                "DMaaPMRSinkInvalidSchema",
+                Schema.Field.of("message1", Schema.of(Schema.Type.STRING)),
+                Schema.Field.of("field1", Schema.of(Schema.Type.STRING))
+        ));
+        dMaaPMRSink.configurePipeline(pipelineConfigurer);
+    }
+
+    @Test
+    public void testPrepareRun() throws Exception {
+        final BatchSinkContext batchSinkContext = Mockito.mock(BatchSinkContext.class);
+        dMaaPMRSink.prepareRun(batchSinkContext);
+    }
+
+    @Test
+    @SuppressWarnings("unchecked")
+    public void testTransform() throws Exception {
+        final StructuredRecord structuredRecord = Mockito.mock(StructuredRecord.class);
+        final Emitter emitter = Mockito.mock(Emitter.class);
+        final String incomingTestMessage = "test message";
+        when(structuredRecord.get(
+                eq(getTestDMaaPMRSinkPluginConfig().getMessageColumnName()))).thenReturn(incomingTestMessage);
+        doNothing().when(emitter).emit(any());
+        dMaaPMRSink.transform(structuredRecord, emitter);
+    }
+
+}
@@ -1,80 +1,80 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertNull;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/23/2017.\r
- */\r
-public class DMaaPMRSinkPluginConfigTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    @Test\r
-    public void testDMaaPMRSinkPluginConfigDefaults() throws Exception {\r
-        final DMaaPMRSinkPluginConfig sinkPluginConfig = new DMaaPMRSinkPluginConfig\r
-                (DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME, DMAAP_MR_SINK_PLUGIN_HOST_NAME,\r
-                        DMAAP_MR_SINK_PLUGIN_TOPIC_NAME, DMAAP_MR_SINK_MESSAGE_COLUMN_NAME);\r
-\r
-        assertThat(sinkPluginConfig.getReferenceName(), is(DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME));\r
-        assertThat(sinkPluginConfig.getHostName(), is(DMAAP_MR_SINK_PLUGIN_HOST_NAME));\r
-        assertThat(sinkPluginConfig.getTopicName(), is(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));\r
-        assertThat(sinkPluginConfig.getMessageColumnName(), is(DMAAP_MR_SINK_MESSAGE_COLUMN_NAME));\r
-        assertNull(sinkPluginConfig.getPortNumber());\r
-        assertNull(sinkPluginConfig.getProtocol());\r
-        assertNull(sinkPluginConfig.getUserName());\r
-        assertNull(sinkPluginConfig.getUserPassword());\r
-        assertNull(sinkPluginConfig.getContentType());\r
-        assertNull(sinkPluginConfig.getMaxBatchSize());\r
-        assertNull(sinkPluginConfig.getMaxRecoveryQueueSize());\r
-    }\r
-\r
-    @Test\r
-    public void testDMaaPMRSinkPluginConfigCustom() throws Exception {\r
-        final DMaaPMRSinkPluginConfig sinkPluginConfig = getTestDMaaPMRSinkPluginConfig();\r
-        assertThat(sinkPluginConfig.getReferenceName(), is(DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME));\r
-        assertThat(sinkPluginConfig.getHostName(), is(DMAAP_MR_SINK_PLUGIN_HOST_NAME));\r
-        assertThat(sinkPluginConfig.getTopicName(), is(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));\r
-        assertThat(sinkPluginConfig.getPortNumber(), is(DMAAP_MR_SINK_PLUGIN_PORT_NUMBER));\r
-        assertThat(sinkPluginConfig.getProtocol(), is(DMAAP_MR_SINK_PLUGIN_PROTOCOL));\r
-        assertThat(sinkPluginConfig.getUserName(), is(DMAAP_MR_SINK_PLUGIN_USERNAME));\r
-        assertThat(sinkPluginConfig.getUserPassword(), is(DMAAP_MR_SINK_PLUGIN_PASSWORD));\r
-        assertThat(sinkPluginConfig.getContentType(), is(DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE));\r
-        assertThat(sinkPluginConfig.getMessageColumnName(), is(DMAAP_MR_SINK_MESSAGE_COLUMN_NAME));\r
-        assertThat(sinkPluginConfig.getMaxBatchSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE));\r
-        assertThat(sinkPluginConfig.getMaxRecoveryQueueSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE));\r
-    }\r
-\r
-    @Test\r
-    public void testValidToString() throws Exception {\r
-        final TestDMaaPMRSinkPluginConfig sinkPluginConfig = getTestDMaaPMRSinkPluginConfig();\r
-        assertNotNull(sinkPluginConfig.toString());\r
-        assertTrue(sinkPluginConfig.toString().contains(DMAAP_MR_SINK_PLUGIN_HOST_NAME));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/23/2017.
+ */
+public class DMaaPMRSinkPluginConfigTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    @Test
+    public void testDMaaPMRSinkPluginConfigDefaults() throws Exception {
+        final DMaaPMRSinkPluginConfig sinkPluginConfig = new DMaaPMRSinkPluginConfig
+                (DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME, DMAAP_MR_SINK_PLUGIN_HOST_NAME,
+                        DMAAP_MR_SINK_PLUGIN_TOPIC_NAME, DMAAP_MR_SINK_MESSAGE_COLUMN_NAME);
+
+        assertThat(sinkPluginConfig.getReferenceName(), is(DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME));
+        assertThat(sinkPluginConfig.getHostName(), is(DMAAP_MR_SINK_PLUGIN_HOST_NAME));
+        assertThat(sinkPluginConfig.getTopicName(), is(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));
+        assertThat(sinkPluginConfig.getMessageColumnName(), is(DMAAP_MR_SINK_MESSAGE_COLUMN_NAME));
+        assertNull(sinkPluginConfig.getPortNumber());
+        assertNull(sinkPluginConfig.getProtocol());
+        assertNull(sinkPluginConfig.getUserName());
+        assertNull(sinkPluginConfig.getUserPassword());
+        assertNull(sinkPluginConfig.getContentType());
+        assertNull(sinkPluginConfig.getMaxBatchSize());
+        assertNull(sinkPluginConfig.getMaxRecoveryQueueSize());
+    }
+
+    @Test
+    public void testDMaaPMRSinkPluginConfigCustom() throws Exception {
+        final DMaaPMRSinkPluginConfig sinkPluginConfig = getTestDMaaPMRSinkPluginConfig();
+        assertThat(sinkPluginConfig.getReferenceName(), is(DMAAP_MR_SINK_PLUGIN_REFERENCE_NAME));
+        assertThat(sinkPluginConfig.getHostName(), is(DMAAP_MR_SINK_PLUGIN_HOST_NAME));
+        assertThat(sinkPluginConfig.getTopicName(), is(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));
+        assertThat(sinkPluginConfig.getPortNumber(), is(DMAAP_MR_SINK_PLUGIN_PORT_NUMBER));
+        assertThat(sinkPluginConfig.getProtocol(), is(DMAAP_MR_SINK_PLUGIN_PROTOCOL));
+        assertThat(sinkPluginConfig.getUserName(), is(DMAAP_MR_SINK_PLUGIN_USERNAME));
+        assertThat(sinkPluginConfig.getUserPassword(), is(DMAAP_MR_SINK_PLUGIN_PASSWORD));
+        assertThat(sinkPluginConfig.getContentType(), is(DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE));
+        assertThat(sinkPluginConfig.getMessageColumnName(), is(DMAAP_MR_SINK_MESSAGE_COLUMN_NAME));
+        assertThat(sinkPluginConfig.getMaxBatchSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE));
+        assertThat(sinkPluginConfig.getMaxRecoveryQueueSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE));
+    }
+
+    @Test
+    public void testValidToString() throws Exception {
+        final TestDMaaPMRSinkPluginConfig sinkPluginConfig = getTestDMaaPMRSinkPluginConfig();
+        assertNotNull(sinkPluginConfig.toString());
+        assertTrue(sinkPluginConfig.toString().contains(DMAAP_MR_SINK_PLUGIN_HOST_NAME));
+    }
+
+
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertNull;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/23/2017.\r
- */\r
-public class DMaaPMRSourcePluginConfigTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    @Test\r
-    public void testDMaaPMRSourcePluginConfigDefaults() throws Exception {\r
-        final DMaaPMRSourcePluginConfig sourcePluginConfig = new DMaaPMRSourcePluginConfig\r
-                (DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME, DMAAP_MR_SOURCE_PLUGIN_HOST_NAME,\r
-                        DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME, DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL);\r
-\r
-        assertThat(sourcePluginConfig.getReferenceName(), is(DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME));\r
-        assertThat(sourcePluginConfig.getHostName(), is(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));\r
-        assertThat(sourcePluginConfig.getTopicName(), is(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME));\r
-        assertThat(sourcePluginConfig.getPollingInterval(), is(DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL));\r
-        assertNull(sourcePluginConfig.getPortNumber());\r
-        assertNull(sourcePluginConfig.getProtocol());\r
-        assertNull(sourcePluginConfig.getUserName());\r
-        assertNull(sourcePluginConfig.getUserPassword());\r
-        assertNull(sourcePluginConfig.getContentType());\r
-        assertNull(sourcePluginConfig.getConsumerGroup());\r
-        assertNull(sourcePluginConfig.getConsumerId());\r
-        assertNull(sourcePluginConfig.getMessageLimit());\r
-        assertNull(sourcePluginConfig.getTimeoutMS());\r
-    }\r
-\r
-    @Test\r
-    public void testDMaaPMRSourcePluginConfigCustom() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig sourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        assertThat(sourcePluginConfig.getReferenceName(), is(DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME));\r
-        assertThat(sourcePluginConfig.getHostName(), is(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));\r
-        assertThat(sourcePluginConfig.getTopicName(), is(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME));\r
-        assertThat(sourcePluginConfig.getPollingInterval(), is(DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL));\r
-        assertThat(sourcePluginConfig.getPortNumber(), is(DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER));\r
-        assertThat(sourcePluginConfig.getProtocol(), is(DMAAP_MR_SOURCE_PLUGIN_PROTOCOL));\r
-        assertThat(sourcePluginConfig.getUserName(), is(DMAAP_MR_SOURCE_PLUGIN_USERNAME));\r
-        assertThat(sourcePluginConfig.getUserPassword(), is(DMAAP_MR_SOURCE_PLUGIN_PASSWORD));\r
-        assertThat(sourcePluginConfig.getContentType(), is(DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE));\r
-        assertThat(sourcePluginConfig.getConsumerGroup(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP));\r
-        assertThat(sourcePluginConfig.getConsumerId(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID));\r
-        assertThat(sourcePluginConfig.getMessageLimit(), is(DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT));\r
-        assertThat(sourcePluginConfig.getTimeoutMS(), is(DMAAP_MR_SOURCE_PLUGIN_TIMEOUT));\r
-    }\r
-\r
-    @Test\r
-    public void testValidToString() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig sourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        assertNotNull(sourcePluginConfig.toString());\r
-        assertTrue(sourcePluginConfig.toString().contains(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/23/2017.
+ */
+public class DMaaPMRSourcePluginConfigTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    @Test
+    public void testDMaaPMRSourcePluginConfigDefaults() throws Exception {
+        final DMaaPMRSourcePluginConfig sourcePluginConfig = new DMaaPMRSourcePluginConfig
+                (DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME, DMAAP_MR_SOURCE_PLUGIN_HOST_NAME,
+                        DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME, DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL);
+
+        assertThat(sourcePluginConfig.getReferenceName(), is(DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME));
+        assertThat(sourcePluginConfig.getHostName(), is(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));
+        assertThat(sourcePluginConfig.getTopicName(), is(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME));
+        assertThat(sourcePluginConfig.getPollingInterval(), is(DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL));
+        assertNull(sourcePluginConfig.getPortNumber());
+        assertNull(sourcePluginConfig.getProtocol());
+        assertNull(sourcePluginConfig.getUserName());
+        assertNull(sourcePluginConfig.getUserPassword());
+        assertNull(sourcePluginConfig.getContentType());
+        assertNull(sourcePluginConfig.getConsumerGroup());
+        assertNull(sourcePluginConfig.getConsumerId());
+        assertNull(sourcePluginConfig.getMessageLimit());
+        assertNull(sourcePluginConfig.getTimeoutMS());
+    }
+
+    @Test
+    public void testDMaaPMRSourcePluginConfigCustom() throws Exception {
+        final TestDMaaPMRSourcePluginConfig sourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        assertThat(sourcePluginConfig.getReferenceName(), is(DMAAP_MR_SOURCE_PLUGIN_REFERENCE_NAME));
+        assertThat(sourcePluginConfig.getHostName(), is(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));
+        assertThat(sourcePluginConfig.getTopicName(), is(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME));
+        assertThat(sourcePluginConfig.getPollingInterval(), is(DMAAP_MR_SOURCE_PLUGIN_POLLING_INTERVAL));
+        assertThat(sourcePluginConfig.getPortNumber(), is(DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER));
+        assertThat(sourcePluginConfig.getProtocol(), is(DMAAP_MR_SOURCE_PLUGIN_PROTOCOL));
+        assertThat(sourcePluginConfig.getUserName(), is(DMAAP_MR_SOURCE_PLUGIN_USERNAME));
+        assertThat(sourcePluginConfig.getUserPassword(), is(DMAAP_MR_SOURCE_PLUGIN_PASSWORD));
+        assertThat(sourcePluginConfig.getContentType(), is(DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE));
+        assertThat(sourcePluginConfig.getConsumerGroup(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP));
+        assertThat(sourcePluginConfig.getConsumerId(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID));
+        assertThat(sourcePluginConfig.getMessageLimit(), is(DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT));
+        assertThat(sourcePluginConfig.getTimeoutMS(), is(DMAAP_MR_SOURCE_PLUGIN_TIMEOUT));
+    }
+
+    @Test
+    public void testValidToString() throws Exception {
+        final TestDMaaPMRSourcePluginConfig sourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        assertNotNull(sourcePluginConfig.toString());
+        assertTrue(sourcePluginConfig.toString().contains(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));
+    }
+
+}
@@ -1,76 +1,76 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * Test {@link DMaaPMRSinkPluginConfig} for testing purposes only\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/23/2017.\r
- */\r
-public class TestDMaaPMRSinkPluginConfig extends DMaaPMRSinkPluginConfig {\r
-\r
-    public void setReferenceName(String referenceName) {\r
-        this.referenceName = referenceName;\r
-    }\r
-\r
-    public void setHostName(String hostName) {\r
-        this.hostName = hostName;\r
-    }\r
-\r
-    public void setPortNumber(@Nullable Integer portNumber) {\r
-        this.portNumber = portNumber;\r
-    }\r
-\r
-    public void setTopicName(String topicName) {\r
-        this.topicName = topicName;\r
-    }\r
-\r
-    public void setProtocol(@Nullable String protocol) {\r
-        this.protocol = protocol;\r
-    }\r
-\r
-    public void setUserName(@Nullable String userName) {\r
-        this.userName = userName;\r
-    }\r
-\r
-    public void setUserPassword(@Nullable String userPassword) {\r
-        this.userPassword = userPassword;\r
-    }\r
-\r
-    public void setContentType(@Nullable String contentType) {\r
-        this.contentType = contentType;\r
-    }\r
-\r
-    public void setMaxBatchSize(@Nullable Integer maxBatchSize) {\r
-        this.maxBatchSize = maxBatchSize;\r
-    }\r
-\r
-    public void setMaxRecoveryQueueSize(@Nullable Integer maxRecoveryQueueSize) {\r
-        this.maxRecoveryQueueSize = maxRecoveryQueueSize;\r
-    }\r
-\r
-    public void setMessageColumnName(String messageColumnName) {\r
-        this.messageColumnName = messageColumnName;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import javax.annotation.Nullable;
+
+/**
+ * Test {@link DMaaPMRSinkPluginConfig} for testing purposes only
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/23/2017.
+ */
+public class TestDMaaPMRSinkPluginConfig extends DMaaPMRSinkPluginConfig {
+
+    public void setReferenceName(String referenceName) {
+        this.referenceName = referenceName;
+    }
+
+    public void setHostName(String hostName) {
+        this.hostName = hostName;
+    }
+
+    public void setPortNumber(@Nullable Integer portNumber) {
+        this.portNumber = portNumber;
+    }
+
+    public void setTopicName(String topicName) {
+        this.topicName = topicName;
+    }
+
+    public void setProtocol(@Nullable String protocol) {
+        this.protocol = protocol;
+    }
+
+    public void setUserName(@Nullable String userName) {
+        this.userName = userName;
+    }
+
+    public void setUserPassword(@Nullable String userPassword) {
+        this.userPassword = userPassword;
+    }
+
+    public void setContentType(@Nullable String contentType) {
+        this.contentType = contentType;
+    }
+
+    public void setMaxBatchSize(@Nullable Integer maxBatchSize) {
+        this.maxBatchSize = maxBatchSize;
+    }
+
+    public void setMaxRecoveryQueueSize(@Nullable Integer maxRecoveryQueueSize) {
+        this.maxRecoveryQueueSize = maxRecoveryQueueSize;
+    }
+
+    public void setMessageColumnName(String messageColumnName) {
+        this.messageColumnName = messageColumnName;
+    }
+
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * Test {@link DMaaPMRSourcePluginConfig} for testing purposes only\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/23/2017.\r
- */\r
-public class TestDMaaPMRSourcePluginConfig extends DMaaPMRSourcePluginConfig {\r
-\r
-    public void setReferenceName(String referenceName) {\r
-        this.referenceName = referenceName;\r
-    }\r
-\r
-    public void setHostName(String hostName) {\r
-        this.hostName = hostName;\r
-    }\r
-\r
-    public void setPortNumber(@Nullable Integer portNumber) {\r
-        this.portNumber = portNumber;\r
-    }\r
-\r
-    public void setTopicName(String topicName) {\r
-        this.topicName = topicName;\r
-    }\r
-\r
-    public void setPollingInterval(Integer pollingInterval) {\r
-        this.pollingInterval = pollingInterval;\r
-    }\r
-\r
-    public void setProtocol(@Nullable String protocol) {\r
-        this.protocol = protocol;\r
-    }\r
-\r
-    public void setUserName(@Nullable String userName) {\r
-        this.userName = userName;\r
-    }\r
-\r
-    public void setUserPassword(@Nullable String userPassword) {\r
-        this.userPassword = userPassword;\r
-    }\r
-\r
-    public void setContentType(@Nullable String contentType) {\r
-        this.contentType = contentType;\r
-    }\r
-\r
-    public void setConsumerId(@Nullable String consumerId) {\r
-        this.consumerId = consumerId;\r
-    }\r
-\r
-    public void setConsumerGroup(@Nullable String consumerGroup) {\r
-        this.consumerGroup = consumerGroup;\r
-    }\r
-\r
-    public void setTimeoutMS(@Nullable Integer timeoutMS) {\r
-        this.timeoutMS = timeoutMS;\r
-    }\r
-\r
-    public void setMessageLimit(@Nullable Integer messageLimit) {\r
-        this.messageLimit = messageLimit;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
+
+import javax.annotation.Nullable;
+
+/**
+ * Test {@link DMaaPMRSourcePluginConfig} for testing purposes only
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/23/2017.
+ */
+public class TestDMaaPMRSourcePluginConfig extends DMaaPMRSourcePluginConfig {
+
+    public void setReferenceName(String referenceName) {
+        this.referenceName = referenceName;
+    }
+
+    public void setHostName(String hostName) {
+        this.hostName = hostName;
+    }
+
+    public void setPortNumber(@Nullable Integer portNumber) {
+        this.portNumber = portNumber;
+    }
+
+    public void setTopicName(String topicName) {
+        this.topicName = topicName;
+    }
+
+    public void setPollingInterval(Integer pollingInterval) {
+        this.pollingInterval = pollingInterval;
+    }
+
+    public void setProtocol(@Nullable String protocol) {
+        this.protocol = protocol;
+    }
+
+    public void setUserName(@Nullable String userName) {
+        this.userName = userName;
+    }
+
+    public void setUserPassword(@Nullable String userPassword) {
+        this.userPassword = userPassword;
+    }
+
+    public void setContentType(@Nullable String contentType) {
+        this.contentType = contentType;
+    }
+
+    public void setConsumerId(@Nullable String consumerId) {
+        this.consumerId = consumerId;
+    }
+
+    public void setConsumerGroup(@Nullable String consumerGroup) {
+        this.consumerGroup = consumerGroup;
+    }
+
+    public void setTimeoutMS(@Nullable Integer timeoutMS) {
+        this.timeoutMS = timeoutMS;
+    }
+
+    public void setMessageLimit(@Nullable Integer messageLimit) {
+        this.messageLimit = messageLimit;
+    }
+
+}
@@ -1,50 +1,50 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 3/3/2017.\r
- */\r
-public class TestJsonPathFilterPluginConfig extends JsonPathFilterPluginConfig {\r
-\r
-    public TestJsonPathFilterPluginConfig(final String referenceName, final String incomingJsonFieldName,\r
-                                          final String outputSchemaFieldName, final String jsonFilterMappings,\r
-                                          final String schema) {\r
-        super(referenceName, incomingJsonFieldName, outputSchemaFieldName, jsonFilterMappings, schema);\r
-    }\r
-\r
-\r
-    public void setIncomingJsonFieldName(String incomingJsonFieldName) {\r
-        this.incomingJsonFieldName = incomingJsonFieldName;\r
-    }\r
-\r
-    public void setOutputSchemaFieldName(String outputSchemaFieldName) {\r
-        this.outputSchemaFieldName = outputSchemaFieldName;\r
-    }\r
-\r
-    public void setJsonFilterMappings(String jsonFilterMappings) {\r
-        this.jsonFilterMappings = jsonFilterMappings;\r
-    }\r
-\r
-    public void setSchema(String schema) {\r
-        this.schema = schema;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter;
+
+/**
+ * @author Rajiv Singla . Creation Date: 3/3/2017.
+ */
+public class TestJsonPathFilterPluginConfig extends JsonPathFilterPluginConfig {
+
+    public TestJsonPathFilterPluginConfig(final String referenceName, final String incomingJsonFieldName,
+                                          final String outputSchemaFieldName, final String jsonFilterMappings,
+                                          final String schema) {
+        super(referenceName, incomingJsonFieldName, outputSchemaFieldName, jsonFilterMappings, schema);
+    }
+
+
+    public void setIncomingJsonFieldName(String incomingJsonFieldName) {
+        this.incomingJsonFieldName = incomingJsonFieldName;
+    }
+
+    public void setOutputSchemaFieldName(String outputSchemaFieldName) {
+        this.outputSchemaFieldName = outputSchemaFieldName;
+    }
+
+    public void setJsonFilterMappings(String jsonFilterMappings) {
+        this.jsonFilterMappings = jsonFilterMappings;
+    }
+
+    public void setSchema(String schema) {
+        this.schema = schema;
+    }
+}
@@ -1,56 +1,56 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/17/2017.\r
- */\r
-public class TestSimpleTCAPluginConfig extends SimpleTCAPluginConfig {\r
-\r
-    public TestSimpleTCAPluginConfig(String vesMessageFieldName, String policyJson, String alertFieldName,\r
-                                     String messageTypeFieldName, String schema, Boolean enableAlertCEFFormat) {\r
-        super(vesMessageFieldName, policyJson, alertFieldName, messageTypeFieldName, schema, enableAlertCEFFormat);\r
-    }\r
-\r
-    public void setVesMessageFieldName(String vesMessageFieldName) {\r
-        this.vesMessageFieldName = vesMessageFieldName;\r
-    }\r
-\r
-    public void setPolicyJson(String policyJson) {\r
-        this.policyJson = policyJson;\r
-    }\r
-\r
-    public void setAlertFieldName(String alertFieldName) {\r
-        this.alertFieldName = alertFieldName;\r
-    }\r
-\r
-    public void setMessageTypeFieldName(String messageTypeFieldName) {\r
-        this.messageTypeFieldName = messageTypeFieldName;\r
-    }\r
-\r
-    public void setSchema(String schema) {\r
-        this.schema = schema;\r
-    }\r
-\r
-    public void setEnableAlertCEFFormat(Boolean enableAlertCEFFormat) {\r
-        this.enableAlertCEFFormat = enableAlertCEFFormat;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/17/2017.
+ */
+public class TestSimpleTCAPluginConfig extends SimpleTCAPluginConfig {
+
+    public TestSimpleTCAPluginConfig(String vesMessageFieldName, String policyJson, String alertFieldName,
+                                     String messageTypeFieldName, String schema, Boolean enableAlertCEFFormat) {
+        super(vesMessageFieldName, policyJson, alertFieldName, messageTypeFieldName, schema, enableAlertCEFFormat);
+    }
+
+    public void setVesMessageFieldName(String vesMessageFieldName) {
+        this.vesMessageFieldName = vesMessageFieldName;
+    }
+
+    public void setPolicyJson(String policyJson) {
+        this.policyJson = policyJson;
+    }
+
+    public void setAlertFieldName(String alertFieldName) {
+        this.alertFieldName = alertFieldName;
+    }
+
+    public void setMessageTypeFieldName(String messageTypeFieldName) {
+        this.messageTypeFieldName = messageTypeFieldName;
+    }
+
+    public void setSchema(String schema) {
+        this.schema = schema;
+    }
+
+    public void setEnableAlertCEFFormat(Boolean enableAlertCEFFormat) {
+        this.enableAlertCEFFormat = enableAlertCEFFormat;
+    }
+}
@@ -1,63 +1,63 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap;\r
-\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.hasItems;\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/25/2017.\r
- */\r
-public class DMaaPSourceOutputSchemaTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testGetSchemaColumnName() throws Exception {\r
-        assertThat(DMaaPSourceOutputSchema.TIMESTAMP.getSchemaColumnName(), is("ts"));\r
-        assertThat(DMaaPSourceOutputSchema.RESPONSE_CODE.getSchemaColumnName(), is("responseCode"));\r
-        assertThat(DMaaPSourceOutputSchema.RESPONSE_MESSAGE.getSchemaColumnName(), is("responseMessage"));\r
-        assertThat(DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName(), is("message"));\r
-    }\r
-\r
-    @Test\r
-    public void testGetSchema() throws Exception {\r
-        final Schema schema = DMaaPSourceOutputSchema.getSchema();\r
-        final List<Schema.Field> fields = schema.getFields();\r
-        final List<String> fieldNames = new LinkedList<>();\r
-        for (Schema.Field field : fields) {\r
-            fieldNames.add(field.getName());\r
-        }\r
-        assertThat(fieldNames, hasItems(\r
-                DMaaPSourceOutputSchema.TIMESTAMP.getSchemaColumnName(),\r
-                DMaaPSourceOutputSchema.RESPONSE_CODE.getSchemaColumnName(),\r
-                DMaaPSourceOutputSchema.RESPONSE_MESSAGE.getSchemaColumnName(),\r
-                DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName()));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap;
+
+import co.cask.cdap.api.data.schema.Schema;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.hasItems;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/25/2017.
+ */
+public class DMaaPSourceOutputSchemaTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+
+    @Test
+    public void testGetSchemaColumnName() throws Exception {
+        assertThat(DMaaPSourceOutputSchema.TIMESTAMP.getSchemaColumnName(), is("ts"));
+        assertThat(DMaaPSourceOutputSchema.RESPONSE_CODE.getSchemaColumnName(), is("responseCode"));
+        assertThat(DMaaPSourceOutputSchema.RESPONSE_MESSAGE.getSchemaColumnName(), is("responseMessage"));
+        assertThat(DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName(), is("message"));
+    }
+
+    @Test
+    public void testGetSchema() throws Exception {
+        final Schema schema = DMaaPSourceOutputSchema.getSchema();
+        final List<Schema.Field> fields = schema.getFields();
+        final List<String> fieldNames = new LinkedList<>();
+        for (Schema.Field field : fields) {
+            fieldNames.add(field.getName());
+        }
+        assertThat(fieldNames, hasItems(
+                DMaaPSourceOutputSchema.TIMESTAMP.getSchemaColumnName(),
+                DMaaPSourceOutputSchema.RESPONSE_CODE.getSchemaColumnName(),
+                DMaaPSourceOutputSchema.RESPONSE_MESSAGE.getSchemaColumnName(),
+                DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName()));
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.it;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.api.dataset.table.Table;\r
-import co.cask.cdap.api.plugin.PluginClass;\r
-import co.cask.cdap.api.plugin.PluginPropertyField;\r
-import co.cask.cdap.common.utils.Tasks;\r
-import co.cask.cdap.datapipeline.DataPipelineApp;\r
-import co.cask.cdap.datapipeline.SmartWorkflow;\r
-import co.cask.cdap.etl.api.batch.SparkCompute;\r
-import co.cask.cdap.etl.mock.batch.MockSink;\r
-import co.cask.cdap.etl.mock.batch.MockSource;\r
-import co.cask.cdap.etl.mock.test.HydratorTestBase;\r
-import co.cask.cdap.etl.proto.v2.ETLBatchConfig;\r
-import co.cask.cdap.etl.proto.v2.ETLPlugin;\r
-import co.cask.cdap.etl.proto.v2.ETLStage;\r
-import co.cask.cdap.proto.artifact.AppRequest;\r
-import co.cask.cdap.proto.artifact.ArtifactSummary;\r
-import co.cask.cdap.proto.id.ApplicationId;\r
-import co.cask.cdap.proto.id.ArtifactId;\r
-import co.cask.cdap.proto.id.NamespaceId;\r
-import co.cask.cdap.test.ApplicationManager;\r
-import co.cask.cdap.test.DataSetManager;\r
-import co.cask.cdap.test.WorkflowManager;\r
-import com.google.common.base.Joiner;\r
-import com.google.common.collect.ImmutableMap;\r
-import com.google.common.collect.ImmutableSet;\r
-import com.google.common.collect.Sets;\r
-import org.junit.AfterClass;\r
-import org.junit.BeforeClass;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.sparkcompute.tca.SimpleTCAPlugin;\r
-import org.openecomp.dcae.apod.analytics.common.validation.DCAEValidator;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.net.URI;\r
-import java.nio.charset.Charset;\r
-import java.nio.file.Files;\r
-import java.nio.file.Paths;\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.HashMap;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.concurrent.Callable;\r
-import java.util.concurrent.TimeUnit;\r
-\r
-/**\r
- * Integration Test which used CDAP Hydrator Test Base to Test Simple TCA Plugin\r
- *\r
- * @author Rajiv Singla . Creation Date: 2/17/2017.\r
- */\r
-public class SimpleTCAPluginCDAPIT extends HydratorTestBase {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleTCAPluginCDAPIT.class);\r
-\r
-    private static final String CDAP_PLUGIN_VERSION = "3.0-SNAPSHOT";\r
-    private static final String CDAP_PLUGIN_ARTIFACT_NAME = "dcae-analytics-cdap-plugins";\r
-\r
-    protected static final ArtifactId DATAPIPELINE_ARTIFACT_ID = NamespaceId.DEFAULT.artifact("data-pipeline",\r
-            "4.0.0");\r
-    protected static final ArtifactSummary DATAPIPELINE_ARTIFACT = new ArtifactSummary("data-pipeline", "4.0.0");\r
-\r
-    private static Schema sourceSchema = Schema.recordOf("CEFMessageSourceSchema",\r
-            Schema.Field.of("message", Schema.of(Schema.Type.STRING))\r
-    );\r
-\r
-    final Schema outputSchema = Schema.recordOf(\r
-            "outputSchema",\r
-            Schema.Field.of("message", Schema.of(Schema.Type.STRING)),\r
-            Schema.Field.of("alert", Schema.nullableOf(Schema.of(Schema.Type.STRING))),\r
-            Schema.Field.of("tcaMessageType", Schema.of(Schema.Type.STRING))\r
-    );\r
-\r
-    @BeforeClass\r
-    public static void setupTest() throws Exception {\r
-\r
-        setupBatchArtifacts(DATAPIPELINE_ARTIFACT_ID, DataPipelineApp.class);\r
-\r
-\r
-        // Enable the below code if you want to run the test in Intelli IDEA editor\r
-        // addPluginArtifact(NamespaceId.DEFAULT.artifact("spark-plugins", "1.0.0"), DATAPIPELINE_ARTIFACT_ID,\r
-        //        SimpleTCAPlugin.class, SimpleTCAPluginConfig.class);\r
-\r
-        // Enable the below code if you want to run the test via command line\r
-        ArtifactId dcaeAnalyticsCdapPluginsArtifact = NamespaceId.DEFAULT.artifact(\r
-                CDAP_PLUGIN_ARTIFACT_NAME, CDAP_PLUGIN_VERSION);\r
-\r
-        addPluginArtifact(dcaeAnalyticsCdapPluginsArtifact, DATAPIPELINE_ARTIFACT_ID,\r
-                ImmutableSet.of(getSimpleTCAPluginClass()), SimpleTCAPlugin.class, SimpleTCAPluginConfig.class,\r
-                CDAPAppSettingsValidator.class, DCAEValidator.class);\r
-    }\r
-\r
-    private static PluginClass getSimpleTCAPluginClass() {\r
-        final HashMap<String, PluginPropertyField> properties = new HashMap<>();\r
-        properties.put("vesMessageFieldName", new PluginPropertyField("vesMessageFieldName", "",\r
-                "string", false, false));\r
-        properties.put("referenceName", new PluginPropertyField("referenceName", "",\r
-                "string", false, false));\r
-        properties.put("policyJson", new PluginPropertyField("policyJson", "", "string", false, false));\r
-        properties.put("alertFieldName", new PluginPropertyField("alertFieldName", "", "string", false, false));\r
-        properties.put("messageTypeFieldName", new PluginPropertyField(\r
-                "messageTypeFieldName", "", "string", false, false));\r
-        properties.put("enableAlertCEFFormat", new PluginPropertyField(\r
-                "enableAlertCEFFormat", "", "string", false, false));\r
-        properties.put("schema", new PluginPropertyField(\r
-                "schema", "", "string", false, false));\r
-\r
-        return new PluginClass("sparkcompute", "SimpleTCAPlugin", "", SimpleTCAPlugin.class.getName(),\r
-                "pluginConfig", properties);\r
-    }\r
-\r
-\r
-    @AfterClass\r
-    public static void cleanup() {\r
-    }\r
-\r
-    @Test\r
-    @SuppressWarnings("deprecation")\r
-    public void testTransform() throws Exception {\r
-\r
-        LOG.info("Starting Test Transform");\r
-\r
-        final String policyString = getFileContentAsString("/data/json/policy/tca_policy.json");\r
-        final String cefMessage = getFileContentAsString("/data/json/cef/cef_message.json");\r
-\r
-        final Map<String, String> tcaProperties = new ImmutableMap.Builder<String, String>()\r
-                .put("vesMessageFieldName", "message")\r
-                .put("referenceName", "SimpleTcaPlugin")\r
-                .put("policyJson", policyString)\r
-                .put("alertFieldName", "alert")\r
-                .put("messageTypeFieldName", "tcaMessageType")\r
-                .put("enableAlertCEFFormat", "true")\r
-                .put("schema", outputSchema.toString())\r
-                .build();\r
-\r
-        final ETLPlugin mockSourcePlugin = MockSource.getPlugin("messages", sourceSchema);\r
-        final ETLPlugin tcaPlugin =\r
-                new ETLPlugin("SimpleTCAPlugin", SparkCompute.PLUGIN_TYPE, tcaProperties, null);\r
-        final ETLPlugin mockSink = MockSink.getPlugin("tcaOutput");\r
-\r
-        final ETLBatchConfig etlBatchConfig = ETLBatchConfig.builder("* * * * *")\r
-                .addStage(new ETLStage("source", mockSourcePlugin))\r
-                .addStage(new ETLStage("simpleTCAPlugin", tcaPlugin))\r
-                .addStage(new ETLStage("sink", mockSink))\r
-                .addConnection("source", "simpleTCAPlugin")\r
-                .addConnection("simpleTCAPlugin", "sink")\r
-                .build();\r
-\r
-        AppRequest<ETLBatchConfig> appRequest = new AppRequest<>(DATAPIPELINE_ARTIFACT, etlBatchConfig);\r
-        ApplicationId appId = NamespaceId.DEFAULT.app("TestSimpleTCAPlugin");\r
-        ApplicationManager appManager = deployApplication(appId.toId(), appRequest);\r
-\r
-        List<StructuredRecord> sourceMessages = new ArrayList<>();\r
-        StructuredRecord.Builder builder = StructuredRecord.builder(sourceSchema);\r
-        builder.set("message", cefMessage);\r
-        sourceMessages.add(builder.build());\r
-\r
-        // write records to source\r
-        DataSetManager<Table> inputManager = getDataset(NamespaceId.DEFAULT.dataset("messages"));\r
-        MockSource.writeInput(inputManager, sourceMessages);\r
-\r
-        // manually trigger the pipeline\r
-        WorkflowManager workflowManager = appManager.getWorkflowManager(SmartWorkflow.NAME);\r
-        workflowManager.start();\r
-        workflowManager.waitForFinish(5, TimeUnit.MINUTES);\r
-\r
-        final DataSetManager<Table> outputManager = getDataset("tcaOutput");\r
-\r
-        Tasks.waitFor(\r
-                TCACalculatorMessageType.COMPLIANT.name(),\r
-                new Callable<String>() {\r
-                    @Override\r
-                    public String call() throws Exception {\r
-                        outputManager.flush();\r
-                        List<String> tcaOutputMessageType = new LinkedList<>();\r
-                        for (StructuredRecord outputRecord : MockSink.readOutput(outputManager)) {\r
-                            tcaOutputMessageType.add(outputRecord.get("tcaMessageType").toString());\r
-                            final List<Schema.Field> fields = outputRecord.getSchema().getFields();\r
-                            LOG.debug("====>> Printing output Structured Record Contents: {}", outputRecord);\r
-                            for (Schema.Field field : fields) {\r
-                                LOG.debug("Field Name: {} - Field Type: {}  ---> Field Value: {}",\r
-                                        field.getName(), field.getSchema().getType(),\r
-                                        outputRecord.get(field.getName()));\r
-                            }\r
-\r
-                        }\r
-                        return tcaOutputMessageType.get(0);\r
-                    }\r
-                },\r
-                4,\r
-                TimeUnit.MINUTES);\r
-\r
-    }\r
-\r
-    private static String getFileContentAsString(final String fileLocation) throws Exception {\r
-        final URI tcaPolicyURI =\r
-                SimpleTCAPluginCDAPIT.class.getResource(fileLocation).toURI();\r
-        List<String> lines = Files.readAllLines(Paths.get(tcaPolicyURI), Charset.defaultCharset());\r
-        return Joiner.on("").join(lines);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.it;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.api.dataset.table.Table;
+import co.cask.cdap.api.plugin.PluginClass;
+import co.cask.cdap.api.plugin.PluginPropertyField;
+import co.cask.cdap.common.utils.Tasks;
+import co.cask.cdap.datapipeline.DataPipelineApp;
+import co.cask.cdap.datapipeline.SmartWorkflow;
+import co.cask.cdap.etl.api.batch.SparkCompute;
+import co.cask.cdap.etl.mock.batch.MockSink;
+import co.cask.cdap.etl.mock.batch.MockSource;
+import co.cask.cdap.etl.mock.test.HydratorTestBase;
+import co.cask.cdap.etl.proto.v2.ETLBatchConfig;
+import co.cask.cdap.etl.proto.v2.ETLPlugin;
+import co.cask.cdap.etl.proto.v2.ETLStage;
+import co.cask.cdap.proto.artifact.AppRequest;
+import co.cask.cdap.proto.artifact.ArtifactSummary;
+import co.cask.cdap.proto.id.ApplicationId;
+import co.cask.cdap.proto.id.ArtifactId;
+import co.cask.cdap.proto.id.NamespaceId;
+import co.cask.cdap.test.ApplicationManager;
+import co.cask.cdap.test.DataSetManager;
+import co.cask.cdap.test.WorkflowManager;
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.sparkcompute.tca.SimpleTCAPlugin;
+import org.onap.dcae.apod.analytics.common.validation.DCAEValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Integration Test which used CDAP Hydrator Test Base to Test Simple TCA Plugin
+ *
+ * @author Rajiv Singla . Creation Date: 2/17/2017.
+ */
+public class SimpleTCAPluginCDAPIT extends HydratorTestBase {
+
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleTCAPluginCDAPIT.class);
+
+    private static final String CDAP_PLUGIN_VERSION = "3.0-SNAPSHOT";
+    private static final String CDAP_PLUGIN_ARTIFACT_NAME = "dcae-analytics-cdap-plugins";
+
+    protected static final ArtifactId DATAPIPELINE_ARTIFACT_ID = NamespaceId.DEFAULT.artifact("data-pipeline",
+            "4.0.0");
+    protected static final ArtifactSummary DATAPIPELINE_ARTIFACT = new ArtifactSummary("data-pipeline", "4.0.0");
+
+    private static Schema sourceSchema = Schema.recordOf("CEFMessageSourceSchema",
+            Schema.Field.of("message", Schema.of(Schema.Type.STRING))
+    );
+
+    final Schema outputSchema = Schema.recordOf(
+            "outputSchema",
+            Schema.Field.of("message", Schema.of(Schema.Type.STRING)),
+            Schema.Field.of("alert", Schema.nullableOf(Schema.of(Schema.Type.STRING))),
+            Schema.Field.of("tcaMessageType", Schema.of(Schema.Type.STRING))
+    );
+
+    @BeforeClass
+    public static void setupTest() throws Exception {
+
+        setupBatchArtifacts(DATAPIPELINE_ARTIFACT_ID, DataPipelineApp.class);
+
+
+        // Enable the below code if you want to run the test in Intelli IDEA editor
+        // addPluginArtifact(NamespaceId.DEFAULT.artifact("spark-plugins", "1.0.0"), DATAPIPELINE_ARTIFACT_ID,
+        //        SimpleTCAPlugin.class, SimpleTCAPluginConfig.class);
+
+        // Enable the below code if you want to run the test via command line
+        ArtifactId dcaeAnalyticsCdapPluginsArtifact = NamespaceId.DEFAULT.artifact(
+                CDAP_PLUGIN_ARTIFACT_NAME, CDAP_PLUGIN_VERSION);
+
+        addPluginArtifact(dcaeAnalyticsCdapPluginsArtifact, DATAPIPELINE_ARTIFACT_ID,
+                ImmutableSet.of(getSimpleTCAPluginClass()), SimpleTCAPlugin.class, SimpleTCAPluginConfig.class,
+                CDAPAppSettingsValidator.class, DCAEValidator.class);
+    }
+
+    private static PluginClass getSimpleTCAPluginClass() {
+        final HashMap<String, PluginPropertyField> properties = new HashMap<>();
+        properties.put("vesMessageFieldName", new PluginPropertyField("vesMessageFieldName", "",
+                "string", false, false));
+        properties.put("referenceName", new PluginPropertyField("referenceName", "",
+                "string", false, false));
+        properties.put("policyJson", new PluginPropertyField("policyJson", "", "string", false, false));
+        properties.put("alertFieldName", new PluginPropertyField("alertFieldName", "", "string", false, false));
+        properties.put("messageTypeFieldName", new PluginPropertyField(
+                "messageTypeFieldName", "", "string", false, false));
+        properties.put("enableAlertCEFFormat", new PluginPropertyField(
+                "enableAlertCEFFormat", "", "string", false, false));
+        properties.put("schema", new PluginPropertyField(
+                "schema", "", "string", false, false));
+
+        return new PluginClass("sparkcompute", "SimpleTCAPlugin", "", SimpleTCAPlugin.class.getName(),
+                "pluginConfig", properties);
+    }
+
+
+    @AfterClass
+    public static void cleanup() {
+    }
+
+    @Test
+    @SuppressWarnings("deprecation")
+    public void testTransform() throws Exception {
+
+        LOG.info("Starting Test Transform");
+
+        final String policyString = getFileContentAsString("/data/json/policy/tca_policy.json");
+        final String cefMessage = getFileContentAsString("/data/json/cef/cef_message.json");
+
+        final Map<String, String> tcaProperties = new ImmutableMap.Builder<String, String>()
+                .put("vesMessageFieldName", "message")
+                .put("referenceName", "SimpleTcaPlugin")
+                .put("policyJson", policyString)
+                .put("alertFieldName", "alert")
+                .put("messageTypeFieldName", "tcaMessageType")
+                .put("enableAlertCEFFormat", "true")
+                .put("schema", outputSchema.toString())
+                .build();
+
+        final ETLPlugin mockSourcePlugin = MockSource.getPlugin("messages", sourceSchema);
+        final ETLPlugin tcaPlugin =
+                new ETLPlugin("SimpleTCAPlugin", SparkCompute.PLUGIN_TYPE, tcaProperties, null);
+        final ETLPlugin mockSink = MockSink.getPlugin("tcaOutput");
+
+        final ETLBatchConfig etlBatchConfig = ETLBatchConfig.builder("* * * * *")
+                .addStage(new ETLStage("source", mockSourcePlugin))
+                .addStage(new ETLStage("simpleTCAPlugin", tcaPlugin))
+                .addStage(new ETLStage("sink", mockSink))
+                .addConnection("source", "simpleTCAPlugin")
+                .addConnection("simpleTCAPlugin", "sink")
+                .build();
+
+        AppRequest<ETLBatchConfig> appRequest = new AppRequest<>(DATAPIPELINE_ARTIFACT, etlBatchConfig);
+        ApplicationId appId = NamespaceId.DEFAULT.app("TestSimpleTCAPlugin");
+        ApplicationManager appManager = deployApplication(appId.toId(), appRequest);
+
+        List<StructuredRecord> sourceMessages = new ArrayList<>();
+        StructuredRecord.Builder builder = StructuredRecord.builder(sourceSchema);
+        builder.set("message", cefMessage);
+        sourceMessages.add(builder.build());
+
+        // write records to source
+        DataSetManager<Table> inputManager = getDataset(NamespaceId.DEFAULT.dataset("messages"));
+        MockSource.writeInput(inputManager, sourceMessages);
+
+        // manually trigger the pipeline
+        WorkflowManager workflowManager = appManager.getWorkflowManager(SmartWorkflow.NAME);
+        workflowManager.start();
+        workflowManager.waitForFinish(5, TimeUnit.MINUTES);
+
+        final DataSetManager<Table> outputManager = getDataset("tcaOutput");
+
+        Tasks.waitFor(
+                TCACalculatorMessageType.COMPLIANT.name(),
+                new Callable<String>() {
+                    @Override
+                    public String call() throws Exception {
+                        outputManager.flush();
+                        List<String> tcaOutputMessageType = new LinkedList<>();
+                        for (StructuredRecord outputRecord : MockSink.readOutput(outputManager)) {
+                            tcaOutputMessageType.add(outputRecord.get("tcaMessageType").toString());
+                            final List<Schema.Field> fields = outputRecord.getSchema().getFields();
+                            LOG.debug("====>> Printing output Structured Record Contents: {}", outputRecord);
+                            for (Schema.Field field : fields) {
+                                LOG.debug("Field Name: {} - Field Type: {}  ---> Field Value: {}",
+                                        field.getName(), field.getSchema().getType(),
+                                        outputRecord.get(field.getName()));
+                            }
+
+                        }
+                        return tcaOutputMessageType.get(0);
+                    }
+                },
+                4,
+                TimeUnit.MINUTES);
+
+    }
+
+    private static String getFileContentAsString(final String fileLocation) throws Exception {
+        final URI tcaPolicyURI =
+                SimpleTCAPluginCDAPIT.class.getResource(fileLocation).toURI();
+        List<String> lines = Files.readAllLines(Paths.get(tcaPolicyURI), Charset.defaultCharset());
+        return Joiner.on("").join(lines);
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.sparkcompute.tca;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.StageConfigurer;\r
-import co.cask.cdap.etl.api.batch.SparkExecutionPluginContext;\r
-import org.apache.spark.api.java.JavaRDD;\r
-import org.apache.spark.api.java.JavaSparkContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.TestSimpleTCAPluginConfig;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/17/2017.\r
- */\r
-public class SimpleTCAPluginTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private SimpleTCAPlugin simpleTCAPlugin;\r
-\r
-    @Before\r
-    public void before() {\r
-        final TestSimpleTCAPluginConfig testSimpleTCAPluginConfig = getTestSimpleTCAPluginConfig();\r
-        Schema outputSchema = Schema.recordOf(\r
-                "TestSimpleTCAPluginInputSchema",\r
-                Schema.Field.of("message", Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of("alert", Schema.nullableOf(Schema.of(Schema.Type.STRING))),\r
-                Schema.Field.of("tcaMessageType", Schema.of(Schema.Type.STRING))\r
-        );\r
-        testSimpleTCAPluginConfig.setSchema(outputSchema.toString());\r
-        simpleTCAPlugin = new SimpleTCAPlugin(testSimpleTCAPluginConfig);\r
-    }\r
-\r
-    @Test\r
-    public void testConfigurePipeline() throws Exception {\r
-        final PipelineConfigurer pipelineConfigurer = mock(PipelineConfigurer.class);\r
-        final StageConfigurer stageConfigurer = mock(StageConfigurer.class);\r
-        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);\r
-        when(stageConfigurer.getInputSchema()).thenReturn(getSimpleTCAPluginInputSchema());\r
-        simpleTCAPlugin.configurePipeline(pipelineConfigurer);\r
-        verify(stageConfigurer, times(1)).getInputSchema();\r
-    }\r
-\r
-    @Test\r
-    public void testTransform() throws Exception {\r
-\r
-        JavaSparkContext javaSparkContext = new JavaSparkContext("local", "test");\r
-\r
-        Schema sourceSchema = Schema.recordOf("CEFMessageSourceSchema",\r
-                Schema.Field.of("message", Schema.of(Schema.Type.STRING))\r
-        );\r
-\r
-        // Inapplicable Message Structured Record\r
-        final StructuredRecord inapplicableSR =\r
-                StructuredRecord.builder(sourceSchema).set("message", "test").build();\r
-        // compliant\r
-        final StructuredRecord compliantSR =\r
-                StructuredRecord.builder(sourceSchema).set("message",\r
-                        fromStream(CEF_MESSAGE_JSON_FILE_LOCATION)).build();\r
-        // non compliant\r
-        final String nonCompliantCEF = fromStream(CEF_NON_COMPLIANT_MESSAGE_JSON_FILE_LOCATION);\r
-        final StructuredRecord nonCompliantSR =\r
-                StructuredRecord.builder(sourceSchema).set("message", nonCompliantCEF).build();\r
-\r
-        final List<StructuredRecord> records = new LinkedList<>();\r
-        records.add(inapplicableSR);\r
-        records.add(compliantSR);\r
-        records.add(nonCompliantSR);\r
-\r
-        final JavaRDD<StructuredRecord> input =\r
-                javaSparkContext.parallelize(records);\r
-        final SparkExecutionPluginContext context = Mockito.mock(SparkExecutionPluginContext.class);\r
-        final MockStageMetrics stageMetrics = Mockito.mock(MockStageMetrics.class);\r
-        when(context.getMetrics()).thenReturn(stageMetrics);\r
-        final List<StructuredRecord> outputRecord = simpleTCAPlugin.transform(context, input).collect();\r
-        assertNotNull(outputRecord);\r
-        assertThat(outputRecord.size(), is(3));\r
-\r
-        assertTrue(outputRecord.get(0).get("tcaMessageType").equals(TCACalculatorMessageType.INAPPLICABLE.toString()));\r
-        assertTrue(outputRecord.get(1).get("tcaMessageType").equals(TCACalculatorMessageType.COMPLIANT.toString()));\r
-        assertTrue(outputRecord.get(2).get("tcaMessageType").equals(TCACalculatorMessageType.NON_COMPLIANT.toString()));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.sparkcompute.tca;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.StageConfigurer;
+import co.cask.cdap.etl.api.batch.SparkExecutionPluginContext;
+import org.apache.spark.api.java.JavaRDD;
+import org.apache.spark.api.java.JavaSparkContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.TestSimpleTCAPluginConfig;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/17/2017.
+ */
+public class SimpleTCAPluginTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private SimpleTCAPlugin simpleTCAPlugin;
+
+    @Before
+    public void before() {
+        final TestSimpleTCAPluginConfig testSimpleTCAPluginConfig = getTestSimpleTCAPluginConfig();
+        Schema outputSchema = Schema.recordOf(
+                "TestSimpleTCAPluginInputSchema",
+                Schema.Field.of("message", Schema.of(Schema.Type.STRING)),
+                Schema.Field.of("alert", Schema.nullableOf(Schema.of(Schema.Type.STRING))),
+                Schema.Field.of("tcaMessageType", Schema.of(Schema.Type.STRING))
+        );
+        testSimpleTCAPluginConfig.setSchema(outputSchema.toString());
+        simpleTCAPlugin = new SimpleTCAPlugin(testSimpleTCAPluginConfig);
+    }
+
+    @Test
+    public void testConfigurePipeline() throws Exception {
+        final PipelineConfigurer pipelineConfigurer = mock(PipelineConfigurer.class);
+        final StageConfigurer stageConfigurer = mock(StageConfigurer.class);
+        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);
+        when(stageConfigurer.getInputSchema()).thenReturn(getSimpleTCAPluginInputSchema());
+        simpleTCAPlugin.configurePipeline(pipelineConfigurer);
+        verify(stageConfigurer, times(1)).getInputSchema();
+    }
+
+    @Test
+    public void testTransform() throws Exception {
+
+        JavaSparkContext javaSparkContext = new JavaSparkContext("local", "test");
+
+        Schema sourceSchema = Schema.recordOf("CEFMessageSourceSchema",
+                Schema.Field.of("message", Schema.of(Schema.Type.STRING))
+        );
+
+        // Inapplicable Message Structured Record
+        final StructuredRecord inapplicableSR =
+                StructuredRecord.builder(sourceSchema).set("message", "test").build();
+        // compliant
+        final StructuredRecord compliantSR =
+                StructuredRecord.builder(sourceSchema).set("message",
+                        fromStream(CEF_MESSAGE_JSON_FILE_LOCATION)).build();
+        // non compliant
+        final String nonCompliantCEF = fromStream(CEF_NON_COMPLIANT_MESSAGE_JSON_FILE_LOCATION);
+        final StructuredRecord nonCompliantSR =
+                StructuredRecord.builder(sourceSchema).set("message", nonCompliantCEF).build();
+
+        final List<StructuredRecord> records = new LinkedList<>();
+        records.add(inapplicableSR);
+        records.add(compliantSR);
+        records.add(nonCompliantSR);
+
+        final JavaRDD<StructuredRecord> input =
+                javaSparkContext.parallelize(records);
+        final SparkExecutionPluginContext context = Mockito.mock(SparkExecutionPluginContext.class);
+        final MockStageMetrics stageMetrics = Mockito.mock(MockStageMetrics.class);
+        when(context.getMetrics()).thenReturn(stageMetrics);
+        final List<StructuredRecord> outputRecord = simpleTCAPlugin.transform(context, input).collect();
+        assertNotNull(outputRecord);
+        assertThat(outputRecord.size(), is(3));
+
+        assertTrue(outputRecord.get(0).get("tcaMessageType").equals(TCACalculatorMessageType.INAPPLICABLE.toString()));
+        assertTrue(outputRecord.get(1).get("tcaMessageType").equals(TCACalculatorMessageType.COMPLIANT.toString()));
+        assertTrue(outputRecord.get(2).get("tcaMessageType").equals(TCACalculatorMessageType.NON_COMPLIANT.toString()));
+    }
+
+}
@@ -1,75 +1,75 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import com.google.common.collect.ImmutableList;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/24/2017.\r
- */\r
-public class DMaaPMRReceiverTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testStoreStructuredRecords() throws Exception {\r
-\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        final TestDMaaPMRReceiver dMaaPMRReceiver =\r
-                new TestDMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), testDMaaPMRSourcePluginConfig);\r
-\r
-        final DMaaPMRSubscriber dMaaPMRSubscriber = Mockito.mock(DMaaPMRSubscriber.class);\r
-        final DMaaPMRSubscriberResponse subscriberResponse = Mockito.mock(DMaaPMRSubscriberResponse.class);\r
-        when(dMaaPMRSubscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        when(subscriberResponse.getFetchedMessages()).thenReturn(ImmutableList.of("Test Message"));\r
-        when(subscriberResponse.getResponseCode()).thenReturn(200);\r
-        when(subscriberResponse.getResponseMessage()).thenReturn("OK");\r
-        dMaaPMRReceiver.storeStructuredRecords(dMaaPMRSubscriber);\r
-        verify(dMaaPMRSubscriber, times(1)).fetchMessages();\r
-        verify(subscriberResponse, times(1)).getFetchedMessages();\r
-    }\r
-\r
-    @Test\r
-    public void testStoreStructuredRecordsWhenSubscriberThrowsException() throws Exception {\r
-\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        final TestDMaaPMRReceiver dMaaPMRReceiver =\r
-                new TestDMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), testDMaaPMRSourcePluginConfig);\r
-\r
-        final DMaaPMRSubscriber dMaaPMRSubscriber = Mockito.mock(DMaaPMRSubscriber.class);\r
-        final DMaaPMRSubscriberResponse subscriberResponse = Mockito.mock(DMaaPMRSubscriberResponse.class);\r
-        when(dMaaPMRSubscriber.fetchMessages()).thenThrow(DCAEAnalyticsRuntimeException.class);\r
-        dMaaPMRReceiver.storeStructuredRecords(dMaaPMRSubscriber);\r
-        verify(dMaaPMRSubscriber, times(1)).fetchMessages();\r
-        verify(subscriberResponse, times(0)).getFetchedMessages();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import com.google.common.collect.ImmutableList;
+import org.apache.spark.storage.StorageLevel;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/24/2017.
+ */
+public class DMaaPMRReceiverTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+
+    @Test
+    public void testStoreStructuredRecords() throws Exception {
+
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        final TestDMaaPMRReceiver dMaaPMRReceiver =
+                new TestDMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), testDMaaPMRSourcePluginConfig);
+
+        final DMaaPMRSubscriber dMaaPMRSubscriber = Mockito.mock(DMaaPMRSubscriber.class);
+        final DMaaPMRSubscriberResponse subscriberResponse = Mockito.mock(DMaaPMRSubscriberResponse.class);
+        when(dMaaPMRSubscriber.fetchMessages()).thenReturn(subscriberResponse);
+        when(subscriberResponse.getFetchedMessages()).thenReturn(ImmutableList.of("Test Message"));
+        when(subscriberResponse.getResponseCode()).thenReturn(200);
+        when(subscriberResponse.getResponseMessage()).thenReturn("OK");
+        dMaaPMRReceiver.storeStructuredRecords(dMaaPMRSubscriber);
+        verify(dMaaPMRSubscriber, times(1)).fetchMessages();
+        verify(subscriberResponse, times(1)).getFetchedMessages();
+    }
+
+    @Test
+    public void testStoreStructuredRecordsWhenSubscriberThrowsException() throws Exception {
+
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        final TestDMaaPMRReceiver dMaaPMRReceiver =
+                new TestDMaaPMRReceiver(StorageLevel.MEMORY_ONLY(), testDMaaPMRSourcePluginConfig);
+
+        final DMaaPMRSubscriber dMaaPMRSubscriber = Mockito.mock(DMaaPMRSubscriber.class);
+        final DMaaPMRSubscriberResponse subscriberResponse = Mockito.mock(DMaaPMRSubscriberResponse.class);
+        when(dMaaPMRSubscriber.fetchMessages()).thenThrow(DCAEAnalyticsRuntimeException.class);
+        dMaaPMRReceiver.storeStructuredRecords(dMaaPMRSubscriber);
+        verify(dMaaPMRSubscriber, times(1)).fetchMessages();
+        verify(subscriberResponse, times(0)).getFetchedMessages();
+    }
+}
@@ -1,91 +1,91 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.StageConfigurer;\r
-import co.cask.cdap.etl.api.streaming.StreamingContext;\r
-import org.apache.spark.streaming.api.java.JavaDStream;\r
-import org.apache.spark.streaming.api.java.JavaReceiverInputDStream;\r
-import org.apache.spark.streaming.api.java.JavaStreamingContext;\r
-import org.apache.spark.streaming.receiver.Receiver;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/24/2017.\r
- */\r
-public class DMaaPMRSourceTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private PipelineConfigurer pipelineConfigurer;\r
-\r
-    @Before\r
-    public void before() {\r
-        pipelineConfigurer = Mockito.mock(PipelineConfigurer.class);\r
-        final StageConfigurer stageConfigurer = Mockito.mock(StageConfigurer.class);\r
-        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);\r
-        doNothing().when(stageConfigurer).setOutputSchema(any(Schema.class));\r
-    }\r
-\r
-    @Test\r
-    public void testDMaaPMRSourceConfigurePipelineWithValidPluginSettings() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        final DMaaPMRSource dMaaPMRSource = new DMaaPMRSource(testDMaaPMRSourcePluginConfig);\r
-        dMaaPMRSource.configurePipeline(pipelineConfigurer);\r
-        assertNotNull(dMaaPMRSource);\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testDMaaPMRSourceConfigurePipelineWithInvalidPluginSettings() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        // blank out DMaaP MR Source Host\r
-        testDMaaPMRSourcePluginConfig.setHostName(null);\r
-        final DMaaPMRSource dMaaPMRSource = new DMaaPMRSource(testDMaaPMRSourcePluginConfig);\r
-        dMaaPMRSource.configurePipeline(pipelineConfigurer);\r
-    }\r
-\r
-\r
-    @Test\r
-    @SuppressWarnings("unchecked")\r
-    public void testGetStream() throws Exception {\r
-        final StreamingContext streamingContext = Mockito.mock(StreamingContext.class);\r
-        final JavaStreamingContext javaStreamingContext = Mockito.mock(JavaStreamingContext.class);\r
-        final JavaReceiverInputDStream dMaaPMRReceiver = Mockito.mock(JavaReceiverInputDStream.class);\r
-        when(streamingContext.getSparkStreamingContext()).thenReturn(javaStreamingContext);\r
-        when(javaStreamingContext.receiverStream(any(Receiver.class))).thenReturn(dMaaPMRReceiver);\r
-\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        final DMaaPMRSource dMaaPMRSource = new DMaaPMRSource(testDMaaPMRSourcePluginConfig);\r
-        final JavaDStream<StructuredRecord> stream = dMaaPMRSource.getStream(streamingContext);\r
-        assertNotNull(stream);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.StageConfigurer;
+import co.cask.cdap.etl.api.streaming.StreamingContext;
+import org.apache.spark.streaming.api.java.JavaDStream;
+import org.apache.spark.streaming.api.java.JavaReceiverInputDStream;
+import org.apache.spark.streaming.api.java.JavaStreamingContext;
+import org.apache.spark.streaming.receiver.Receiver;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/24/2017.
+ */
+public class DMaaPMRSourceTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private PipelineConfigurer pipelineConfigurer;
+
+    @Before
+    public void before() {
+        pipelineConfigurer = Mockito.mock(PipelineConfigurer.class);
+        final StageConfigurer stageConfigurer = Mockito.mock(StageConfigurer.class);
+        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);
+        doNothing().when(stageConfigurer).setOutputSchema(any(Schema.class));
+    }
+
+    @Test
+    public void testDMaaPMRSourceConfigurePipelineWithValidPluginSettings() throws Exception {
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        final DMaaPMRSource dMaaPMRSource = new DMaaPMRSource(testDMaaPMRSourcePluginConfig);
+        dMaaPMRSource.configurePipeline(pipelineConfigurer);
+        assertNotNull(dMaaPMRSource);
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testDMaaPMRSourceConfigurePipelineWithInvalidPluginSettings() throws Exception {
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        // blank out DMaaP MR Source Host
+        testDMaaPMRSourcePluginConfig.setHostName(null);
+        final DMaaPMRSource dMaaPMRSource = new DMaaPMRSource(testDMaaPMRSourcePluginConfig);
+        dMaaPMRSource.configurePipeline(pipelineConfigurer);
+    }
+
+
+    @Test
+    @SuppressWarnings("unchecked")
+    public void testGetStream() throws Exception {
+        final StreamingContext streamingContext = Mockito.mock(StreamingContext.class);
+        final JavaStreamingContext javaStreamingContext = Mockito.mock(JavaStreamingContext.class);
+        final JavaReceiverInputDStream dMaaPMRReceiver = Mockito.mock(JavaReceiverInputDStream.class);
+        when(streamingContext.getSparkStreamingContext()).thenReturn(javaStreamingContext);
+        when(javaStreamingContext.receiverStream(any(Receiver.class))).thenReturn(dMaaPMRReceiver);
+
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        final DMaaPMRSource dMaaPMRSource = new DMaaPMRSource(testDMaaPMRSourcePluginConfig);
+        final JavaDStream<StructuredRecord> stream = dMaaPMRSource.getStream(streamingContext);
+        assertNotNull(stream);
+    }
+}
@@ -1,81 +1,81 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap.DMaaPSourceOutputSchema;\r
-\r
-import java.util.concurrent.TimeUnit;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/20/2017.\r
- */\r
-public class MockDMaaPMRReceiverTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    protected class TestMockDMaaPMRReceiverTest extends MockDMaaPMRReceiver {\r
-\r
-        private boolean canStop = false;\r
-\r
-        public TestMockDMaaPMRReceiverTest(StorageLevel storageLevel, DMaaPMRSourcePluginConfig pluginConfig) {\r
-            super(storageLevel, pluginConfig);\r
-        }\r
-\r
-        @Override\r
-        public boolean isStopped() {\r
-            return canStop;\r
-        }\r
-\r
-        @Override\r
-        public void store(StructuredRecord dataItem) {\r
-            LOG.debug("Mocking storing dataItem - {}",\r
-                    dataItem.get(DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName()));\r
-        }\r
-\r
-        public void setCanStop(boolean canStop) {\r
-            this.canStop = canStop;\r
-        }\r
-    }\r
-\r
-    @Test\r
-    public void testStoreStructuredRecords() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        testDMaaPMRSourcePluginConfig.setPollingInterval(100);\r
-        final TestMockDMaaPMRReceiverTest mockDMaaPMRReceiver = new TestMockDMaaPMRReceiverTest(StorageLevel\r
-                .MEMORY_ONLY(),\r
-                testDMaaPMRSourcePluginConfig);\r
-        new Thread(new Runnable() {\r
-            @Override\r
-            public void run() {\r
-                mockDMaaPMRReceiver.storeStructuredRecords(null);\r
-            }\r
-        }).start();\r
-        TimeUnit.MILLISECONDS.sleep(1000);\r
-        LOG.info("Killing Mock Subscriber after 1 ms");\r
-        mockDMaaPMRReceiver.setCanStop(true);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import org.apache.spark.storage.StorageLevel;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.schema.dmaap.DMaaPSourceOutputSchema;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/20/2017.
+ */
+public class MockDMaaPMRReceiverTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    protected class TestMockDMaaPMRReceiverTest extends MockDMaaPMRReceiver {
+
+        private boolean canStop = false;
+
+        public TestMockDMaaPMRReceiverTest(StorageLevel storageLevel, DMaaPMRSourcePluginConfig pluginConfig) {
+            super(storageLevel, pluginConfig);
+        }
+
+        @Override
+        public boolean isStopped() {
+            return canStop;
+        }
+
+        @Override
+        public void store(StructuredRecord dataItem) {
+            LOG.debug("Mocking storing dataItem - {}",
+                    dataItem.get(DMaaPSourceOutputSchema.FETCHED_MESSAGE.getSchemaColumnName()));
+        }
+
+        public void setCanStop(boolean canStop) {
+            this.canStop = canStop;
+        }
+    }
+
+    @Test
+    public void testStoreStructuredRecords() throws Exception {
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        testDMaaPMRSourcePluginConfig.setPollingInterval(100);
+        final TestMockDMaaPMRReceiverTest mockDMaaPMRReceiver = new TestMockDMaaPMRReceiverTest(StorageLevel
+                .MEMORY_ONLY(),
+                testDMaaPMRSourcePluginConfig);
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                mockDMaaPMRReceiver.storeStructuredRecords(null);
+            }
+        }).start();
+        TimeUnit.MILLISECONDS.sleep(1000);
+        LOG.info("Killing Mock Subscriber after 1 ms");
+        mockDMaaPMRReceiver.setCanStop(true);
+
+    }
+
+}
@@ -1,74 +1,74 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.etl.api.streaming.StreamingContext;\r
-import org.apache.spark.streaming.api.java.JavaDStream;\r
-import org.apache.spark.streaming.api.java.JavaReceiverInputDStream;\r
-import org.apache.spark.streaming.api.java.JavaStreamingContext;\r
-import org.apache.spark.streaming.receiver.Receiver;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/20/2017.\r
- */\r
-@SuppressWarnings("unchecked")\r
-public class MockDMaaPMRSourceTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    @Test\r
-    public void testGetStream() throws Exception {\r
-        final StreamingContext streamingContext = Mockito.mock(StreamingContext.class);\r
-        final JavaStreamingContext javaStreamingContext = Mockito.mock(JavaStreamingContext.class);\r
-        final JavaReceiverInputDStream dMaaPMRReceiver = Mockito.mock(JavaReceiverInputDStream.class);\r
-        when(streamingContext.getSparkStreamingContext()).thenReturn(javaStreamingContext);\r
-        when(javaStreamingContext.receiverStream(any(Receiver.class))).thenReturn(dMaaPMRReceiver);\r
-\r
-        MockDMaaPMRSource mockDMaaPMRSource = new MockDMaaPMRSource(getTestDMaaPMRSourcePluginConfig());\r
-        final JavaDStream<StructuredRecord> stream = mockDMaaPMRSource.getStream(streamingContext);\r
-        assertNotNull(stream);\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testConfigurePipelineWhenPollingIntervalNotPresent() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        testDMaaPMRSourcePluginConfig.setPollingInterval(null);\r
-        final MockDMaaPMRSource mockDMaaPMRSource = new MockDMaaPMRSource(testDMaaPMRSourcePluginConfig);\r
-        mockDMaaPMRSource.configurePipeline(null);\r
-    }\r
-\r
-    @Test\r
-    public void testConfigurePipelineWhenPollingIntervalIsPresent() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        final MockDMaaPMRSource mockDMaaPMRSource = new MockDMaaPMRSource(testDMaaPMRSourcePluginConfig);\r
-        mockDMaaPMRSource.configurePipeline(null);\r
-        assertNotNull(mockDMaaPMRSource);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.etl.api.streaming.StreamingContext;
+import org.apache.spark.streaming.api.java.JavaDStream;
+import org.apache.spark.streaming.api.java.JavaReceiverInputDStream;
+import org.apache.spark.streaming.api.java.JavaStreamingContext;
+import org.apache.spark.streaming.receiver.Receiver;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/20/2017.
+ */
+@SuppressWarnings("unchecked")
+public class MockDMaaPMRSourceTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    @Test
+    public void testGetStream() throws Exception {
+        final StreamingContext streamingContext = Mockito.mock(StreamingContext.class);
+        final JavaStreamingContext javaStreamingContext = Mockito.mock(JavaStreamingContext.class);
+        final JavaReceiverInputDStream dMaaPMRReceiver = Mockito.mock(JavaReceiverInputDStream.class);
+        when(streamingContext.getSparkStreamingContext()).thenReturn(javaStreamingContext);
+        when(javaStreamingContext.receiverStream(any(Receiver.class))).thenReturn(dMaaPMRReceiver);
+
+        MockDMaaPMRSource mockDMaaPMRSource = new MockDMaaPMRSource(getTestDMaaPMRSourcePluginConfig());
+        final JavaDStream<StructuredRecord> stream = mockDMaaPMRSource.getStream(streamingContext);
+        assertNotNull(stream);
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testConfigurePipelineWhenPollingIntervalNotPresent() throws Exception {
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        testDMaaPMRSourcePluginConfig.setPollingInterval(null);
+        final MockDMaaPMRSource mockDMaaPMRSource = new MockDMaaPMRSource(testDMaaPMRSourcePluginConfig);
+        mockDMaaPMRSource.configurePipeline(null);
+    }
+
+    @Test
+    public void testConfigurePipelineWhenPollingIntervalIsPresent() throws Exception {
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        final MockDMaaPMRSource mockDMaaPMRSource = new MockDMaaPMRSource(testDMaaPMRSourcePluginConfig);
+        mockDMaaPMRSource.configurePipeline(null);
+        assertNotNull(mockDMaaPMRSource);
+    }
+
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import org.apache.spark.storage.StorageLevel;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-\r
-import static org.mockito.ArgumentMatchers.anyInt;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.Mockito.doNothing;\r
-\r
-/**\r
- * Test implementation for {@link DMaaPMRReceiver}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 1/24/2017.\r
- */\r
-public class TestDMaaPMRReceiver extends DMaaPMRReceiver {\r
-\r
-    protected static Metrics metrics;\r
-\r
-    static {\r
-        metrics = Mockito.mock(Metrics.class);\r
-        doNothing().when(metrics).count(anyString(), anyInt());\r
-        doNothing().when(metrics).gauge(anyString(), anyInt());\r
-    }\r
-\r
-\r
-    public TestDMaaPMRReceiver(StorageLevel storageLevel, DMaaPMRSourcePluginConfig pluginConfig) {\r
-\r
-        super(storageLevel, pluginConfig, metrics);\r
-    }\r
-\r
-    @Override\r
-    public void store(StructuredRecord dataItem) {\r
-        // do nothing\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.metrics.Metrics;
+import org.apache.spark.storage.StorageLevel;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doNothing;
+
+/**
+ * Test implementation for {@link DMaaPMRReceiver}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 1/24/2017.
+ */
+public class TestDMaaPMRReceiver extends DMaaPMRReceiver {
+
+    protected static Metrics metrics;
+
+    static {
+        metrics = Mockito.mock(Metrics.class);
+        doNothing().when(metrics).count(anyString(), anyInt());
+        doNothing().when(metrics).gauge(anyString(), anyInt());
+    }
+
+
+    public TestDMaaPMRReceiver(StorageLevel storageLevel, DMaaPMRSourcePluginConfig pluginConfig) {
+
+        super(storageLevel, pluginConfig, metrics);
+    }
+
+    @Override
+    public void store(StructuredRecord dataItem) {
+        // do nothing
+    }
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.transform.filter;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import co.cask.cdap.etl.api.Emitter;\r
-import co.cask.cdap.etl.api.PipelineConfigurer;\r
-import co.cask.cdap.etl.api.StageConfigurer;\r
-import org.junit.Test;\r
-import org.mockito.ArgumentMatchers;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-\r
-import java.util.Date;\r
-\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 3/3/2017.\r
- */\r
-public class JsonPathFilterTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testInitializeWhenFilterMappingIsValid() throws Exception {\r
-        final JsonPathFilter jsonPathFilter = new JsonPathFilter(getJsonPathFilterPluginConfig());\r
-        jsonPathFilter.initialize(null);\r
-    }\r
-\r
-\r
-    @Test\r
-    public void configurePipeline() throws Exception {\r
-        final JsonPathFilter jsonPathFilter = new JsonPathFilter(getJsonPathFilterPluginConfig());\r
-        final PipelineConfigurer pipelineConfigurer = mock(PipelineConfigurer.class);\r
-        final StageConfigurer stageConfigurer = mock(StageConfigurer.class);\r
-        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);\r
-        when(stageConfigurer.getInputSchema()).thenReturn(getSimpleTCAPluginInputSchema());\r
-        doNothing().when(stageConfigurer).setOutputSchema(any(Schema.class));\r
-        jsonPathFilter.configurePipeline(pipelineConfigurer);\r
-        verify(stageConfigurer, times(1)).setOutputSchema(any(Schema.class));\r
-    }\r
-\r
-    @Test\r
-    public void testTransform() throws Exception {\r
-        final JsonPathFilter jsonPathFilter = new JsonPathFilter(getJsonPathFilterPluginConfig());\r
-        jsonPathFilter.initialize(null);\r
-        final StructuredRecord inputSR = StructuredRecord.builder(getJsonFilterPluginInputSchema())\r
-                .set("ts", new Date().getTime())\r
-                .set("responseCode", 200)\r
-                .set("responseMessage", "OK")\r
-                .set("message", fromStream(CEF_MESSAGE_JSON_FILE_LOCATION))\r
-                .build();\r
-\r
-        final Emitter emitter = Mockito.mock(Emitter.class);\r
-        doNothing().when(emitter).emit(ArgumentMatchers.any(StructuredRecord.class));\r
-        jsonPathFilter.transform(inputSR, emitter);\r
-        verify(emitter, times(1)).emit(any(StructuredRecord.class));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.transform.filter;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import co.cask.cdap.etl.api.Emitter;
+import co.cask.cdap.etl.api.PipelineConfigurer;
+import co.cask.cdap.etl.api.StageConfigurer;
+import org.junit.Test;
+import org.mockito.ArgumentMatchers;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+
+import java.util.Date;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 3/3/2017.
+ */
+public class JsonPathFilterTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+
+    @Test
+    public void testInitializeWhenFilterMappingIsValid() throws Exception {
+        final JsonPathFilter jsonPathFilter = new JsonPathFilter(getJsonPathFilterPluginConfig());
+        jsonPathFilter.initialize(null);
+    }
+
+
+    @Test
+    public void configurePipeline() throws Exception {
+        final JsonPathFilter jsonPathFilter = new JsonPathFilter(getJsonPathFilterPluginConfig());
+        final PipelineConfigurer pipelineConfigurer = mock(PipelineConfigurer.class);
+        final StageConfigurer stageConfigurer = mock(StageConfigurer.class);
+        when(pipelineConfigurer.getStageConfigurer()).thenReturn(stageConfigurer);
+        when(stageConfigurer.getInputSchema()).thenReturn(getSimpleTCAPluginInputSchema());
+        doNothing().when(stageConfigurer).setOutputSchema(any(Schema.class));
+        jsonPathFilter.configurePipeline(pipelineConfigurer);
+        verify(stageConfigurer, times(1)).setOutputSchema(any(Schema.class));
+    }
+
+    @Test
+    public void testTransform() throws Exception {
+        final JsonPathFilter jsonPathFilter = new JsonPathFilter(getJsonPathFilterPluginConfig());
+        jsonPathFilter.initialize(null);
+        final StructuredRecord inputSR = StructuredRecord.builder(getJsonFilterPluginInputSchema())
+                .set("ts", new Date().getTime())
+                .set("responseCode", 200)
+                .set("responseMessage", "OK")
+                .set("message", fromStream(CEF_MESSAGE_JSON_FILE_LOCATION))
+                .build();
+
+        final Emitter emitter = Mockito.mock(Emitter.class);
+        doNothing().when(emitter).emit(ArgumentMatchers.any(StructuredRecord.class));
+        jsonPathFilter.transform(inputSR, emitter);
+        verify(emitter, times(1)).emit(any(StructuredRecord.class));
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.utils;\r
-\r
-import co.cask.cdap.api.data.format.StructuredRecord;\r
-import co.cask.cdap.api.data.schema.Schema;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertNull;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class CDAPPluginUtilsTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testValidateSchemaContainsFieldsWhenSchemaIsNotNull() throws Exception {\r
-        final Schema dMaaPMRSinkTestSchema = getDMaaPMRSinkTestSchema();\r
-        CDAPPluginUtils.validateSchemaContainsFields(dMaaPMRSinkTestSchema, "message");\r
-    }\r
-\r
-    @Test\r
-    public void testValidateSchemaContainsFieldsWhenInputSchemaIsNull() throws Exception {\r
-        CDAPPluginUtils.validateSchemaContainsFields(null, "message");\r
-    }\r
-\r
-    @Test\r
-    public void testCreateStructuredRecord() throws Exception {\r
-        final StructuredRecord testMessage = CDAPPluginUtils.createDMaaPMRResponseStructuredRecord("testMessage");\r
-        assertNotNull(testMessage);\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCreateOutputStructuredRecordBuilder() throws Exception {\r
-\r
-        final String messageFieldName = "message";\r
-        final String firstInputFieldName = "inputField1";\r
-        final String secondInputFieldName = "inputField2";\r
-\r
-\r
-        final Schema inputSchema = Schema.recordOf(\r
-                "inputSchema",\r
-                Schema.Field.of(messageFieldName, Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of(firstInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))),\r
-                Schema.Field.of(secondInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING)))\r
-        );\r
-\r
-        final String addedFieldName = "addedField";\r
-        final Schema outputSchema = Schema.recordOf(\r
-                "outputSchema",\r
-                Schema.Field.of(messageFieldName, Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of(firstInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))),\r
-                Schema.Field.of(addedFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))) // added field\r
-                // missing second Input Field\r
-        );\r
-\r
-        // input structured record\r
-        final String messageFieldValue = "Message String";\r
-        final String firstFieldValue = "Input Field 1";\r
-        final String secondFieldValue = "Input Field 2";\r
-        final StructuredRecord inputSR = StructuredRecord.builder(inputSchema)\r
-                .set(messageFieldName, messageFieldValue)\r
-                .set(firstInputFieldName, firstFieldValue)\r
-                .set(secondInputFieldName, secondFieldValue)\r
-                .build();\r
-\r
-        final StructuredRecord.Builder outputStructuredRecordBuilder =\r
-                CDAPPluginUtils.createOutputStructuredRecordBuilder(outputSchema, inputSR);\r
-\r
-        final String addedFieldValue = "Added Field Value";\r
-        final StructuredRecord outputSR = outputStructuredRecordBuilder\r
-                .set(addedFieldName, addedFieldValue)\r
-                .build();\r
-\r
-        assertThat("Added Field field value copied correctly",\r
-                outputSR.get(addedFieldName).toString(), is(addedFieldValue));\r
-\r
-        assertThat("Output SR has message field copied correctly",\r
-                outputSR.get(messageFieldName).toString(), is(messageFieldValue));\r
-\r
-        assertThat("First Field value copied correctly",\r
-                outputSR.get(firstInputFieldName).toString(), is(firstFieldValue));\r
-\r
-        assertNull("Second Field value is null as output schema does not have the field",\r
-                outputSR.get(secondInputFieldName));\r
-\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testAddFieldValueToStructuredRecordBuilder() throws Exception {\r
-\r
-        final String messageFieldName = "message";\r
-        final String firstInputFieldName = "inputField1";\r
-        final String addedFieldName = "addedField";\r
-        final String firstFieldValue = "Input Field 1";\r
-        final String addedFieldValue = "Added Field Value";\r
-        final Schema outputSchema = Schema.recordOf(\r
-                "outputSchema",\r
-                Schema.Field.of(messageFieldName, Schema.of(Schema.Type.STRING)),\r
-                Schema.Field.of(firstInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))),\r
-                Schema.Field.of(addedFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))) // added field\r
-        );\r
-\r
-        final StructuredRecord.Builder outputSRBuilder = StructuredRecord.builder(outputSchema)\r
-                .set(messageFieldName, "Some message")\r
-                .set(firstInputFieldName, firstFieldValue);\r
-\r
-        final StructuredRecord.Builder addedFieldSRBuilder = CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(\r
-                outputSRBuilder, outputSchema, addedFieldName, addedFieldValue);\r
-\r
-        // Try adding field to output Structured record that is not in output schema\r
-        final String nonExistentFieldName = "fieldNotInOutputSchema";\r
-        final String nonExistentFieldValue = "Some Value";\r
-        final StructuredRecord outputSR = CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(\r
-                addedFieldSRBuilder, outputSchema, nonExistentFieldName, nonExistentFieldValue).build();\r
-\r
-        assertThat("Output SR must contain added Field which is in output schema",\r
-                outputSR.get(addedFieldName).toString(), is(addedFieldValue));\r
-        assertNull("Output SR must not contain field that is not in output schema",\r
-                outputSR.get(nonExistentFieldName));\r
-\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testValidateSchemaFieldTypeWhenInputSchemaIsNotValidJson() throws Exception {\r
-        CDAPPluginUtils.validateSchemaFieldType("Invalid Schema", "field1", Schema.Type.STRING);\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testSetOutputSchemaWhenOutputSchemaIsNotValidJson() throws Exception {\r
-        CDAPPluginUtils.setOutputSchema(null, "Invalid output Schema");\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testExtractFieldMappingsWhenFieldMappingValueIsEmpty() throws Exception {\r
-        CDAPPluginUtils.extractFieldMappings("path1:,path2:value2");\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testExtractFieldMappingsWhenFieldMappingAreBlank() throws Exception {\r
-        CDAPPluginUtils.extractFieldMappings("path1: ,path2:value2");\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.utils;
+
+import co.cask.cdap.api.data.format.StructuredRecord;
+import co.cask.cdap.api.data.schema.Schema;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class CDAPPluginUtilsTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+
+    @Test
+    public void testValidateSchemaContainsFieldsWhenSchemaIsNotNull() throws Exception {
+        final Schema dMaaPMRSinkTestSchema = getDMaaPMRSinkTestSchema();
+        CDAPPluginUtils.validateSchemaContainsFields(dMaaPMRSinkTestSchema, "message");
+    }
+
+    @Test
+    public void testValidateSchemaContainsFieldsWhenInputSchemaIsNull() throws Exception {
+        CDAPPluginUtils.validateSchemaContainsFields(null, "message");
+    }
+
+    @Test
+    public void testCreateStructuredRecord() throws Exception {
+        final StructuredRecord testMessage = CDAPPluginUtils.createDMaaPMRResponseStructuredRecord("testMessage");
+        assertNotNull(testMessage);
+    }
+
+
+    @Test
+    public void testCreateOutputStructuredRecordBuilder() throws Exception {
+
+        final String messageFieldName = "message";
+        final String firstInputFieldName = "inputField1";
+        final String secondInputFieldName = "inputField2";
+
+
+        final Schema inputSchema = Schema.recordOf(
+                "inputSchema",
+                Schema.Field.of(messageFieldName, Schema.of(Schema.Type.STRING)),
+                Schema.Field.of(firstInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))),
+                Schema.Field.of(secondInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING)))
+        );
+
+        final String addedFieldName = "addedField";
+        final Schema outputSchema = Schema.recordOf(
+                "outputSchema",
+                Schema.Field.of(messageFieldName, Schema.of(Schema.Type.STRING)),
+                Schema.Field.of(firstInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))),
+                Schema.Field.of(addedFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))) // added field
+                // missing second Input Field
+        );
+
+        // input structured record
+        final String messageFieldValue = "Message String";
+        final String firstFieldValue = "Input Field 1";
+        final String secondFieldValue = "Input Field 2";
+        final StructuredRecord inputSR = StructuredRecord.builder(inputSchema)
+                .set(messageFieldName, messageFieldValue)
+                .set(firstInputFieldName, firstFieldValue)
+                .set(secondInputFieldName, secondFieldValue)
+                .build();
+
+        final StructuredRecord.Builder outputStructuredRecordBuilder =
+                CDAPPluginUtils.createOutputStructuredRecordBuilder(outputSchema, inputSR);
+
+        final String addedFieldValue = "Added Field Value";
+        final StructuredRecord outputSR = outputStructuredRecordBuilder
+                .set(addedFieldName, addedFieldValue)
+                .build();
+
+        assertThat("Added Field field value copied correctly",
+                outputSR.get(addedFieldName).toString(), is(addedFieldValue));
+
+        assertThat("Output SR has message field copied correctly",
+                outputSR.get(messageFieldName).toString(), is(messageFieldValue));
+
+        assertThat("First Field value copied correctly",
+                outputSR.get(firstInputFieldName).toString(), is(firstFieldValue));
+
+        assertNull("Second Field value is null as output schema does not have the field",
+                outputSR.get(secondInputFieldName));
+
+    }
+
+
+    @Test
+    public void testAddFieldValueToStructuredRecordBuilder() throws Exception {
+
+        final String messageFieldName = "message";
+        final String firstInputFieldName = "inputField1";
+        final String addedFieldName = "addedField";
+        final String firstFieldValue = "Input Field 1";
+        final String addedFieldValue = "Added Field Value";
+        final Schema outputSchema = Schema.recordOf(
+                "outputSchema",
+                Schema.Field.of(messageFieldName, Schema.of(Schema.Type.STRING)),
+                Schema.Field.of(firstInputFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))),
+                Schema.Field.of(addedFieldName, Schema.nullableOf(Schema.of(Schema.Type.STRING))) // added field
+        );
+
+        final StructuredRecord.Builder outputSRBuilder = StructuredRecord.builder(outputSchema)
+                .set(messageFieldName, "Some message")
+                .set(firstInputFieldName, firstFieldValue);
+
+        final StructuredRecord.Builder addedFieldSRBuilder = CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(
+                outputSRBuilder, outputSchema, addedFieldName, addedFieldValue);
+
+        // Try adding field to output Structured record that is not in output schema
+        final String nonExistentFieldName = "fieldNotInOutputSchema";
+        final String nonExistentFieldValue = "Some Value";
+        final StructuredRecord outputSR = CDAPPluginUtils.addFieldValueToStructuredRecordBuilder(
+                addedFieldSRBuilder, outputSchema, nonExistentFieldName, nonExistentFieldValue).build();
+
+        assertThat("Output SR must contain added Field which is in output schema",
+                outputSR.get(addedFieldName).toString(), is(addedFieldValue));
+        assertNull("Output SR must not contain field that is not in output schema",
+                outputSR.get(nonExistentFieldName));
+
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testValidateSchemaFieldTypeWhenInputSchemaIsNotValidJson() throws Exception {
+        CDAPPluginUtils.validateSchemaFieldType("Invalid Schema", "field1", Schema.Type.STRING);
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testSetOutputSchemaWhenOutputSchemaIsNotValidJson() throws Exception {
+        CDAPPluginUtils.setOutputSchema(null, "Invalid output Schema");
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testExtractFieldMappingsWhenFieldMappingValueIsEmpty() throws Exception {
+        CDAPPluginUtils.extractFieldMappings("path1:,path2:value2");
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testExtractFieldMappingsWhenFieldMappingAreBlank() throws Exception {
+        CDAPPluginUtils.extractFieldMappings("path1: ,path2:value2");
+    }
+
+
+}
@@ -1,57 +1,57 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.utils;\r
-\r
-import org.apache.hadoop.conf.Configuration;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPSinkConfigMapperTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testMapToPublisherConfig() throws Exception {\r
-\r
-        final Configuration testConfiguration = getTestConfiguration();\r
-        final DMaaPMRPublisherConfig publisherConfig = DMaaPSinkConfigMapper.map(testConfiguration);\r
-\r
-        assertNotNull(publisherConfig);\r
-        assertThat(publisherConfig.getHostName(), is(DMAAP_MR_SINK_PLUGIN_HOST_NAME));\r
-        assertThat(publisherConfig.getTopicName(), is(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));\r
-        assertThat(publisherConfig.getPortNumber(), is(DMAAP_MR_SINK_PLUGIN_PORT_NUMBER));\r
-        assertThat(publisherConfig.getProtocol(), is(DMAAP_MR_SINK_PLUGIN_PROTOCOL));\r
-        assertThat(publisherConfig.getUserName(), is(DMAAP_MR_SINK_PLUGIN_USERNAME));\r
-        assertThat(publisherConfig.getUserPassword(), is(DMAAP_MR_SINK_PLUGIN_PASSWORD));\r
-        assertThat(publisherConfig.getContentType(), is(DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE));\r
-        assertThat(publisherConfig.getMaxBatchSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE));\r
-        assertThat(publisherConfig.getMaxRecoveryQueueSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE));\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.utils;
+
+import org.apache.hadoop.conf.Configuration;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPSinkConfigMapperTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+
+    @Test
+    public void testMapToPublisherConfig() throws Exception {
+
+        final Configuration testConfiguration = getTestConfiguration();
+        final DMaaPMRPublisherConfig publisherConfig = DMaaPSinkConfigMapper.map(testConfiguration);
+
+        assertNotNull(publisherConfig);
+        assertThat(publisherConfig.getHostName(), is(DMAAP_MR_SINK_PLUGIN_HOST_NAME));
+        assertThat(publisherConfig.getTopicName(), is(DMAAP_MR_SINK_PLUGIN_TOPIC_NAME));
+        assertThat(publisherConfig.getPortNumber(), is(DMAAP_MR_SINK_PLUGIN_PORT_NUMBER));
+        assertThat(publisherConfig.getProtocol(), is(DMAAP_MR_SINK_PLUGIN_PROTOCOL));
+        assertThat(publisherConfig.getUserName(), is(DMAAP_MR_SINK_PLUGIN_USERNAME));
+        assertThat(publisherConfig.getUserPassword(), is(DMAAP_MR_SINK_PLUGIN_PASSWORD));
+        assertThat(publisherConfig.getContentType(), is(DMAAP_MR_SINK_PLUGIN_CONTENT_TYPE));
+        assertThat(publisherConfig.getMaxBatchSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_BATCH_SIZE));
+        assertThat(publisherConfig.getMaxRecoveryQueueSize(), is(DMAAP_MR_SINK_PLUGIN_MAX_RECOVERY_QUEUE_SIZE));
+
+    }
+
+}
@@ -1,64 +1,64 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.utils;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/24/2017.\r
- */\r
-public class DMaaPSourceConfigMapperTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    @Test\r
-    public void testMapToSubscriberConfig() throws Exception {\r
-\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        final DMaaPMRSubscriberConfig subscriberConfig = DMaaPSourceConfigMapper.map(testDMaaPMRSourcePluginConfig);\r
-\r
-        assertNotNull(subscriberConfig);\r
-        assertThat(subscriberConfig.getHostName(), is(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));\r
-        assertThat(subscriberConfig.getTopicName(), is(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME));\r
-        assertThat(subscriberConfig.getPortNumber(), is(DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER));\r
-        assertThat(subscriberConfig.getProtocol(), is(DMAAP_MR_SOURCE_PLUGIN_PROTOCOL));\r
-        assertThat(subscriberConfig.getUserName(), is(DMAAP_MR_SOURCE_PLUGIN_USERNAME));\r
-        assertThat(subscriberConfig.getUserPassword(), is(DMAAP_MR_SOURCE_PLUGIN_PASSWORD));\r
-        assertThat(subscriberConfig.getContentType(), is(DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE));\r
-        assertThat(subscriberConfig.getConsumerGroup(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP));\r
-        assertThat(subscriberConfig.getConsumerId(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID));\r
-        assertThat(subscriberConfig.getMessageLimit(), is(DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT));\r
-        assertThat(subscriberConfig.getTimeoutMS(), is(DMAAP_MR_SOURCE_PLUGIN_TIMEOUT));\r
-    }\r
-\r
-    @Test(expected = IllegalStateException.class)\r
-    public void testMapToSubscriberConfigWhenSubscriberHostNameIsEmpty() throws Exception {\r
-        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-        testDMaaPMRSourcePluginConfig.setHostName(null);\r
-        DMaaPSourceConfigMapper.map(testDMaaPMRSourcePluginConfig);\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.utils;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/24/2017.
+ */
+public class DMaaPSourceConfigMapperTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    @Test
+    public void testMapToSubscriberConfig() throws Exception {
+
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        final DMaaPMRSubscriberConfig subscriberConfig = DMaaPSourceConfigMapper.map(testDMaaPMRSourcePluginConfig);
+
+        assertNotNull(subscriberConfig);
+        assertThat(subscriberConfig.getHostName(), is(DMAAP_MR_SOURCE_PLUGIN_HOST_NAME));
+        assertThat(subscriberConfig.getTopicName(), is(DMAAP_MR_SOURCE_PLUGIN_TOPIC_NAME));
+        assertThat(subscriberConfig.getPortNumber(), is(DMAAP_MR_SOURCE_PLUGIN_PORT_NUMBER));
+        assertThat(subscriberConfig.getProtocol(), is(DMAAP_MR_SOURCE_PLUGIN_PROTOCOL));
+        assertThat(subscriberConfig.getUserName(), is(DMAAP_MR_SOURCE_PLUGIN_USERNAME));
+        assertThat(subscriberConfig.getUserPassword(), is(DMAAP_MR_SOURCE_PLUGIN_PASSWORD));
+        assertThat(subscriberConfig.getContentType(), is(DMAAP_MR_SOURCE_PLUGIN_CONTENT_TYPE));
+        assertThat(subscriberConfig.getConsumerGroup(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_GROUP));
+        assertThat(subscriberConfig.getConsumerId(), is(DMAAP_MR_SOURCE_PLUGIN_CONSUMER_ID));
+        assertThat(subscriberConfig.getMessageLimit(), is(DMAAP_MR_SOURCE_PLUGIN_MESSAGE_LIMIT));
+        assertThat(subscriberConfig.getTimeoutMS(), is(DMAAP_MR_SOURCE_PLUGIN_TIMEOUT));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testMapToSubscriberConfigWhenSubscriberHostNameIsEmpty() throws Exception {
+        final TestDMaaPMRSourcePluginConfig testDMaaPMRSourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+        testDMaaPMRSourcePluginConfig.setHostName(null);
+        DMaaPSourceConfigMapper.map(testDMaaPMRSourcePluginConfig);
+
+    }
+}
@@ -1,86 +1,86 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSinkPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMRSinkPluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private TestDMaaPMRSinkPluginConfig sinkPluginConfig;\r
-    private DMaaPMRSinkPluginConfigValidator sinkPluginConfigValidator;\r
-\r
-    @Before\r
-    public void before() {\r
-        sinkPluginConfigValidator = new DMaaPMRSinkPluginConfigValidator();\r
-        sinkPluginConfig = getTestDMaaPMRSinkPluginConfig();\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSinkConfig() throws Exception {\r
-        final GenericValidationResponse<DMaaPMRSinkPluginConfig> validationResponse =\r
-                sinkPluginConfigValidator.validateAppSettings(sinkPluginConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSinkConfigWhenHostNameIsNotPresent() throws Exception {\r
-        sinkPluginConfig.setHostName(null);\r
-        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSinkConfigWhenHostPortIsNotPresent() throws Exception {\r
-        sinkPluginConfig.setPortNumber(null);\r
-        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSinkConfigWhenTopicNameIsNotPresent() throws Exception {\r
-        sinkPluginConfig.setTopicName(null);\r
-        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSinkConfigWhenColumnNameIsNotPresent() throws Exception {\r
-        sinkPluginConfig.setMessageColumnName(null);\r
-        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);\r
-    }\r
-\r
-    private static void assertResponseHasErrors(final TestDMaaPMRSinkPluginConfig sinkPluginConfig,\r
-                                                final DMaaPMRSinkPluginConfigValidator validator) {\r
-        final GenericValidationResponse validationResponse = validator.validateAppSettings(sinkPluginConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSinkPluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMRSinkPluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private TestDMaaPMRSinkPluginConfig sinkPluginConfig;
+    private DMaaPMRSinkPluginConfigValidator sinkPluginConfigValidator;
+
+    @Before
+    public void before() {
+        sinkPluginConfigValidator = new DMaaPMRSinkPluginConfigValidator();
+        sinkPluginConfig = getTestDMaaPMRSinkPluginConfig();
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSinkConfig() throws Exception {
+        final GenericValidationResponse<DMaaPMRSinkPluginConfig> validationResponse =
+                sinkPluginConfigValidator.validateAppSettings(sinkPluginConfig);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSinkConfigWhenHostNameIsNotPresent() throws Exception {
+        sinkPluginConfig.setHostName(null);
+        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSinkConfigWhenHostPortIsNotPresent() throws Exception {
+        sinkPluginConfig.setPortNumber(null);
+        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSinkConfigWhenTopicNameIsNotPresent() throws Exception {
+        sinkPluginConfig.setTopicName(null);
+        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSinkConfigWhenColumnNameIsNotPresent() throws Exception {
+        sinkPluginConfig.setMessageColumnName(null);
+        assertResponseHasErrors(sinkPluginConfig, sinkPluginConfigValidator);
+    }
+
+    private static void assertResponseHasErrors(final TestDMaaPMRSinkPluginConfig sinkPluginConfig,
+                                                final DMaaPMRSinkPluginConfigValidator validator) {
+        final GenericValidationResponse validationResponse = validator.validateAppSettings(sinkPluginConfig);
+        assertTrue(validationResponse.hasErrors());
+    }
+
+
+}
@@ -1,85 +1,85 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/30/2017.\r
- */\r
-public class DMaaPMRSourcePluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private TestDMaaPMRSourcePluginConfig sourcePluginConfig;\r
-    private DMaaPMRSourcePluginConfigValidator sourcePluginConfigValidator;\r
-\r
-    @Before\r
-    public void before() {\r
-        sourcePluginConfigValidator = new DMaaPMRSourcePluginConfigValidator();\r
-        sourcePluginConfig = getTestDMaaPMRSourcePluginConfig();\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSourceConfig() throws Exception {\r
-        final GenericValidationResponse<DMaaPMRSourcePluginConfig> validationResponse =\r
-                sourcePluginConfigValidator.validateAppSettings(sourcePluginConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSourceConfigWhenHostNameIsNotPresent() throws Exception {\r
-        sourcePluginConfig.setHostName(null);\r
-        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSourceConfigWhenHostPortIsNotPresent() throws Exception {\r
-        sourcePluginConfig.setPortNumber(null);\r
-        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSourceConfigWhenTopicNameIsNotPresent() throws Exception {\r
-        sourcePluginConfig.setTopicName(null);\r
-        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidDMaaPSourcePollingIntervalIsNotPresent() throws Exception {\r
-        sourcePluginConfig.setPollingInterval(null);\r
-        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);\r
-    }\r
-\r
-    private static void assertResponseHasErrors(final TestDMaaPMRSourcePluginConfig sourcePluginConfig,\r
-                                                final DMaaPMRSourcePluginConfigValidator validator) {\r
-        final GenericValidationResponse validationResponse = validator.validateAppSettings(sourcePluginConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.TestDMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/30/2017.
+ */
+public class DMaaPMRSourcePluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private TestDMaaPMRSourcePluginConfig sourcePluginConfig;
+    private DMaaPMRSourcePluginConfigValidator sourcePluginConfigValidator;
+
+    @Before
+    public void before() {
+        sourcePluginConfigValidator = new DMaaPMRSourcePluginConfigValidator();
+        sourcePluginConfig = getTestDMaaPMRSourcePluginConfig();
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSourceConfig() throws Exception {
+        final GenericValidationResponse<DMaaPMRSourcePluginConfig> validationResponse =
+                sourcePluginConfigValidator.validateAppSettings(sourcePluginConfig);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSourceConfigWhenHostNameIsNotPresent() throws Exception {
+        sourcePluginConfig.setHostName(null);
+        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSourceConfigWhenHostPortIsNotPresent() throws Exception {
+        sourcePluginConfig.setPortNumber(null);
+        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSourceConfigWhenTopicNameIsNotPresent() throws Exception {
+        sourcePluginConfig.setTopicName(null);
+        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);
+    }
+
+    @Test
+    public void validateAppSettingsWithValidDMaaPSourcePollingIntervalIsNotPresent() throws Exception {
+        sourcePluginConfig.setPollingInterval(null);
+        assertResponseHasErrors(sourcePluginConfig, sourcePluginConfigValidator);
+    }
+
+    private static void assertResponseHasErrors(final TestDMaaPMRSourcePluginConfig sourcePluginConfig,
+                                                final DMaaPMRSourcePluginConfigValidator validator) {
+        final GenericValidationResponse validationResponse = validator.validateAppSettings(sourcePluginConfig);
+        assertTrue(validationResponse.hasErrors());
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter.JsonPathFilterPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.filter.TestJsonPathFilterPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 3/3/2017.\r
- */\r
-public class JsonPathFilterPluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private TestJsonPathFilterPluginConfig jsonPathFilterPluginConfig;\r
-    private JsonPathFilterPluginConfigValidator jsonPathFilterPluginConfigValidator;\r
-\r
-    @Before\r
-    public void before() {\r
-        jsonPathFilterPluginConfig = getJsonPathFilterPluginConfig();\r
-        jsonPathFilterPluginConfigValidator = new JsonPathFilterPluginConfigValidator();\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenNoValidationErrors() throws Exception {\r
-        final GenericValidationResponse<JsonPathFilterPluginConfig> validationResponse =\r
-                jsonPathFilterPluginConfigValidator.validateAppSettings(jsonPathFilterPluginConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenFilterMappingsAreEmpty() throws Exception {\r
-        jsonPathFilterPluginConfig.setJsonFilterMappings("");\r
-        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenOutputSchemaIsNotPresent() throws Exception {\r
-        jsonPathFilterPluginConfig.setSchema(null);\r
-        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenOutputSchemaFilterMatchedFieldIsNotBoolean() throws Exception {\r
-        final String outputSchemaWithMatchedFieldNotBoolean =\r
-                "{\"type\":\"record\"," +\r
-                        "\"name\":\"etlSchemaBody\",\"fields\":" +\r
-                        "[" +\r
-                        "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                        "{\"name\":\"filterMatched\",\"type\":[\"string\",\"null\"]}," +\r
-                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"message\",\"type\":\"string\"}" +\r
-                        "]" +\r
-                        "}";\r
-        jsonPathFilterPluginConfig.setSchema(outputSchemaWithMatchedFieldNotBoolean);\r
-        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenOutputSchemaFilterMatchedFieldIsNotNullable() throws Exception {\r
-        final String outputSchemaWithMatchedFieldNotNullable =\r
-                "{\"type\":\"record\"," +\r
-                        "\"name\":\"etlSchemaBody\",\"fields\":" +\r
-                        "[" +\r
-                        "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                        "{\"name\":\"filterMatched\",\"type\":\"boolean\"}," +\r
-                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"message\",\"type\":\"string\"}" +\r
-                        "]" +\r
-                        "}";\r
-        jsonPathFilterPluginConfig.setSchema(outputSchemaWithMatchedFieldNotNullable);\r
-        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);\r
-    }\r
-\r
-    private static void assertResponseHasErrors(final TestJsonPathFilterPluginConfig jsonPluginConfig,\r
-                                                final JsonPathFilterPluginConfigValidator validator) {\r
-        final GenericValidationResponse validationResponse = validator.validateAppSettings(jsonPluginConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter.JsonPathFilterPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.filter.TestJsonPathFilterPluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 3/3/2017.
+ */
+public class JsonPathFilterPluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private TestJsonPathFilterPluginConfig jsonPathFilterPluginConfig;
+    private JsonPathFilterPluginConfigValidator jsonPathFilterPluginConfigValidator;
+
+    @Before
+    public void before() {
+        jsonPathFilterPluginConfig = getJsonPathFilterPluginConfig();
+        jsonPathFilterPluginConfigValidator = new JsonPathFilterPluginConfigValidator();
+    }
+
+
+    @Test
+    public void testValidateAppSettingsWhenNoValidationErrors() throws Exception {
+        final GenericValidationResponse<JsonPathFilterPluginConfig> validationResponse =
+                jsonPathFilterPluginConfigValidator.validateAppSettings(jsonPathFilterPluginConfig);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenFilterMappingsAreEmpty() throws Exception {
+        jsonPathFilterPluginConfig.setJsonFilterMappings("");
+        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenOutputSchemaIsNotPresent() throws Exception {
+        jsonPathFilterPluginConfig.setSchema(null);
+        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenOutputSchemaFilterMatchedFieldIsNotBoolean() throws Exception {
+        final String outputSchemaWithMatchedFieldNotBoolean =
+                "{\"type\":\"record\"," +
+                        "\"name\":\"etlSchemaBody\",\"fields\":" +
+                        "[" +
+                        "{\"name\":\"ts\",\"type\":\"long\"}," +
+                        "{\"name\":\"filterMatched\",\"type\":[\"string\",\"null\"]}," +
+                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                        "{\"name\":\"message\",\"type\":\"string\"}" +
+                        "]" +
+                        "}";
+        jsonPathFilterPluginConfig.setSchema(outputSchemaWithMatchedFieldNotBoolean);
+        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenOutputSchemaFilterMatchedFieldIsNotNullable() throws Exception {
+        final String outputSchemaWithMatchedFieldNotNullable =
+                "{\"type\":\"record\"," +
+                        "\"name\":\"etlSchemaBody\",\"fields\":" +
+                        "[" +
+                        "{\"name\":\"ts\",\"type\":\"long\"}," +
+                        "{\"name\":\"filterMatched\",\"type\":\"boolean\"}," +
+                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                        "{\"name\":\"message\",\"type\":\"string\"}" +
+                        "]" +
+                        "}";
+        jsonPathFilterPluginConfig.setSchema(outputSchemaWithMatchedFieldNotNullable);
+        assertResponseHasErrors(jsonPathFilterPluginConfig, jsonPathFilterPluginConfigValidator);
+    }
+
+    private static void assertResponseHasErrors(final TestJsonPathFilterPluginConfig jsonPluginConfig,
+                                                final JsonPathFilterPluginConfigValidator validator) {
+        final GenericValidationResponse validationResponse = validator.validateAppSettings(jsonPluginConfig);
+        assertTrue(validationResponse.hasErrors());
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.validator;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.TestSimpleTCAPluginConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/21/2017.\r
- */\r
-public class SimpleTCAPluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {\r
-\r
-    private TestSimpleTCAPluginConfig testSimpleTCAPluginConfig;\r
-    private SimpleTCAPluginConfigValidator simpleTCAPluginConfigValidator;\r
-\r
-    @Before\r
-    public void before() {\r
-        testSimpleTCAPluginConfig = getTestSimpleTCAPluginConfig();\r
-        simpleTCAPluginConfigValidator = new SimpleTCAPluginConfigValidator();\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenAllSettingsAreValid() throws Exception {\r
-        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse =\r
-                simpleTCAPluginConfigValidator.validateAppSettings(testSimpleTCAPluginConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenVESMessageFieldNameIsMissing() throws Exception {\r
-        testSimpleTCAPluginConfig.setVesMessageFieldName(null);\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenPolicyJsonIsMissing() throws Exception {\r
-        testSimpleTCAPluginConfig.setPolicyJson(null);\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenAlertFieldNameIsMissing() throws Exception {\r
-        testSimpleTCAPluginConfig.setAlertFieldName(null);\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenOutputSchemaIsNull() throws Exception {\r
-        testSimpleTCAPluginConfig.setSchema(null);\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenMessageTypeFieldNameIsMissing() throws Exception {\r
-        testSimpleTCAPluginConfig.setMessageTypeFieldName(null);\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenAlertFieldIsNullableInOutputSchema() throws Exception {\r
-        testSimpleTCAPluginConfig.setSchema(\r
-                "{\"type\":\"record\"," +\r
-                        "\"name\":\"etlSchemaBody\"," +\r
-                        "\"fields\":[" +\r
-                            "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                            "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                            "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                            "{\"name\":\"message\",\"type\":\"string\"}," +\r
-                            "{\"name\":\"alert\",\"type\":[\"string\",\"null\"]}," +\r
-                            "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");\r
-        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse =\r
-                simpleTCAPluginConfigValidator.validateAppSettings(testSimpleTCAPluginConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenAlertFieldIsNotPresentInOutputSchema() throws Exception {\r
-        testSimpleTCAPluginConfig.setSchema(\r
-                "{\"type\":\"record\"," +\r
-                        "\"name\":\"etlSchemaBody\"," +\r
-                        "\"fields\":[" +\r
-                        "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"message\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");\r
-        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse =\r
-                simpleTCAPluginConfigValidator.validateAppSettings(testSimpleTCAPluginConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenAlertFieldIsNullableButNotStringTypeInOutputSchema() throws Exception {\r
-        testSimpleTCAPluginConfig.setSchema(\r
-                "{\"type\":\"record\"," +\r
-                        "\"name\":\"etlSchemaBody\"," +\r
-                        "\"fields\":[" +\r
-                        "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"message\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"alert\",\"type\":[\"int\",\"null\"]}," +\r
-                        "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenAlertFieldNameIsNotNullableInOutputSchema() throws Exception {\r
-        testSimpleTCAPluginConfig.setSchema(\r
-                "{\"type\":\"record\"," +\r
-                        "\"name\":\"etlSchemaBody\"," +\r
-                        "\"fields\":[" +\r
-                        "{\"name\":\"ts\",\"type\":\"long\"}," +\r
-                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +\r
-                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"message\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"alert\",\"type\":\"string\"}," +\r
-                        "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");\r
-        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);\r
-    }\r
-\r
-\r
-\r
-    private static void assertResponseHasErrors(final TestSimpleTCAPluginConfig pluginConfig,\r
-                                                final SimpleTCAPluginConfigValidator validator) {\r
-        final GenericValidationResponse validationResponse = validator.validateAppSettings(pluginConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-        LOG.debug("Validation Error Message: {}", validationResponse.getAllErrorMessage());\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.validator;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.plugins.BaseAnalyticsCDAPPluginsUnitTest;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca.TestSimpleTCAPluginConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/21/2017.
+ */
+public class SimpleTCAPluginConfigValidatorTest extends BaseAnalyticsCDAPPluginsUnitTest {
+
+    private TestSimpleTCAPluginConfig testSimpleTCAPluginConfig;
+    private SimpleTCAPluginConfigValidator simpleTCAPluginConfigValidator;
+
+    @Before
+    public void before() {
+        testSimpleTCAPluginConfig = getTestSimpleTCAPluginConfig();
+        simpleTCAPluginConfigValidator = new SimpleTCAPluginConfigValidator();
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenAllSettingsAreValid() throws Exception {
+        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse =
+                simpleTCAPluginConfigValidator.validateAppSettings(testSimpleTCAPluginConfig);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenVESMessageFieldNameIsMissing() throws Exception {
+        testSimpleTCAPluginConfig.setVesMessageFieldName(null);
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenPolicyJsonIsMissing() throws Exception {
+        testSimpleTCAPluginConfig.setPolicyJson(null);
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenAlertFieldNameIsMissing() throws Exception {
+        testSimpleTCAPluginConfig.setAlertFieldName(null);
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenOutputSchemaIsNull() throws Exception {
+        testSimpleTCAPluginConfig.setSchema(null);
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenMessageTypeFieldNameIsMissing() throws Exception {
+        testSimpleTCAPluginConfig.setMessageTypeFieldName(null);
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenAlertFieldIsNullableInOutputSchema() throws Exception {
+        testSimpleTCAPluginConfig.setSchema(
+                "{\"type\":\"record\"," +
+                        "\"name\":\"etlSchemaBody\"," +
+                        "\"fields\":[" +
+                            "{\"name\":\"ts\",\"type\":\"long\"}," +
+                            "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                            "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                            "{\"name\":\"message\",\"type\":\"string\"}," +
+                            "{\"name\":\"alert\",\"type\":[\"string\",\"null\"]}," +
+                            "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");
+        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse =
+                simpleTCAPluginConfigValidator.validateAppSettings(testSimpleTCAPluginConfig);
+        assertFalse(validationResponse.hasErrors());
+
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenAlertFieldIsNotPresentInOutputSchema() throws Exception {
+        testSimpleTCAPluginConfig.setSchema(
+                "{\"type\":\"record\"," +
+                        "\"name\":\"etlSchemaBody\"," +
+                        "\"fields\":[" +
+                        "{\"name\":\"ts\",\"type\":\"long\"}," +
+                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                        "{\"name\":\"message\",\"type\":\"string\"}," +
+                        "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");
+        final GenericValidationResponse<SimpleTCAPluginConfig> validationResponse =
+                simpleTCAPluginConfigValidator.validateAppSettings(testSimpleTCAPluginConfig);
+        assertFalse(validationResponse.hasErrors());
+
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenAlertFieldIsNullableButNotStringTypeInOutputSchema() throws Exception {
+        testSimpleTCAPluginConfig.setSchema(
+                "{\"type\":\"record\"," +
+                        "\"name\":\"etlSchemaBody\"," +
+                        "\"fields\":[" +
+                        "{\"name\":\"ts\",\"type\":\"long\"}," +
+                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                        "{\"name\":\"message\",\"type\":\"string\"}," +
+                        "{\"name\":\"alert\",\"type\":[\"int\",\"null\"]}," +
+                        "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenAlertFieldNameIsNotNullableInOutputSchema() throws Exception {
+        testSimpleTCAPluginConfig.setSchema(
+                "{\"type\":\"record\"," +
+                        "\"name\":\"etlSchemaBody\"," +
+                        "\"fields\":[" +
+                        "{\"name\":\"ts\",\"type\":\"long\"}," +
+                        "{\"name\":\"responseCode\",\"type\":\"int\"}," +
+                        "{\"name\":\"responseMessage\",\"type\":\"string\"}," +
+                        "{\"name\":\"message\",\"type\":\"string\"}," +
+                        "{\"name\":\"alert\",\"type\":\"string\"}," +
+                        "{\"name\":\"tcaMessageType\",\"type\":\"string\"}]}");
+        assertResponseHasErrors(testSimpleTCAPluginConfig, simpleTCAPluginConfigValidator);
+    }
+
+
+
+    private static void assertResponseHasErrors(final TestSimpleTCAPluginConfig pluginConfig,
+                                                final SimpleTCAPluginConfigValidator validator) {
+        final GenericValidationResponse validationResponse = validator.validateAppSettings(pluginConfig);
+        assertTrue(validationResponse.hasErrors());
+        LOG.debug("Validation Error Message: {}", validationResponse.getAllErrorMessage());
+    }
+}
index 4857522..78cbdfa 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration debug="false">\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration debug="false">
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index 2a65ef1..dbdd58b 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-cdap-tca</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS CDAP CODE FOR TCA (THRESHOLD CROSSING ALERT) IMPLEMENTED AS CDAP FLOWLETS -->\r
-    <name>DCAE Analytics TCA Flowlets</name>\r
-    <description>DCAE Analytics TCA (THRESHOLD CROSSING ALERT) implemented as CDAP Flowlets</description>\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-        <app.main.class>org.openecomp.dcae.apod.analytics.cdap.tca.TCAAnalyticsApplication</app.main.class>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- DCAE DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-cdap-common</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <!-- CDAP -->\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-api</artifactId>\r
-        </dependency>\r
-\r
-        <!-- CASK -->\r
-        <dependency>\r
-            <groupId>co.cask.http</groupId>\r
-            <artifactId>netty-http</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>co.cask.common</groupId>\r
-            <artifactId>common-http</artifactId>\r
-        </dependency>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <!-- FIND BUGS -->\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-            <version>${findbugs.jsr305.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-            <version>${findbugs.annotations.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>co.cask.cdap</groupId>\r
-            <artifactId>cdap-unit-test</artifactId>\r
-            <exclusions>\r
-                <exclusion>\r
-                    <artifactId>org.apache.httpcomponents</artifactId>\r
-                    <groupId>httpcore</groupId>\r
-                </exclusion>\r
-            </exclusions>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-\r
-    <build>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.apache.felix</groupId>\r
-                <artifactId>maven-bundle-plugin</artifactId>\r
-                <configuration>\r
-                    <instructions>\r
-                        <_exportcontents>\r
-                            com.fasterxml.jackson.core.*\r
-                        </_exportcontents>\r
-                    </instructions>\r
-                    <archive>\r
-                        <manifest>\r
-                            <mainClass>${app.main.class}</mainClass>\r
-                        </manifest>\r
-                    </archive>\r
-                </configuration>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>dcae-analytics</artifactId>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-cdap-tca</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS CDAP CODE FOR TCA (THRESHOLD CROSSING ALERT) IMPLEMENTED AS CDAP FLOWLETS -->
+    <name>DCAE Analytics TCA Flowlets</name>
+    <description>DCAE Analytics TCA (THRESHOLD CROSSING ALERT) implemented as CDAP Flowlets</description>
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+        <app.main.class>org.onap.dcae.apod.analytics.cdap.tca.TCAAnalyticsApplication</app.main.class>
+    </properties>
+
+    <dependencies>
+
+        <!-- DCAE DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-cdap-common</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- CDAP -->
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-api</artifactId>
+        </dependency>
+
+        <!-- CASK -->
+        <dependency>
+            <groupId>co.cask.http</groupId>
+            <artifactId>netty-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>co.cask.common</groupId>
+            <artifactId>common-http</artifactId>
+        </dependency>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- FIND BUGS -->
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+            <version>${findbugs.jsr305.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+            <version>${findbugs.annotations.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>co.cask.cdap</groupId>
+            <artifactId>cdap-unit-test</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>org.apache.httpcomponents</artifactId>
+                    <groupId>httpcore</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <_exportcontents>
+                            com.fasterxml.jackson.core.*
+                        </_exportcontents>
+                    </instructions>
+                    <archive>
+                        <manifest>
+                            <mainClass>${app.main.class}</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca;\r
-\r
-import co.cask.cdap.api.app.AbstractApplication;\r
-import co.cask.cdap.api.data.stream.Stream;\r
-import co.cask.cdap.api.dataset.DatasetProperties;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementPersister;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusPersister;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.flow.TCAVESCollectorFlow;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.validator.TCAAppConfigValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.worker.TCADMaaPMockSubscriberWorker;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.worker.TCADMaaPPublisherWorker;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.worker.TCADMaaPSubscriberWorker;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/21/2016.\r
- */\r
-public class TCAAnalyticsApplication extends AbstractApplication<TCAAppConfig> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAAnalyticsApplication.class);\r
-\r
-    @Override\r
-    @SuppressWarnings("unchecked")\r
-    public void configure() {\r
-\r
-\r
-        // ========= Application configuration Setup ============== //\r
-        final TCAAppConfig tcaAppConfig = getConfig();\r
-\r
-        LOG.info("Configuring TCA Application with startup application configuration: {}", tcaAppConfig);\r
-\r
-        // Validate application configuration\r
-        ValidationUtils.validateSettings(tcaAppConfig, new TCAAppConfigValidator());\r
-\r
-        // App Setup\r
-        setName(tcaAppConfig.getAppName());\r
-        setDescription(tcaAppConfig.getAppDescription());\r
-\r
-        // ========== Streams Setup ============== //\r
-        // Create DMaaP MR Subscriber CDAP output stream\r
-        final String tcaSubscriberOutputStreamName = tcaAppConfig.getTcaSubscriberOutputStreamName();\r
-        LOG.info("Creating TCA VES Output Stream: {}", tcaSubscriberOutputStreamName);\r
-        final Stream subscriberOutputStream = new Stream(tcaSubscriberOutputStreamName,\r
-                CDAPComponentsConstants.TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM);\r
-        addStream(subscriberOutputStream);\r
-\r
-\r
-        // ============ Datasets Setup ======== //\r
-        // Create TCA Message Status Table\r
-        final String tcaVESMessageStatusTableName = tcaAppConfig.getTcaVESMessageStatusTableName();\r
-        final Integer messageStatusTableTTLSeconds = tcaAppConfig.getTcaVESMessageStatusTableTTLSeconds();\r
-        LOG.info("Creating TCA Message Status Table: {} with TTL: {}",\r
-                tcaVESMessageStatusTableName, messageStatusTableTTLSeconds);\r
-        final DatasetProperties messageStatusTableProperties =\r
-                TCAMessageStatusPersister.getDatasetProperties(messageStatusTableTTLSeconds);\r
-        createDataset(tcaVESMessageStatusTableName, ObjectMappedTable.class, messageStatusTableProperties);\r
-\r
-\r
-        // Create TCA Alerts Abatement Table\r
-        final String tcaAlertsAbatementTableName = tcaAppConfig.getTcaAlertsAbatementTableName();\r
-        final Integer tcaAlertsAbatementTableTTLSeconds = tcaAppConfig.getTcaAlertsAbatementTableTTLSeconds();\r
-        LOG.info("Creating Alerts Abatement Table: {} with TTL: {}",\r
-                tcaAlertsAbatementTableName, tcaAlertsAbatementTableTTLSeconds);\r
-        final DatasetProperties alertsAbatementTableProperties =\r
-                TCAAlertsAbatementPersister.getDatasetProperties(tcaAlertsAbatementTableTTLSeconds);\r
-        createDataset(tcaAlertsAbatementTableName, ObjectMappedTable.class, alertsAbatementTableProperties);\r
-\r
-        // Create TCA VES Alerts Table\r
-        final String tcaVESAlertsTableName = tcaAppConfig.getTcaVESAlertsTableName();\r
-        final Integer alertsTableTTLSeconds = tcaAppConfig.getTcaVESAlertsTableTTLSeconds();\r
-        LOG.info("Creating TCA Alerts Table: {} with TTL: {}",\r
-                tcaVESAlertsTableName, alertsTableTTLSeconds);\r
-        final DatasetProperties alertTableProperties =\r
-                TCAVESAlertsPersister.getDatasetProperties(alertsTableTTLSeconds);\r
-        createDataset(tcaVESAlertsTableName, ObjectMappedTable.class, alertTableProperties);\r
-\r
-        // =========== Flow Setup ============= //\r
-        addFlow(new TCAVESCollectorFlow(tcaAppConfig));\r
-\r
-        // ========== Workers Setup =========== //\r
-        LOG.info("Creating TCA DMaaP Subscriber Worker");\r
-        addWorker(new TCADMaaPSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\r
-        LOG.info("Creating TCA DMaaP Publisher Worker");\r
-        addWorker(new TCADMaaPPublisherWorker(tcaAppConfig.getTcaVESAlertsTableName()));\r
-        // TODO: Remove this before going to production\r
-        addWorker(new TCADMaaPMockSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca;
+
+import co.cask.cdap.api.app.AbstractApplication;
+import co.cask.cdap.api.data.stream.Stream;
+import co.cask.cdap.api.dataset.DatasetProperties;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementPersister;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusPersister;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister;
+import org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
+import org.onap.dcae.apod.analytics.cdap.tca.flow.TCAVESCollectorFlow;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;
+import org.onap.dcae.apod.analytics.cdap.tca.validator.TCAAppConfigValidator;
+import org.onap.dcae.apod.analytics.cdap.tca.worker.TCADMaaPMockSubscriberWorker;
+import org.onap.dcae.apod.analytics.cdap.tca.worker.TCADMaaPPublisherWorker;
+import org.onap.dcae.apod.analytics.cdap.tca.worker.TCADMaaPSubscriberWorker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/21/2016.
+ */
+public class TCAAnalyticsApplication extends AbstractApplication<TCAAppConfig> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAAnalyticsApplication.class);
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public void configure() {
+
+
+        // ========= Application configuration Setup ============== //
+        final TCAAppConfig tcaAppConfig = getConfig();
+
+        LOG.info("Configuring TCA Application with startup application configuration: {}", tcaAppConfig);
+
+        // Validate application configuration
+        ValidationUtils.validateSettings(tcaAppConfig, new TCAAppConfigValidator());
+
+        // App Setup
+        setName(tcaAppConfig.getAppName());
+        setDescription(tcaAppConfig.getAppDescription());
+
+        // ========== Streams Setup ============== //
+        // Create DMaaP MR Subscriber CDAP output stream
+        final String tcaSubscriberOutputStreamName = tcaAppConfig.getTcaSubscriberOutputStreamName();
+        LOG.info("Creating TCA VES Output Stream: {}", tcaSubscriberOutputStreamName);
+        final Stream subscriberOutputStream = new Stream(tcaSubscriberOutputStreamName,
+                CDAPComponentsConstants.TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM);
+        addStream(subscriberOutputStream);
+
+
+        // ============ Datasets Setup ======== //
+        // Create TCA Message Status Table
+        final String tcaVESMessageStatusTableName = tcaAppConfig.getTcaVESMessageStatusTableName();
+        final Integer messageStatusTableTTLSeconds = tcaAppConfig.getTcaVESMessageStatusTableTTLSeconds();
+        LOG.info("Creating TCA Message Status Table: {} with TTL: {}",
+                tcaVESMessageStatusTableName, messageStatusTableTTLSeconds);
+        final DatasetProperties messageStatusTableProperties =
+                TCAMessageStatusPersister.getDatasetProperties(messageStatusTableTTLSeconds);
+        createDataset(tcaVESMessageStatusTableName, ObjectMappedTable.class, messageStatusTableProperties);
+
+
+        // Create TCA Alerts Abatement Table
+        final String tcaAlertsAbatementTableName = tcaAppConfig.getTcaAlertsAbatementTableName();
+        final Integer tcaAlertsAbatementTableTTLSeconds = tcaAppConfig.getTcaAlertsAbatementTableTTLSeconds();
+        LOG.info("Creating Alerts Abatement Table: {} with TTL: {}",
+                tcaAlertsAbatementTableName, tcaAlertsAbatementTableTTLSeconds);
+        final DatasetProperties alertsAbatementTableProperties =
+                TCAAlertsAbatementPersister.getDatasetProperties(tcaAlertsAbatementTableTTLSeconds);
+        createDataset(tcaAlertsAbatementTableName, ObjectMappedTable.class, alertsAbatementTableProperties);
+
+        // Create TCA VES Alerts Table
+        final String tcaVESAlertsTableName = tcaAppConfig.getTcaVESAlertsTableName();
+        final Integer alertsTableTTLSeconds = tcaAppConfig.getTcaVESAlertsTableTTLSeconds();
+        LOG.info("Creating TCA Alerts Table: {} with TTL: {}",
+                tcaVESAlertsTableName, alertsTableTTLSeconds);
+        final DatasetProperties alertTableProperties =
+                TCAVESAlertsPersister.getDatasetProperties(alertsTableTTLSeconds);
+        createDataset(tcaVESAlertsTableName, ObjectMappedTable.class, alertTableProperties);
+
+        // =========== Flow Setup ============= //
+        addFlow(new TCAVESCollectorFlow(tcaAppConfig));
+
+        // ========== Workers Setup =========== //
+        LOG.info("Creating TCA DMaaP Subscriber Worker");
+        addWorker(new TCADMaaPSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));
+        LOG.info("Creating TCA DMaaP Publisher Worker");
+        addWorker(new TCADMaaPPublisherWorker(tcaAppConfig.getTcaVESAlertsTableName()));
+        // TODO: Remove this before going to production
+        addWorker(new TCADMaaPMockSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));
+    }
+
+
+}
@@ -1,82 +1,82 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flow;\r
-\r
-import co.cask.cdap.api.flow.AbstractFlow;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAlertsAbatementFlowlet;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAlertsSinkFlowlet;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.flowlet.TCAVESMessageRouterFlowlet;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.flowlet.TCAVESThresholdViolationCalculatorFlowlet;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;\r
-\r
-/**\r
- * TCA Flow for VES (Virtual Event Streaming) Collector Flow\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class TCAVESCollectorFlow extends AbstractFlow {\r
-\r
-    private final TCAAppConfig tcaAppConfig;\r
-\r
-    public TCAVESCollectorFlow(TCAAppConfig tcaAppConfig) {\r
-        this.tcaAppConfig = tcaAppConfig;\r
-    }\r
-\r
-    @Override\r
-    protected void configure() {\r
-\r
-        setName(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_NAME_FLOW);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW);\r
-\r
-        final TCAVESMessageRouterFlowlet messageRouterFlowlet = new TCAVESMessageRouterFlowlet();\r
-        addFlowlet(messageRouterFlowlet);\r
-\r
-        final TCAVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =\r
-                new TCAVESThresholdViolationCalculatorFlowlet(tcaAppConfig.getTcaVESMessageStatusTableName());\r
-        addFlowlet(thresholdViolationCalculatorFlowlet, tcaAppConfig.getThresholdCalculatorFlowletInstances());\r
-\r
-        final TCAVESAlertsAbatementFlowlet tcavesAlertsAbatementFlowlet =\r
-                new TCAVESAlertsAbatementFlowlet(tcaAppConfig.getTcaAlertsAbatementTableName());\r
-        addFlowlet(tcavesAlertsAbatementFlowlet);\r
-\r
-        final TCAVESAAIEnrichmentFlowlet tcavesaaiEnrichmentFlowlet = new TCAVESAAIEnrichmentFlowlet();\r
-        addFlowlet(tcavesaaiEnrichmentFlowlet);\r
-\r
-        final TCAVESAlertsSinkFlowlet alertsSinkFlowlet =\r
-                new TCAVESAlertsSinkFlowlet(tcaAppConfig.getTcaVESAlertsTableName());\r
-        addFlowlet(alertsSinkFlowlet);\r
-\r
-\r
-        // connect DMaaP MR VES Subscriber output stream to VES Message Router Flowlet\r
-        connectStream(tcaAppConfig.getTcaSubscriberOutputStreamName(), messageRouterFlowlet);\r
-        // connect message router to VES threshold calculator\r
-        connect(messageRouterFlowlet, thresholdViolationCalculatorFlowlet);\r
-        // connect VES threshold calculator flowlet to Alerts Abatement Flowlet\r
-        connect(thresholdViolationCalculatorFlowlet, tcavesAlertsAbatementFlowlet);\r
-        // connect Alerts Abatement flowlet to AAI Enrichment Flowlet\r
-        connect(tcavesAlertsAbatementFlowlet, tcavesaaiEnrichmentFlowlet);\r
-        // connect A&AI Enrichment flowlet to Alerts Sink Flowlet\r
-        connect(tcavesaaiEnrichmentFlowlet,  alertsSinkFlowlet);\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flow;
+
+import co.cask.cdap.api.flow.AbstractFlow;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet;
+import org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAlertsAbatementFlowlet;
+import org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAlertsSinkFlowlet;
+import org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESMessageRouterFlowlet;
+import org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESThresholdViolationCalculatorFlowlet;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;
+
+/**
+ * TCA Flow for VES (Virtual Event Streaming) Collector Flow
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class TCAVESCollectorFlow extends AbstractFlow {
+
+    private final TCAAppConfig tcaAppConfig;
+
+    public TCAVESCollectorFlow(TCAAppConfig tcaAppConfig) {
+        this.tcaAppConfig = tcaAppConfig;
+    }
+
+    @Override
+    protected void configure() {
+
+        setName(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_NAME_FLOW);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW);
+
+        final TCAVESMessageRouterFlowlet messageRouterFlowlet = new TCAVESMessageRouterFlowlet();
+        addFlowlet(messageRouterFlowlet);
+
+        final TCAVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =
+                new TCAVESThresholdViolationCalculatorFlowlet(tcaAppConfig.getTcaVESMessageStatusTableName());
+        addFlowlet(thresholdViolationCalculatorFlowlet, tcaAppConfig.getThresholdCalculatorFlowletInstances());
+
+        final TCAVESAlertsAbatementFlowlet tcavesAlertsAbatementFlowlet =
+                new TCAVESAlertsAbatementFlowlet(tcaAppConfig.getTcaAlertsAbatementTableName());
+        addFlowlet(tcavesAlertsAbatementFlowlet);
+
+        final TCAVESAAIEnrichmentFlowlet tcavesaaiEnrichmentFlowlet = new TCAVESAAIEnrichmentFlowlet();
+        addFlowlet(tcavesaaiEnrichmentFlowlet);
+
+        final TCAVESAlertsSinkFlowlet alertsSinkFlowlet =
+                new TCAVESAlertsSinkFlowlet(tcaAppConfig.getTcaVESAlertsTableName());
+        addFlowlet(alertsSinkFlowlet);
+
+
+        // connect DMaaP MR VES Subscriber output stream to VES Message Router Flowlet
+        connectStream(tcaAppConfig.getTcaSubscriberOutputStreamName(), messageRouterFlowlet);
+        // connect message router to VES threshold calculator
+        connect(messageRouterFlowlet, thresholdViolationCalculatorFlowlet);
+        // connect VES threshold calculator flowlet to Alerts Abatement Flowlet
+        connect(thresholdViolationCalculatorFlowlet, tcavesAlertsAbatementFlowlet);
+        // connect Alerts Abatement flowlet to AAI Enrichment Flowlet
+        connect(tcavesAlertsAbatementFlowlet, tcavesaaiEnrichmentFlowlet);
+        // connect A&AI Enrichment flowlet to Alerts Sink Flowlet
+        connect(tcavesaaiEnrichmentFlowlet,  alertsSinkFlowlet);
+
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.annotation.Output;\r
-import co.cask.cdap.api.annotation.ProcessInput;\r
-import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import org.openecomp.dcae.apod.analytics.aai.AAIClientFactory;\r
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;\r
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClient;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-\r
-/**\r
- * Flowlet responsible for doing A&AI Enrichment\r
- *\r
- * @author Rajiv Singla . Creation Date: 9/20/2017.\r
- */\r
-public class TCAVESAAIEnrichmentFlowlet extends AbstractFlowlet {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAVESAAIEnrichmentFlowlet.class);\r
-\r
-    @Output(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_OUTPUT)\r
-    protected OutputEmitter<String> aaiEnrichmentOutputEmitter;\r
-\r
-    private TCAAppPreferences tcaAppPreferences;\r
-    private AAIEnrichmentClient aaiEnrichmentClient;\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_FLOWLET);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_DESCRIPTION_FLOWLET);\r
-    }\r
-\r
-    @Override\r
-    public void initialize(FlowletContext flowletContext) throws Exception {\r
-        super.initialize(flowletContext);\r
-        tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(flowletContext);\r
-        if (tcaAppPreferences.getEnableAAIEnrichment()) {\r
-            final AAIHttpClientConfig aaiHttpClientConfig =\r
-                    CDAPTCAUtils.createAAIEnrichmentClientConfig(tcaAppPreferences);\r
-            aaiEnrichmentClient = AAIClientFactory.create().getEnrichmentClient(aaiHttpClientConfig);\r
-        }\r
-    }\r
-\r
-    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_OUTPUT)\r
-    public void performAAIEnrichment(final String alertMessageString) throws IOException {\r
-\r
-        // if A&AI enrichment is disabled - no A&AI lookups are required\r
-        if (!tcaAppPreferences.getEnableAAIEnrichment()) {\r
-\r
-            LOG.debug("A&AI Enrichment is disabled. Skip A&AI Enrichment for alert: {}", alertMessageString);\r
-            aaiEnrichmentOutputEmitter.emit(alertMessageString);\r
-\r
-        } else {\r
-\r
-            // determine closed Loop Event Status\r
-            final TCAVESResponse tcavesResponse = TCAUtils.readValue(alertMessageString, TCAVESResponse.class);\r
-            final ClosedLoopEventStatus closedLoopEventStatus =\r
-                    ClosedLoopEventStatus.valueOf(tcavesResponse.getClosedLoopEventStatus());\r
-\r
-            if (closedLoopEventStatus == ClosedLoopEventStatus.ONSET) {\r
-                LOG.debug("Performing A&AI Enrichment of ONSET Alert: {}", alertMessageString);\r
-                final ControlLoopSchemaType controlLoopSchemaType =\r
-                        TCAUtils.determineControlLoopSchemaType(tcavesResponse);\r
-                final String sourceName = TCAUtils.determineSourceName(tcavesResponse);\r
-                LOG.debug("A&AI Source Name: {}, Control Loop Schema Type: {} for ONSET Alert: {}",\r
-                        sourceName, controlLoopSchemaType, alertMessageString);\r
-\r
-                if (controlLoopSchemaType == ControlLoopSchemaType.VM) {\r
-                    final String aaiVMEnrichmentAPIPath = tcaAppPreferences.getAaiVMEnrichmentAPIPath();\r
-                    TCAUtils.doAAIVMEnrichment(tcavesResponse, aaiEnrichmentClient, aaiVMEnrichmentAPIPath,\r
-                            alertMessageString, sourceName);\r
-                } else {\r
-                    final String aaiVNFEnrichmentAPIPath = tcaAppPreferences.getAaiVNFEnrichmentAPIPath();\r
-                    TCAUtils.doAAIVNFEnrichment(tcavesResponse, aaiEnrichmentClient, aaiVNFEnrichmentAPIPath,\r
-                            alertMessageString, sourceName);\r
-                }\r
-\r
-                final String aaiEnrichedAlert = TCAUtils.writeValueAsString(tcavesResponse);\r
-                LOG.debug("Emitting Alert after A&AI Enrichment: {}", aaiEnrichedAlert);\r
-                aaiEnrichmentOutputEmitter.emit(aaiEnrichedAlert);\r
-\r
-                // skip A&AI Enrichment of alerts with closed Loop Event Status - ABATED\r
-            } else if (closedLoopEventStatus == ClosedLoopEventStatus.ABATED) {\r
-                LOG.debug("Skipping Enrichment of Abated Alert: {}", alertMessageString);\r
-                aaiEnrichmentOutputEmitter.emit(alertMessageString);\r
-\r
-            } else {\r
-                // unsupported closed loop event status\r
-                final String errorMessage = String.format(\r
-                        "Unexpected ClosedLoopEventStatus: %s. Only ONSET and ABATED are supported." +\r
-                                "Ignoring alert: %s", closedLoopEventStatus, alertMessageString);\r
-                throw new CDAPSettingsException(errorMessage, LOG, new IllegalStateException(errorMessage));\r
-            }\r
-        }\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.annotation.Output;
+import co.cask.cdap.api.annotation.ProcessInput;
+import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import org.onap.dcae.apod.analytics.aai.AAIClientFactory;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+/**
+ * Flowlet responsible for doing A&AI Enrichment
+ *
+ * @author Rajiv Singla . Creation Date: 9/20/2017.
+ */
+public class TCAVESAAIEnrichmentFlowlet extends AbstractFlowlet {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAVESAAIEnrichmentFlowlet.class);
+
+    @Output(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_OUTPUT)
+    protected OutputEmitter<String> aaiEnrichmentOutputEmitter;
+
+    private TCAAppPreferences tcaAppPreferences;
+    private AAIEnrichmentClient aaiEnrichmentClient;
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_FLOWLET);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_DESCRIPTION_FLOWLET);
+    }
+
+    @Override
+    public void initialize(FlowletContext flowletContext) throws Exception {
+        super.initialize(flowletContext);
+        tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(flowletContext);
+        if (tcaAppPreferences.getEnableAAIEnrichment()) {
+            final AAIHttpClientConfig aaiHttpClientConfig =
+                    CDAPTCAUtils.createAAIEnrichmentClientConfig(tcaAppPreferences);
+            aaiEnrichmentClient = AAIClientFactory.create().getEnrichmentClient(aaiHttpClientConfig);
+        }
+    }
+
+    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_OUTPUT)
+    public void performAAIEnrichment(final String alertMessageString) throws IOException {
+
+        // if A&AI enrichment is disabled - no A&AI lookups are required
+        if (!tcaAppPreferences.getEnableAAIEnrichment()) {
+
+            LOG.debug("A&AI Enrichment is disabled. Skip A&AI Enrichment for alert: {}", alertMessageString);
+            aaiEnrichmentOutputEmitter.emit(alertMessageString);
+
+        } else {
+
+            // determine closed Loop Event Status
+            final TCAVESResponse tcavesResponse = TCAUtils.readValue(alertMessageString, TCAVESResponse.class);
+            final ClosedLoopEventStatus closedLoopEventStatus =
+                    ClosedLoopEventStatus.valueOf(tcavesResponse.getClosedLoopEventStatus());
+
+            if (closedLoopEventStatus == ClosedLoopEventStatus.ONSET) {
+                LOG.debug("Performing A&AI Enrichment of ONSET Alert: {}", alertMessageString);
+                final ControlLoopSchemaType controlLoopSchemaType =
+                        TCAUtils.determineControlLoopSchemaType(tcavesResponse);
+                final String sourceName = TCAUtils.determineSourceName(tcavesResponse);
+                LOG.debug("A&AI Source Name: {}, Control Loop Schema Type: {} for ONSET Alert: {}",
+                        sourceName, controlLoopSchemaType, alertMessageString);
+
+                if (controlLoopSchemaType == ControlLoopSchemaType.VM) {
+                    final String aaiVMEnrichmentAPIPath = tcaAppPreferences.getAaiVMEnrichmentAPIPath();
+                    TCAUtils.doAAIVMEnrichment(tcavesResponse, aaiEnrichmentClient, aaiVMEnrichmentAPIPath,
+                            alertMessageString, sourceName);
+                } else {
+                    final String aaiVNFEnrichmentAPIPath = tcaAppPreferences.getAaiVNFEnrichmentAPIPath();
+                    TCAUtils.doAAIVNFEnrichment(tcavesResponse, aaiEnrichmentClient, aaiVNFEnrichmentAPIPath,
+                            alertMessageString, sourceName);
+                }
+
+                final String aaiEnrichedAlert = TCAUtils.writeValueAsString(tcavesResponse);
+                LOG.debug("Emitting Alert after A&AI Enrichment: {}", aaiEnrichedAlert);
+                aaiEnrichmentOutputEmitter.emit(aaiEnrichedAlert);
+
+                // skip A&AI Enrichment of alerts with closed Loop Event Status - ABATED
+            } else if (closedLoopEventStatus == ClosedLoopEventStatus.ABATED) {
+                LOG.debug("Skipping Enrichment of Abated Alert: {}", alertMessageString);
+                aaiEnrichmentOutputEmitter.emit(alertMessageString);
+
+            } else {
+                // unsupported closed loop event status
+                final String errorMessage = String.format(
+                        "Unexpected ClosedLoopEventStatus: %s. Only ONSET and ABATED are supported." +
+                                "Ignoring alert: %s", closedLoopEventStatus, alertMessageString);
+                throw new CDAPSettingsException(errorMessage, LOG, new IllegalStateException(errorMessage));
+            }
+        }
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.annotation.Output;\r
-import co.cask.cdap.api.annotation.ProcessInput;\r
-import co.cask.cdap.api.annotation.Property;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementPersister;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.util.Date;\r
-\r
-/**\r
- * Flowlet responsible to sending out abatement alerts\r
- *\r
- * @author Rajiv Singla . Creation Date: 9/11/2017.\r
- */\r
-public class TCAVESAlertsAbatementFlowlet extends AbstractFlowlet {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAVESAlertsAbatementFlowlet.class);\r
-\r
-    @Property\r
-    private final String tcaAlertsAbatementTableName;\r
-\r
-    @Output(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_OUTPUT)\r
-    protected OutputEmitter<String> alertsAbatementOutputEmitter;\r
-\r
-    private ObjectMappedTable<TCAAlertsAbatementEntity> tcaAlertsAbatementTable;\r
-\r
-    public TCAVESAlertsAbatementFlowlet(final String tcaAlertsAbatementTableName) {\r
-        this.tcaAlertsAbatementTableName = tcaAlertsAbatementTableName;\r
-    }\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_DESCRIPTION_FLOWLET);\r
-    }\r
-\r
-    @Override\r
-    public void initialize(FlowletContext flowletContext) throws Exception {\r
-        super.initialize(flowletContext);\r
-        tcaAlertsAbatementTable = getContext().getDataset(tcaAlertsAbatementTableName);\r
-    }\r
-\r
-    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT)\r
-    public void determineAbatementAlerts(final ThresholdCalculatorOutput thresholdCalculatorOutput) throws IOException {\r
-\r
-        final String cefMessage = thresholdCalculatorOutput.getCefMessage();\r
-        final String alertMessageString = thresholdCalculatorOutput.getAlertMessage();\r
-        final String violatedMetricsPerEventNameString = thresholdCalculatorOutput.getViolatedMetricsPerEventName();\r
-\r
-        // alerts must have violated metrics per event name present\r
-        if (StringUtils.isBlank(violatedMetricsPerEventNameString)) {\r
-            final String errorMessage = String.format(\r
-                    "No violated metricsPerEventName found for VES Message: %s." +\r
-                            "Ignored alert message: %s", cefMessage, alertMessageString);\r
-            throw new CDAPSettingsException(errorMessage, LOG, new IllegalStateException(errorMessage));\r
-        }\r
-\r
-        final MetricsPerEventName violatedMetricsPerEventName =\r
-                TCAUtils.readValue(violatedMetricsPerEventNameString, MetricsPerEventName.class);\r
-        final EventListener eventListener = TCAUtils.readValue(cefMessage, EventListener.class);\r
-        final TCAVESResponse tcavesResponse = TCAUtils.readValue(alertMessageString, TCAVESResponse.class);\r
-        final Threshold violatedThreshold = violatedMetricsPerEventName.getThresholds().get(0);\r
-        final ClosedLoopEventStatus closedLoopEventStatus = violatedThreshold.getClosedLoopEventStatus();\r
-\r
-        switch (closedLoopEventStatus) {\r
-\r
-            case ONSET:\r
-\r
-                LOG.debug("Saving information for ONSET event for cefMessage: {}", cefMessage);\r
-                TCAAlertsAbatementPersister.persist(eventListener, violatedMetricsPerEventName, tcavesResponse,\r
-                        null, tcaAlertsAbatementTable);\r
-                LOG.debug("Emitting ONSET alert: {}", alertMessageString);\r
-                alertsAbatementOutputEmitter.emit(alertMessageString);\r
-                break;\r
-\r
-            case ABATED:\r
-\r
-                LOG.debug("Looking up previous sent alert for abated threshold: {}", violatedThreshold);\r
-                final TCAAlertsAbatementEntity previousAlertsAbatementEntry =\r
-                        TCAAlertsAbatementPersister.lookUpByKey(eventListener, violatedMetricsPerEventName,\r
-                                tcaAlertsAbatementTable);\r
-\r
-                if (previousAlertsAbatementEntry != null) {\r
-\r
-                    LOG.debug("Found previous AlertsAbatementEntity: {}", previousAlertsAbatementEntry);\r
-\r
-                    final String abatementSentTS = previousAlertsAbatementEntry.getAbatementSentTS();\r
-                    if (abatementSentTS != null) {\r
-                        LOG.debug("Abatement alert was already sent at timestamp: {}. " +\r
-                                "Skip resending this abatement alert again", abatementSentTS);\r
-                    } else {\r
-\r
-                        final long newAbatementSentTS = new Date().getTime();\r
-                        LOG.debug(\r
-                                "No abatement alert was sent before." +\r
-                                        "Sending abatement alert:{} for the first time at:{}",\r
-                                alertMessageString, newAbatementSentTS);\r
-\r
-                        // save new Abatement alert sent timestamp in table\r
-                        TCAAlertsAbatementPersister.persist(eventListener, violatedMetricsPerEventName, tcavesResponse,\r
-                                Long.toString(newAbatementSentTS), tcaAlertsAbatementTable);\r
-\r
-                        // Set request id to be same as previous ONSET event request ID\r
-                        tcavesResponse.setRequestID(previousAlertsAbatementEntry.getRequestId());\r
-                        final String abatedAlertString = TCAUtils.writeValueAsString(tcavesResponse);\r
-\r
-                        LOG.info("Emitting ABATED alert: {}", abatedAlertString);\r
-                        alertsAbatementOutputEmitter.emit(abatedAlertString);\r
-\r
-                    }\r
-\r
-                } else {\r
-                    LOG.info("No previous ONSET alert was found for this ABATED alert: {}.Skip sending abated alert.",\r
-                            alertMessageString);\r
-                }\r
-\r
-                break;\r
-\r
-            default:\r
-\r
-                final String errorMessage = String.format(\r
-                        "Unexpected ClosedLoopEventStatus: %s. Only ONSET and ABATED are supported." +\r
-                                "Ignoring alert: %s", closedLoopEventStatus, alertMessageString);\r
-                throw new CDAPSettingsException(errorMessage, LOG, new IllegalStateException(errorMessage));\r
-\r
-        }\r
-\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.annotation.Output;
+import co.cask.cdap.api.annotation.ProcessInput;
+import co.cask.cdap.api.annotation.Property;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementEntity;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementPersister;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Date;
+
+/**
+ * Flowlet responsible to sending out abatement alerts
+ *
+ * @author Rajiv Singla . Creation Date: 9/11/2017.
+ */
+public class TCAVESAlertsAbatementFlowlet extends AbstractFlowlet {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAVESAlertsAbatementFlowlet.class);
+
+    @Property
+    private final String tcaAlertsAbatementTableName;
+
+    @Output(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_OUTPUT)
+    protected OutputEmitter<String> alertsAbatementOutputEmitter;
+
+    private ObjectMappedTable<TCAAlertsAbatementEntity> tcaAlertsAbatementTable;
+
+    public TCAVESAlertsAbatementFlowlet(final String tcaAlertsAbatementTableName) {
+        this.tcaAlertsAbatementTableName = tcaAlertsAbatementTableName;
+    }
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_DESCRIPTION_FLOWLET);
+    }
+
+    @Override
+    public void initialize(FlowletContext flowletContext) throws Exception {
+        super.initialize(flowletContext);
+        tcaAlertsAbatementTable = getContext().getDataset(tcaAlertsAbatementTableName);
+    }
+
+    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT)
+    public void determineAbatementAlerts(final ThresholdCalculatorOutput thresholdCalculatorOutput) throws IOException {
+
+        final String cefMessage = thresholdCalculatorOutput.getCefMessage();
+        final String alertMessageString = thresholdCalculatorOutput.getAlertMessage();
+        final String violatedMetricsPerEventNameString = thresholdCalculatorOutput.getViolatedMetricsPerEventName();
+
+        // alerts must have violated metrics per event name present
+        if (StringUtils.isBlank(violatedMetricsPerEventNameString)) {
+            final String errorMessage = String.format(
+                    "No violated metricsPerEventName found for VES Message: %s." +
+                            "Ignored alert message: %s", cefMessage, alertMessageString);
+            throw new CDAPSettingsException(errorMessage, LOG, new IllegalStateException(errorMessage));
+        }
+
+        final MetricsPerEventName violatedMetricsPerEventName =
+                TCAUtils.readValue(violatedMetricsPerEventNameString, MetricsPerEventName.class);
+        final EventListener eventListener = TCAUtils.readValue(cefMessage, EventListener.class);
+        final TCAVESResponse tcavesResponse = TCAUtils.readValue(alertMessageString, TCAVESResponse.class);
+        final Threshold violatedThreshold = violatedMetricsPerEventName.getThresholds().get(0);
+        final ClosedLoopEventStatus closedLoopEventStatus = violatedThreshold.getClosedLoopEventStatus();
+
+        switch (closedLoopEventStatus) {
+
+            case ONSET:
+
+                LOG.debug("Saving information for ONSET event for cefMessage: {}", cefMessage);
+                TCAAlertsAbatementPersister.persist(eventListener, violatedMetricsPerEventName, tcavesResponse,
+                        null, tcaAlertsAbatementTable);
+                LOG.debug("Emitting ONSET alert: {}", alertMessageString);
+                alertsAbatementOutputEmitter.emit(alertMessageString);
+                break;
+
+            case ABATED:
+
+                LOG.debug("Looking up previous sent alert for abated threshold: {}", violatedThreshold);
+                final TCAAlertsAbatementEntity previousAlertsAbatementEntry =
+                        TCAAlertsAbatementPersister.lookUpByKey(eventListener, violatedMetricsPerEventName,
+                                tcaAlertsAbatementTable);
+
+                if (previousAlertsAbatementEntry != null) {
+
+                    LOG.debug("Found previous AlertsAbatementEntity: {}", previousAlertsAbatementEntry);
+
+                    final String abatementSentTS = previousAlertsAbatementEntry.getAbatementSentTS();
+                    if (abatementSentTS != null) {
+                        LOG.debug("Abatement alert was already sent at timestamp: {}. " +
+                                "Skip resending this abatement alert again", abatementSentTS);
+                    } else {
+
+                        final long newAbatementSentTS = new Date().getTime();
+                        LOG.debug(
+                                "No abatement alert was sent before." +
+                                        "Sending abatement alert:{} for the first time at:{}",
+                                alertMessageString, newAbatementSentTS);
+
+                        // save new Abatement alert sent timestamp in table
+                        TCAAlertsAbatementPersister.persist(eventListener, violatedMetricsPerEventName, tcavesResponse,
+                                Long.toString(newAbatementSentTS), tcaAlertsAbatementTable);
+
+                        // Set request id to be same as previous ONSET event request ID
+                        tcavesResponse.setRequestID(previousAlertsAbatementEntry.getRequestId());
+                        final String abatedAlertString = TCAUtils.writeValueAsString(tcavesResponse);
+
+                        LOG.info("Emitting ABATED alert: {}", abatedAlertString);
+                        alertsAbatementOutputEmitter.emit(abatedAlertString);
+
+                    }
+
+                } else {
+                    LOG.info("No previous ONSET alert was found for this ABATED alert: {}.Skip sending abated alert.",
+                            alertMessageString);
+                }
+
+                break;
+
+            default:
+
+                final String errorMessage = String.format(
+                        "Unexpected ClosedLoopEventStatus: %s. Only ONSET and ABATED are supported." +
+                                "Ignoring alert: %s", closedLoopEventStatus, alertMessageString);
+                throw new CDAPSettingsException(errorMessage, LOG, new IllegalStateException(errorMessage));
+
+        }
+
+
+    }
+
+}
@@ -1,71 +1,71 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.annotation.ProcessInput;\r
-import co.cask.cdap.api.annotation.Property;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister;\r
-\r
-/**\r
- * Saves TCA VES Alert Messages in a Time series Table\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/15/2016.\r
- */\r
-public class TCAVESAlertsSinkFlowlet extends AbstractFlowlet {\r
-\r
-    @Property\r
-    private final String tcaVESAlertsTableName;\r
-\r
-    private ObjectMappedTable<TCAVESAlertEntity> tcaVESAlertsTable;\r
-\r
-    public TCAVESAlertsSinkFlowlet(String tcaVESAlertsTableName) {\r
-        this.tcaVESAlertsTableName = tcaVESAlertsTableName;\r
-    }\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET);\r
-    }\r
-\r
-    @Override\r
-    public void initialize(FlowletContext flowletContext) throws Exception {\r
-        super.initialize(flowletContext);\r
-        tcaVESAlertsTable = getContext().getDataset(tcaVESAlertsTableName);\r
-    }\r
-\r
-    /**\r
-     * Saves messages to Alerts table\r
-     *\r
-     * @param alertMessage alert message\r
-     */\r
-    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_OUTPUT)\r
-    public void saveAlerts(String alertMessage) {\r
-        // Saves alert message in alerts table\r
-        TCAVESAlertsPersister.persist(alertMessage, tcaVESAlertsTable);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.annotation.ProcessInput;
+import co.cask.cdap.api.annotation.Property;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister;
+
+/**
+ * Saves TCA VES Alert Messages in a Time series Table
+ *
+ * @author Rajiv Singla . Creation Date: 11/15/2016.
+ */
+public class TCAVESAlertsSinkFlowlet extends AbstractFlowlet {
+
+    @Property
+    private final String tcaVESAlertsTableName;
+
+    private ObjectMappedTable<TCAVESAlertEntity> tcaVESAlertsTable;
+
+    public TCAVESAlertsSinkFlowlet(String tcaVESAlertsTableName) {
+        this.tcaVESAlertsTableName = tcaVESAlertsTableName;
+    }
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET);
+    }
+
+    @Override
+    public void initialize(FlowletContext flowletContext) throws Exception {
+        super.initialize(flowletContext);
+        tcaVESAlertsTable = getContext().getDataset(tcaVESAlertsTableName);
+    }
+
+    /**
+     * Saves messages to Alerts table
+     *
+     * @param alertMessage alert message
+     */
+    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_OUTPUT)
+    public void saveAlerts(String alertMessage) {
+        // Saves alert message in alerts table
+        TCAVESAlertsPersister.persist(alertMessage, tcaVESAlertsTable);
+    }
+
+}
@@ -1,59 +1,59 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.annotation.Output;\r
-import co.cask.cdap.api.annotation.ProcessInput;\r
-import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import co.cask.cdap.api.flow.flowlet.StreamEvent;\r
-import com.google.common.base.Charsets;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-\r
-/**\r
- * TCA Message Router Flowlet emits VES Message to {@link TCAVESThresholdViolationCalculatorFlowlet} instances\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/14/2016.\r
- */\r
-public class TCAVESMessageRouterFlowlet extends AbstractFlowlet {\r
-\r
-    /**\r
-     * Emits ves message to TCA Calculator Instances\r
-     */\r
-    @Output(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT)\r
-    protected OutputEmitter<String> vesMessageEmitter;\r
-\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET);\r
-    }\r
-\r
-    @ProcessInput\r
-    public void routeVESMessage(StreamEvent vesMessageStreamEvent) {\r
-        final String vesMessage = Charsets.UTF_8.decode(vesMessageStreamEvent.getBody()).toString();\r
-        vesMessageEmitter.emit(\r
-                vesMessage, AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY, vesMessage.hashCode());\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.annotation.Output;
+import co.cask.cdap.api.annotation.ProcessInput;
+import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import co.cask.cdap.api.flow.flowlet.StreamEvent;
+import com.google.common.base.Charsets;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+
+/**
+ * TCA Message Router Flowlet emits VES Message to {@link TCAVESThresholdViolationCalculatorFlowlet} instances
+ *
+ * @author Rajiv Singla . Creation Date: 11/14/2016.
+ */
+public class TCAVESMessageRouterFlowlet extends AbstractFlowlet {
+
+    /**
+     * Emits ves message to TCA Calculator Instances
+     */
+    @Output(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT)
+    protected OutputEmitter<String> vesMessageEmitter;
+
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET);
+    }
+
+    @ProcessInput
+    public void routeVESMessage(StreamEvent vesMessageStreamEvent) {
+        final String vesMessage = Charsets.UTF_8.decode(vesMessageStreamEvent.getBody()).toString();
+        vesMessageEmitter.emit(
+                vesMessage, AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY, vesMessage.hashCode());
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.annotation.HashPartition;\r
-import co.cask.cdap.api.annotation.Output;\r
-import co.cask.cdap.api.annotation.ProcessInput;\r
-import co.cask.cdap.api.annotation.Property;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusPersister.persist;\r
-\r
-/**\r
- * TCA VES Message Filter filters out messages which are not applicable for TCA as per TCA Policy\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class TCAVESThresholdViolationCalculatorFlowlet extends AbstractFlowlet {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAVESThresholdViolationCalculatorFlowlet.class);\r
-\r
-    @Output(CDAPComponentsConstants.TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT)\r
-    protected OutputEmitter<ThresholdCalculatorOutput> tcaAlertOutputEmitter;\r
-    protected Metrics metrics;\r
-    private ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable;\r
-\r
-    @Property\r
-    private final String messageStatusTableName;\r
-    private Boolean enableAlertCEFFormat;\r
-\r
-    private TCAPolicy tcaPolicy;\r
-\r
-    /**\r
-     * Creates an instance of TCA VES Threshold violation calculator flowlet with give message status table name\r
-     *\r
-     * @param messageStatusTableName message status table name\r
-     */\r
-    public TCAVESThresholdViolationCalculatorFlowlet(String messageStatusTableName) {\r
-        this.messageStatusTableName = messageStatusTableName;\r
-    }\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET);\r
-    }\r
-\r
-\r
-    @Override\r
-    public void initialize(FlowletContext flowletContext) throws Exception {\r
-        super.initialize(flowletContext);\r
-\r
-        // parse Runtime Arguments to tca policy preferences\r
-        tcaPolicy = CDAPTCAUtils.getValidatedTCAPolicyPreferences(flowletContext);\r
-        // Parse runtime arguments\r
-        final TCAAppPreferences tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(flowletContext);\r
-        enableAlertCEFFormat = tcaAppPreferences.getEnableAlertCEFFormat();\r
-        vesMessageStatusTable = getContext().getDataset(messageStatusTableName);\r
-\r
-    }\r
-\r
-    /**\r
-     * Filters VES Messages that violates TCA Policy\r
-     *\r
-     * @param vesMessage VES Message\r
-     * @throws JsonProcessingException if alert message cannot be parsed into JSON object\r
-     */\r
-    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT)\r
-    @HashPartition(AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY)\r
-    public void filterVESMessages(String vesMessage) throws JsonProcessingException {\r
-\r
-        TCACalculatorMessageType calculatorMessageType = TCACalculatorMessageType.INAPPLICABLE;\r
-        String alertMessage = null;\r
-\r
-        // Step 1: Filter incoming messages\r
-        final TCACEFProcessorContext processorContext = TCAUtils.filterCEFMessage(vesMessage, tcaPolicy);\r
-\r
-        if (processorContext.canProcessingContinue()) {\r
-\r
-            // Step 2: Check if CEF Message violate any thresholds\r
-            final TCACEFProcessorContext processorContextWithViolations =\r
-                    TCAUtils.computeThresholdViolations(processorContext);\r
-\r
-            if (processorContextWithViolations.canProcessingContinue()) {\r
-\r
-                // Step 3: Create Alert Message\r
-                final String tcaAppName = getContext().getApplicationSpecification().getName();\r
-                alertMessage =\r
-                        TCAUtils.createTCAAlertString(processorContextWithViolations, tcaAppName, enableAlertCEFFormat);\r
-                calculatorMessageType = TCACalculatorMessageType.NON_COMPLIANT;\r
-                LOG.debug("VES Threshold Violation Detected. An alert message is be generated. {}", alertMessage);\r
-\r
-                metrics.count(CDAPMetricsConstants.TCA_VES_NON_COMPLIANT_MESSAGES_METRIC, 1);\r
-\r
-                // Step 4: Emit message to Alert Sink Flowlet\r
-                final ThresholdCalculatorOutput thresholdCalculatorOutput =\r
-                        new ThresholdCalculatorOutput(processorContext.getMessage(),\r
-                                TCAUtils.writeValueAsString(processorContext.getTCAPolicy()),\r
-                                TCAUtils.writeValueAsString(processorContextWithViolations.getMetricsPerEventName()),\r
-                                alertMessage);\r
-                tcaAlertOutputEmitter.emit(thresholdCalculatorOutput);\r
-\r
-            } else {\r
-\r
-                calculatorMessageType = TCACalculatorMessageType.COMPLIANT;\r
-                metrics.count(CDAPMetricsConstants.TCA_VES_COMPLIANT_MESSAGES_METRIC, 1);\r
-            }\r
-\r
-        } else {\r
-\r
-            metrics.count(CDAPMetricsConstants.TCA_VES_INAPPLICABLE_MESSAGES_METRIC, 1);\r
-        }\r
-\r
-        // save message to message status table\r
-        final int instanceId = getContext().getInstanceId();\r
-        persist(processorContext, instanceId, calculatorMessageType, vesMessageStatusTable, alertMessage);\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.annotation.HashPartition;
+import co.cask.cdap.api.annotation.Output;
+import co.cask.cdap.api.annotation.ProcessInput;
+import co.cask.cdap.api.annotation.Property;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import co.cask.cdap.api.metrics.Metrics;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCACalculatorMessageType;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusEntity;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusPersister.persist;
+
+/**
+ * TCA VES Message Filter filters out messages which are not applicable for TCA as per TCA Policy
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class TCAVESThresholdViolationCalculatorFlowlet extends AbstractFlowlet {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAVESThresholdViolationCalculatorFlowlet.class);
+
+    @Output(CDAPComponentsConstants.TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT)
+    protected OutputEmitter<ThresholdCalculatorOutput> tcaAlertOutputEmitter;
+    protected Metrics metrics;
+    private ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable;
+
+    @Property
+    private final String messageStatusTableName;
+    private Boolean enableAlertCEFFormat;
+
+    private TCAPolicy tcaPolicy;
+
+    /**
+     * Creates an instance of TCA VES Threshold violation calculator flowlet with give message status table name
+     *
+     * @param messageStatusTableName message status table name
+     */
+    public TCAVESThresholdViolationCalculatorFlowlet(String messageStatusTableName) {
+        this.messageStatusTableName = messageStatusTableName;
+    }
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET);
+    }
+
+
+    @Override
+    public void initialize(FlowletContext flowletContext) throws Exception {
+        super.initialize(flowletContext);
+
+        // parse Runtime Arguments to tca policy preferences
+        tcaPolicy = CDAPTCAUtils.getValidatedTCAPolicyPreferences(flowletContext);
+        // Parse runtime arguments
+        final TCAAppPreferences tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(flowletContext);
+        enableAlertCEFFormat = tcaAppPreferences.getEnableAlertCEFFormat();
+        vesMessageStatusTable = getContext().getDataset(messageStatusTableName);
+
+    }
+
+    /**
+     * Filters VES Messages that violates TCA Policy
+     *
+     * @param vesMessage VES Message
+     * @throws JsonProcessingException if alert message cannot be parsed into JSON object
+     */
+    @ProcessInput(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT)
+    @HashPartition(AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY)
+    public void filterVESMessages(String vesMessage) throws JsonProcessingException {
+
+        TCACalculatorMessageType calculatorMessageType = TCACalculatorMessageType.INAPPLICABLE;
+        String alertMessage = null;
+
+        // Step 1: Filter incoming messages
+        final TCACEFProcessorContext processorContext = TCAUtils.filterCEFMessage(vesMessage, tcaPolicy);
+
+        if (processorContext.canProcessingContinue()) {
+
+            // Step 2: Check if CEF Message violate any thresholds
+            final TCACEFProcessorContext processorContextWithViolations =
+                    TCAUtils.computeThresholdViolations(processorContext);
+
+            if (processorContextWithViolations.canProcessingContinue()) {
+
+                // Step 3: Create Alert Message
+                final String tcaAppName = getContext().getApplicationSpecification().getName();
+                alertMessage =
+                        TCAUtils.createTCAAlertString(processorContextWithViolations, tcaAppName, enableAlertCEFFormat);
+                calculatorMessageType = TCACalculatorMessageType.NON_COMPLIANT;
+                LOG.debug("VES Threshold Violation Detected. An alert message is be generated. {}", alertMessage);
+
+                metrics.count(CDAPMetricsConstants.TCA_VES_NON_COMPLIANT_MESSAGES_METRIC, 1);
+
+                // Step 4: Emit message to Alert Sink Flowlet
+                final ThresholdCalculatorOutput thresholdCalculatorOutput =
+                        new ThresholdCalculatorOutput(processorContext.getMessage(),
+                                TCAUtils.writeValueAsString(processorContext.getTCAPolicy()),
+                                TCAUtils.writeValueAsString(processorContextWithViolations.getMetricsPerEventName()),
+                                alertMessage);
+                tcaAlertOutputEmitter.emit(thresholdCalculatorOutput);
+
+            } else {
+
+                calculatorMessageType = TCACalculatorMessageType.COMPLIANT;
+                metrics.count(CDAPMetricsConstants.TCA_VES_COMPLIANT_MESSAGES_METRIC, 1);
+            }
+
+        } else {
+
+            metrics.count(CDAPMetricsConstants.TCA_VES_INAPPLICABLE_MESSAGES_METRIC, 1);
+        }
+
+        // save message to message status table
+        final int instanceId = getContext().getInstanceId();
+        persist(processorContext, instanceId, calculatorMessageType, vesMessageStatusTable, alertMessage);
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBaseAppConfig;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-\r
-/**\r
- * Contains CDAP App Config Settings for TCA Application\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public class TCAAppConfig extends CDAPBaseAppConfig {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    protected String tcaSubscriberOutputStreamName;\r
-    protected Integer thresholdCalculatorFlowletInstances;\r
-\r
-    protected String tcaVESMessageStatusTableName;\r
-    protected Integer tcaVESMessageStatusTableTTLSeconds;\r
-    protected String tcaVESAlertsTableName;\r
-    protected Integer tcaVESAlertsTableTTLSeconds;\r
-    protected String tcaAlertsAbatementTableName;\r
-    protected Integer tcaAlertsAbatementTableTTLSeconds;\r
-\r
-\r
-    public TCAAppConfig() {\r
-        appName = CDAPComponentsConstants.TCA_DEFAULT_NAME_APP;\r
-        appDescription = CDAPComponentsConstants.TCA_DEFAULT_DESCRIPTION_APP;\r
-        tcaSubscriberOutputStreamName = CDAPComponentsConstants.TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM;\r
-        thresholdCalculatorFlowletInstances = AnalyticsConstants.TCA_DEFAULT_THRESHOLD_CALCULATOR_FLOWLET_INSTANCES;\r
-        tcaVESMessageStatusTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE;\r
-        tcaVESMessageStatusTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_TTL_TABLE;\r
-        tcaVESAlertsTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_ALERTS_NAME_TABLE;\r
-        tcaVESAlertsTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_ALERTS_TTL_TABLE;\r
-        tcaAlertsAbatementTableName = CDAPComponentsConstants.TCA_DEFAULT_ALERTS_ABATEMENT_NAME_TABLE;\r
-        tcaAlertsAbatementTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_ALERTS_ABATEMENT_TTL_TABLE;\r
-    }\r
-\r
-    public String getTcaSubscriberOutputStreamName() {\r
-        return tcaSubscriberOutputStreamName;\r
-    }\r
-\r
-    public String getTcaVESMessageStatusTableName() {\r
-        return tcaVESMessageStatusTableName;\r
-    }\r
-\r
-    public Integer getTcaVESMessageStatusTableTTLSeconds() {\r
-        return tcaVESMessageStatusTableTTLSeconds;\r
-    }\r
-\r
-    public String getTcaVESAlertsTableName() {\r
-        return tcaVESAlertsTableName;\r
-    }\r
-\r
-    public Integer getTcaVESAlertsTableTTLSeconds() {\r
-        return tcaVESAlertsTableTTLSeconds;\r
-    }\r
-\r
-    public Integer getThresholdCalculatorFlowletInstances() {\r
-        return thresholdCalculatorFlowletInstances;\r
-    }\r
-\r
-    public String getTcaAlertsAbatementTableName() {\r
-        return tcaAlertsAbatementTableName;\r
-    }\r
-\r
-    public Integer getTcaAlertsAbatementTableTTLSeconds() {\r
-        return tcaAlertsAbatementTableTTLSeconds;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("appName", appName)\r
-                .add("appDescription", appDescription)\r
-                .add("tcaSubscriberOutputStreamName", tcaSubscriberOutputStreamName)\r
-                .add("thresholdCalculatorFlowletInstances", thresholdCalculatorFlowletInstances)\r
-                .add("tcaVESMessageStatusTableName", tcaVESMessageStatusTableName)\r
-                .add("tcaVESMessageStatusTableTTLSeconds", tcaVESMessageStatusTableTTLSeconds)\r
-                .add("tcaVESAlertsTableName", tcaVESAlertsTableName)\r
-                .add("tcaVESAlertsTableTTLSeconds", tcaVESAlertsTableTTLSeconds)\r
-                .add("tcaAlertsAbatementTableName", tcaAlertsAbatementTableName)\r
-                .add("tcaAlertsAbatementTableTTLSeconds", tcaAlertsAbatementTableTTLSeconds)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPBaseAppConfig;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+
+/**
+ * Contains CDAP App Config Settings for TCA Application
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public class TCAAppConfig extends CDAPBaseAppConfig {
+
+
+    private static final long serialVersionUID = 1L;
+
+    protected String tcaSubscriberOutputStreamName;
+    protected Integer thresholdCalculatorFlowletInstances;
+
+    protected String tcaVESMessageStatusTableName;
+    protected Integer tcaVESMessageStatusTableTTLSeconds;
+    protected String tcaVESAlertsTableName;
+    protected Integer tcaVESAlertsTableTTLSeconds;
+    protected String tcaAlertsAbatementTableName;
+    protected Integer tcaAlertsAbatementTableTTLSeconds;
+
+
+    public TCAAppConfig() {
+        appName = CDAPComponentsConstants.TCA_DEFAULT_NAME_APP;
+        appDescription = CDAPComponentsConstants.TCA_DEFAULT_DESCRIPTION_APP;
+        tcaSubscriberOutputStreamName = CDAPComponentsConstants.TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM;
+        thresholdCalculatorFlowletInstances = AnalyticsConstants.TCA_DEFAULT_THRESHOLD_CALCULATOR_FLOWLET_INSTANCES;
+        tcaVESMessageStatusTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE;
+        tcaVESMessageStatusTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_TTL_TABLE;
+        tcaVESAlertsTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_ALERTS_NAME_TABLE;
+        tcaVESAlertsTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_ALERTS_TTL_TABLE;
+        tcaAlertsAbatementTableName = CDAPComponentsConstants.TCA_DEFAULT_ALERTS_ABATEMENT_NAME_TABLE;
+        tcaAlertsAbatementTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_ALERTS_ABATEMENT_TTL_TABLE;
+    }
+
+    public String getTcaSubscriberOutputStreamName() {
+        return tcaSubscriberOutputStreamName;
+    }
+
+    public String getTcaVESMessageStatusTableName() {
+        return tcaVESMessageStatusTableName;
+    }
+
+    public Integer getTcaVESMessageStatusTableTTLSeconds() {
+        return tcaVESMessageStatusTableTTLSeconds;
+    }
+
+    public String getTcaVESAlertsTableName() {
+        return tcaVESAlertsTableName;
+    }
+
+    public Integer getTcaVESAlertsTableTTLSeconds() {
+        return tcaVESAlertsTableTTLSeconds;
+    }
+
+    public Integer getThresholdCalculatorFlowletInstances() {
+        return thresholdCalculatorFlowletInstances;
+    }
+
+    public String getTcaAlertsAbatementTableName() {
+        return tcaAlertsAbatementTableName;
+    }
+
+    public Integer getTcaAlertsAbatementTableTTLSeconds() {
+        return tcaAlertsAbatementTableTTLSeconds;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("appName", appName)
+                .add("appDescription", appDescription)
+                .add("tcaSubscriberOutputStreamName", tcaSubscriberOutputStreamName)
+                .add("thresholdCalculatorFlowletInstances", thresholdCalculatorFlowletInstances)
+                .add("tcaVESMessageStatusTableName", tcaVESMessageStatusTableName)
+                .add("tcaVESMessageStatusTableTTLSeconds", tcaVESMessageStatusTableTTLSeconds)
+                .add("tcaVESAlertsTableName", tcaVESAlertsTableName)
+                .add("tcaVESAlertsTableTTLSeconds", tcaVESAlertsTableTTLSeconds)
+                .add("tcaAlertsAbatementTableName", tcaAlertsAbatementTableName)
+                .add("tcaAlertsAbatementTableTTLSeconds", tcaAlertsAbatementTableTTLSeconds)
+                .toString();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-/**\r
- * <p>\r
- *     App Preferences for Analytics TCA (Threshold Crossing Alert) App\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/4/2016.\r
- */\r
-public class TCAAppPreferences implements CDAPAppPreferences {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    // subscriber preferences\r
-    protected String subscriberHostName;\r
-\r
-    protected Integer subscriberHostPort;\r
-\r
-    protected String subscriberTopicName;\r
-\r
-    protected String subscriberProtocol;\r
-\r
-    protected String subscriberUserName;\r
-\r
-    protected String subscriberUserPassword;\r
-\r
-    protected String subscriberContentType;\r
-\r
-    protected String subscriberConsumerId;\r
-\r
-    protected String subscriberConsumerGroup;\r
-\r
-    protected Integer subscriberTimeoutMS;\r
-\r
-    protected Integer subscriberMessageLimit;\r
-\r
-    protected Integer subscriberPollingInterval;\r
-\r
-    // publisher preferences\r
-    protected String publisherHostName;\r
-\r
-    protected Integer publisherHostPort;\r
-\r
-    protected String publisherTopicName;\r
-\r
-    protected String publisherProtocol;\r
-\r
-    protected String publisherUserName;\r
-\r
-    protected String publisherUserPassword;\r
-\r
-    protected String publisherContentType;\r
-\r
-    protected Integer publisherMaxBatchSize;\r
-\r
-    protected Integer publisherMaxRecoveryQueueSize;\r
-\r
-    protected Integer publisherPollingInterval;\r
-\r
-    protected Boolean enableAlertCEFFormat;\r
-\r
-\r
-    // A&AI Enrichment\r
-\r
-    protected Boolean enableAAIEnrichment;\r
-\r
-    protected String aaiEnrichmentHost;\r
-\r
-    protected Integer aaiEnrichmentPortNumber;\r
-\r
-    protected String aaiEnrichmentProtocol;\r
-\r
-    protected String aaiEnrichmentUserName;\r
-\r
-    protected String aaiEnrichmentUserPassword;\r
-\r
-    protected Boolean aaiEnrichmentIgnoreSSLCertificateErrors;\r
-\r
-    protected String aaiVNFEnrichmentAPIPath;\r
-\r
-    protected String aaiVMEnrichmentAPIPath;\r
-\r
-\r
-    // A&AI Enrichment Proxy\r
-\r
-    protected String aaiEnrichmentProxyURL;\r
-\r
-    /**\r
-     * Default constructor to setup default values for TCA App Preferences\r
-     */\r
-    public TCAAppPreferences() {\r
-\r
-        // subscriber defaults\r
-        subscriberPollingInterval = AnalyticsConstants.TCA_DEFAULT_SUBSCRIBER_POLLING_INTERVAL_MS;\r
-\r
-        // publisher defaults\r
-        publisherMaxBatchSize = AnalyticsConstants.TCA_DEFAULT_PUBLISHER_MAX_BATCH_QUEUE_SIZE;\r
-        publisherMaxRecoveryQueueSize = AnalyticsConstants.TCA_DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE;\r
-        publisherPollingInterval = AnalyticsConstants.TCA_DEFAULT_PUBLISHER_POLLING_INTERVAL_MS;\r
-\r
-        enableAlertCEFFormat = AnalyticsConstants.TCA_DEFAULT_ENABLE_CEF_FORMATTED_ALERT;\r
-\r
-        enableAAIEnrichment = AnalyticsConstants.TCA_DEFAULT_ENABLE_AAI_ENRICHMENT;\r
-        aaiEnrichmentIgnoreSSLCertificateErrors =\r
-                AnalyticsConstants.TCA_DEFAULT_AAI_ENRICHMENT_IGNORE_SSL_CERTIFICATE_ERRORS;\r
-        aaiEnrichmentProxyURL = AnalyticsConstants.TCA_DEFAULT_AAI_ENRICHMENT_PROXY_URL;\r
-\r
-    }\r
-\r
-    public String getSubscriberHostName() {\r
-        return subscriberHostName;\r
-    }\r
-\r
-    public Integer getSubscriberHostPort() {\r
-        return subscriberHostPort;\r
-    }\r
-\r
-    public String getSubscriberTopicName() {\r
-        return subscriberTopicName;\r
-    }\r
-\r
-    public String getSubscriberProtocol() {\r
-        return subscriberProtocol;\r
-    }\r
-\r
-    public String getSubscriberUserName() {\r
-        return subscriberUserName;\r
-    }\r
-\r
-    public String getSubscriberUserPassword() {\r
-        return subscriberUserPassword;\r
-    }\r
-\r
-    public String getSubscriberContentType() {\r
-        return subscriberContentType;\r
-    }\r
-\r
-    public String getSubscriberConsumerId() {\r
-        return subscriberConsumerId;\r
-    }\r
-\r
-    public String getSubscriberConsumerGroup() {\r
-        return subscriberConsumerGroup;\r
-    }\r
-\r
-    public Integer getSubscriberTimeoutMS() {\r
-        return subscriberTimeoutMS;\r
-    }\r
-\r
-    public Integer getSubscriberMessageLimit() {\r
-        return subscriberMessageLimit;\r
-    }\r
-\r
-    public Integer getSubscriberPollingInterval() {\r
-        return subscriberPollingInterval;\r
-    }\r
-\r
-    public String getPublisherHostName() {\r
-        return publisherHostName;\r
-    }\r
-\r
-    public Integer getPublisherHostPort() {\r
-        return publisherHostPort;\r
-    }\r
-\r
-    public String getPublisherTopicName() {\r
-        return publisherTopicName;\r
-    }\r
-\r
-    public String getPublisherProtocol() {\r
-        return publisherProtocol;\r
-    }\r
-\r
-    public String getPublisherUserName() {\r
-        return publisherUserName;\r
-    }\r
-\r
-    public String getPublisherUserPassword() {\r
-        return publisherUserPassword;\r
-    }\r
-\r
-    public String getPublisherContentType() {\r
-        return publisherContentType;\r
-    }\r
-\r
-    public Integer getPublisherMaxBatchSize() {\r
-        return publisherMaxBatchSize;\r
-    }\r
-\r
-    public Integer getPublisherMaxRecoveryQueueSize() {\r
-        return publisherMaxRecoveryQueueSize;\r
-    }\r
-\r
-    public Integer getPublisherPollingInterval() {\r
-        return publisherPollingInterval;\r
-    }\r
-\r
-    public Boolean getEnableAlertCEFFormat() {\r
-        return enableAlertCEFFormat;\r
-    }\r
-\r
-\r
-    public void setSubscriberHostName(String subscriberHostName) {\r
-        this.subscriberHostName = subscriberHostName;\r
-    }\r
-\r
-    public void setSubscriberHostPort(Integer subscriberHostPort) {\r
-        this.subscriberHostPort = subscriberHostPort;\r
-    }\r
-\r
-    public void setSubscriberTopicName(String subscriberTopicName) {\r
-        this.subscriberTopicName = subscriberTopicName;\r
-    }\r
-\r
-    public void setSubscriberProtocol(String subscriberProtocol) {\r
-        this.subscriberProtocol = subscriberProtocol;\r
-    }\r
-\r
-    public void setSubscriberUserName(String subscriberUserName) {\r
-        this.subscriberUserName = subscriberUserName;\r
-    }\r
-\r
-    public void setSubscriberUserPassword(String subscriberUserPassword) {\r
-        this.subscriberUserPassword = subscriberUserPassword;\r
-    }\r
-\r
-    public void setPublisherHostName(String publisherHostName) {\r
-        this.publisherHostName = publisherHostName;\r
-    }\r
-\r
-    public void setPublisherHostPort(Integer publisherHostPort) {\r
-        this.publisherHostPort = publisherHostPort;\r
-    }\r
-\r
-    public void setPublisherTopicName(String publisherTopicName) {\r
-        this.publisherTopicName = publisherTopicName;\r
-    }\r
-\r
-    public void setPublisherProtocol(String publisherProtocol) {\r
-        this.publisherProtocol = publisherProtocol;\r
-    }\r
-\r
-    public void setPublisherUserName(String publisherUserName) {\r
-        this.publisherUserName = publisherUserName;\r
-    }\r
-\r
-    public void setPublisherUserPassword(String publisherUserPassword) {\r
-        this.publisherUserPassword = publisherUserPassword;\r
-    }\r
-\r
-    public Boolean getEnableAAIEnrichment() {\r
-        return enableAAIEnrichment;\r
-    }\r
-\r
-    public String getAaiEnrichmentHost() {\r
-        return aaiEnrichmentHost;\r
-    }\r
-\r
-    public Integer getAaiEnrichmentPortNumber() {\r
-        return aaiEnrichmentPortNumber;\r
-    }\r
-\r
-    public String getAaiEnrichmentProtocol() {\r
-        return aaiEnrichmentProtocol;\r
-    }\r
-\r
-    public String getAaiEnrichmentUserName() {\r
-        return aaiEnrichmentUserName;\r
-    }\r
-\r
-    public String getAaiEnrichmentUserPassword() {\r
-        return aaiEnrichmentUserPassword;\r
-    }\r
-\r
-    public Boolean getAaiEnrichmentIgnoreSSLCertificateErrors() {\r
-        return aaiEnrichmentIgnoreSSLCertificateErrors;\r
-    }\r
-\r
-    public String getAaiVNFEnrichmentAPIPath() {\r
-        return aaiVNFEnrichmentAPIPath;\r
-    }\r
-\r
-    public String getAaiVMEnrichmentAPIPath() {\r
-        return aaiVMEnrichmentAPIPath;\r
-    }\r
-\r
-    public String getAaiEnrichmentProxyURL() {\r
-        return aaiEnrichmentProxyURL;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("subscriberHostName", subscriberHostName)\r
-                .add("subscriberHostPort", subscriberHostPort)\r
-                .add("subscriberTopicName", subscriberTopicName)\r
-                .add("subscriberProtocol", subscriberProtocol)\r
-                .add("subscriberUserName", subscriberUserName)\r
-                .add("subscriberContentType", subscriberContentType)\r
-                .add("subscriberConsumerId", subscriberConsumerId)\r
-                .add("subscriberConsumerGroup", subscriberConsumerGroup)\r
-                .add("subscriberTimeoutMS", subscriberTimeoutMS)\r
-                .add("subscriberMessageLimit", subscriberMessageLimit)\r
-                .add("subscriberPollingInterval", subscriberPollingInterval)\r
-                .add("publisherHostName", publisherHostName)\r
-                .add("publisherHostPort", publisherHostPort)\r
-                .add("publisherTopicName", publisherTopicName)\r
-                .add("publisherProtocol", publisherProtocol)\r
-                .add("publisherUserName", publisherUserName)\r
-                .add("publisherContentType", publisherContentType)\r
-                .add("publisherMaxBatchSize", publisherMaxBatchSize)\r
-                .add("publisherMaxRecoveryQueueSize", publisherMaxRecoveryQueueSize)\r
-                .add("publisherPollingInterval", publisherPollingInterval)\r
-                .add("enableAlertCEFFormat", enableAlertCEFFormat)\r
-                .add("enableAAIEnrichment", enableAAIEnrichment)\r
-                .add("aaiEnrichmentHost", aaiEnrichmentHost)\r
-                .add("aaiEnrichmentPortNumber", aaiEnrichmentPortNumber)\r
-                .add("aaiEnrichmentProtocol", aaiEnrichmentProtocol)\r
-                .add("aaiEnrichmentUserName", aaiEnrichmentUserName)\r
-                .add("aaiEnrichmentIgnoreSSLCertificateErrors", aaiEnrichmentIgnoreSSLCertificateErrors)\r
-                .add("aaiVNFEnrichmentAPIPath", aaiVNFEnrichmentAPIPath)\r
-                .add("aaiVMEnrichmentAPIPath", aaiVMEnrichmentAPIPath)\r
-                .add("aaiEnrichmentProxyEnabled", aaiEnrichmentProxyURL == null ? "false" : "true")\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPAppPreferences;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+/**
+ * <p>
+ *     App Preferences for Analytics TCA (Threshold Crossing Alert) App
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/4/2016.
+ */
+public class TCAAppPreferences implements CDAPAppPreferences {
+
+    private static final long serialVersionUID = 1L;
+
+    // subscriber preferences
+    protected String subscriberHostName;
+
+    protected Integer subscriberHostPort;
+
+    protected String subscriberTopicName;
+
+    protected String subscriberProtocol;
+
+    protected String subscriberUserName;
+
+    protected String subscriberUserPassword;
+
+    protected String subscriberContentType;
+
+    protected String subscriberConsumerId;
+
+    protected String subscriberConsumerGroup;
+
+    protected Integer subscriberTimeoutMS;
+
+    protected Integer subscriberMessageLimit;
+
+    protected Integer subscriberPollingInterval;
+
+    // publisher preferences
+    protected String publisherHostName;
+
+    protected Integer publisherHostPort;
+
+    protected String publisherTopicName;
+
+    protected String publisherProtocol;
+
+    protected String publisherUserName;
+
+    protected String publisherUserPassword;
+
+    protected String publisherContentType;
+
+    protected Integer publisherMaxBatchSize;
+
+    protected Integer publisherMaxRecoveryQueueSize;
+
+    protected Integer publisherPollingInterval;
+
+    protected Boolean enableAlertCEFFormat;
+
+
+    // A&AI Enrichment
+
+    protected Boolean enableAAIEnrichment;
+
+    protected String aaiEnrichmentHost;
+
+    protected Integer aaiEnrichmentPortNumber;
+
+    protected String aaiEnrichmentProtocol;
+
+    protected String aaiEnrichmentUserName;
+
+    protected String aaiEnrichmentUserPassword;
+
+    protected Boolean aaiEnrichmentIgnoreSSLCertificateErrors;
+
+    protected String aaiVNFEnrichmentAPIPath;
+
+    protected String aaiVMEnrichmentAPIPath;
+
+
+    // A&AI Enrichment Proxy
+
+    protected String aaiEnrichmentProxyURL;
+
+    /**
+     * Default constructor to setup default values for TCA App Preferences
+     */
+    public TCAAppPreferences() {
+
+        // subscriber defaults
+        subscriberPollingInterval = AnalyticsConstants.TCA_DEFAULT_SUBSCRIBER_POLLING_INTERVAL_MS;
+
+        // publisher defaults
+        publisherMaxBatchSize = AnalyticsConstants.TCA_DEFAULT_PUBLISHER_MAX_BATCH_QUEUE_SIZE;
+        publisherMaxRecoveryQueueSize = AnalyticsConstants.TCA_DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE;
+        publisherPollingInterval = AnalyticsConstants.TCA_DEFAULT_PUBLISHER_POLLING_INTERVAL_MS;
+
+        enableAlertCEFFormat = AnalyticsConstants.TCA_DEFAULT_ENABLE_CEF_FORMATTED_ALERT;
+
+        enableAAIEnrichment = AnalyticsConstants.TCA_DEFAULT_ENABLE_AAI_ENRICHMENT;
+        aaiEnrichmentIgnoreSSLCertificateErrors =
+                AnalyticsConstants.TCA_DEFAULT_AAI_ENRICHMENT_IGNORE_SSL_CERTIFICATE_ERRORS;
+        aaiEnrichmentProxyURL = AnalyticsConstants.TCA_DEFAULT_AAI_ENRICHMENT_PROXY_URL;
+
+    }
+
+    public String getSubscriberHostName() {
+        return subscriberHostName;
+    }
+
+    public Integer getSubscriberHostPort() {
+        return subscriberHostPort;
+    }
+
+    public String getSubscriberTopicName() {
+        return subscriberTopicName;
+    }
+
+    public String getSubscriberProtocol() {
+        return subscriberProtocol;
+    }
+
+    public String getSubscriberUserName() {
+        return subscriberUserName;
+    }
+
+    public String getSubscriberUserPassword() {
+        return subscriberUserPassword;
+    }
+
+    public String getSubscriberContentType() {
+        return subscriberContentType;
+    }
+
+    public String getSubscriberConsumerId() {
+        return subscriberConsumerId;
+    }
+
+    public String getSubscriberConsumerGroup() {
+        return subscriberConsumerGroup;
+    }
+
+    public Integer getSubscriberTimeoutMS() {
+        return subscriberTimeoutMS;
+    }
+
+    public Integer getSubscriberMessageLimit() {
+        return subscriberMessageLimit;
+    }
+
+    public Integer getSubscriberPollingInterval() {
+        return subscriberPollingInterval;
+    }
+
+    public String getPublisherHostName() {
+        return publisherHostName;
+    }
+
+    public Integer getPublisherHostPort() {
+        return publisherHostPort;
+    }
+
+    public String getPublisherTopicName() {
+        return publisherTopicName;
+    }
+
+    public String getPublisherProtocol() {
+        return publisherProtocol;
+    }
+
+    public String getPublisherUserName() {
+        return publisherUserName;
+    }
+
+    public String getPublisherUserPassword() {
+        return publisherUserPassword;
+    }
+
+    public String getPublisherContentType() {
+        return publisherContentType;
+    }
+
+    public Integer getPublisherMaxBatchSize() {
+        return publisherMaxBatchSize;
+    }
+
+    public Integer getPublisherMaxRecoveryQueueSize() {
+        return publisherMaxRecoveryQueueSize;
+    }
+
+    public Integer getPublisherPollingInterval() {
+        return publisherPollingInterval;
+    }
+
+    public Boolean getEnableAlertCEFFormat() {
+        return enableAlertCEFFormat;
+    }
+
+
+    public void setSubscriberHostName(String subscriberHostName) {
+        this.subscriberHostName = subscriberHostName;
+    }
+
+    public void setSubscriberHostPort(Integer subscriberHostPort) {
+        this.subscriberHostPort = subscriberHostPort;
+    }
+
+    public void setSubscriberTopicName(String subscriberTopicName) {
+        this.subscriberTopicName = subscriberTopicName;
+    }
+
+    public void setSubscriberProtocol(String subscriberProtocol) {
+        this.subscriberProtocol = subscriberProtocol;
+    }
+
+    public void setSubscriberUserName(String subscriberUserName) {
+        this.subscriberUserName = subscriberUserName;
+    }
+
+    public void setSubscriberUserPassword(String subscriberUserPassword) {
+        this.subscriberUserPassword = subscriberUserPassword;
+    }
+
+    public void setPublisherHostName(String publisherHostName) {
+        this.publisherHostName = publisherHostName;
+    }
+
+    public void setPublisherHostPort(Integer publisherHostPort) {
+        this.publisherHostPort = publisherHostPort;
+    }
+
+    public void setPublisherTopicName(String publisherTopicName) {
+        this.publisherTopicName = publisherTopicName;
+    }
+
+    public void setPublisherProtocol(String publisherProtocol) {
+        this.publisherProtocol = publisherProtocol;
+    }
+
+    public void setPublisherUserName(String publisherUserName) {
+        this.publisherUserName = publisherUserName;
+    }
+
+    public void setPublisherUserPassword(String publisherUserPassword) {
+        this.publisherUserPassword = publisherUserPassword;
+    }
+
+    public Boolean getEnableAAIEnrichment() {
+        return enableAAIEnrichment;
+    }
+
+    public String getAaiEnrichmentHost() {
+        return aaiEnrichmentHost;
+    }
+
+    public Integer getAaiEnrichmentPortNumber() {
+        return aaiEnrichmentPortNumber;
+    }
+
+    public String getAaiEnrichmentProtocol() {
+        return aaiEnrichmentProtocol;
+    }
+
+    public String getAaiEnrichmentUserName() {
+        return aaiEnrichmentUserName;
+    }
+
+    public String getAaiEnrichmentUserPassword() {
+        return aaiEnrichmentUserPassword;
+    }
+
+    public Boolean getAaiEnrichmentIgnoreSSLCertificateErrors() {
+        return aaiEnrichmentIgnoreSSLCertificateErrors;
+    }
+
+    public String getAaiVNFEnrichmentAPIPath() {
+        return aaiVNFEnrichmentAPIPath;
+    }
+
+    public String getAaiVMEnrichmentAPIPath() {
+        return aaiVMEnrichmentAPIPath;
+    }
+
+    public String getAaiEnrichmentProxyURL() {
+        return aaiEnrichmentProxyURL;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("subscriberHostName", subscriberHostName)
+                .add("subscriberHostPort", subscriberHostPort)
+                .add("subscriberTopicName", subscriberTopicName)
+                .add("subscriberProtocol", subscriberProtocol)
+                .add("subscriberUserName", subscriberUserName)
+                .add("subscriberContentType", subscriberContentType)
+                .add("subscriberConsumerId", subscriberConsumerId)
+                .add("subscriberConsumerGroup", subscriberConsumerGroup)
+                .add("subscriberTimeoutMS", subscriberTimeoutMS)
+                .add("subscriberMessageLimit", subscriberMessageLimit)
+                .add("subscriberPollingInterval", subscriberPollingInterval)
+                .add("publisherHostName", publisherHostName)
+                .add("publisherHostPort", publisherHostPort)
+                .add("publisherTopicName", publisherTopicName)
+                .add("publisherProtocol", publisherProtocol)
+                .add("publisherUserName", publisherUserName)
+                .add("publisherContentType", publisherContentType)
+                .add("publisherMaxBatchSize", publisherMaxBatchSize)
+                .add("publisherMaxRecoveryQueueSize", publisherMaxRecoveryQueueSize)
+                .add("publisherPollingInterval", publisherPollingInterval)
+                .add("enableAlertCEFFormat", enableAlertCEFFormat)
+                .add("enableAAIEnrichment", enableAAIEnrichment)
+                .add("aaiEnrichmentHost", aaiEnrichmentHost)
+                .add("aaiEnrichmentPortNumber", aaiEnrichmentPortNumber)
+                .add("aaiEnrichmentProtocol", aaiEnrichmentProtocol)
+                .add("aaiEnrichmentUserName", aaiEnrichmentUserName)
+                .add("aaiEnrichmentIgnoreSSLCertificateErrors", aaiEnrichmentIgnoreSSLCertificateErrors)
+                .add("aaiVNFEnrichmentAPIPath", aaiVNFEnrichmentAPIPath)
+                .add("aaiVMEnrichmentAPIPath", aaiVMEnrichmentAPIPath)
+                .add("aaiEnrichmentProxyEnabled", aaiEnrichmentProxyURL == null ? "false" : "true")
+                .toString();
+    }
+}
@@ -1,36 +1,36 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-\r
-/**\r
- * A wrapper over {@link TCAPolicy} to act as app Preferences as TCA Policy is passed\r
- * by controller as runtime arguments from CDAP app preferences\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 11/29/2016.\r
- */\r
-public class TCAPolicyPreferences extends TCAPolicy implements CDAPAppPreferences {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPAppPreferences;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+
+/**
+ * A wrapper over {@link TCAPolicy} to act as app Preferences as TCA Policy is passed
+ * by controller as runtime arguments from CDAP app preferences
+ * <p>
+ * @author Rajiv Singla . Creation Date: 11/29/2016.
+ */
+public class TCAPolicyPreferences extends TCAPolicy implements CDAPAppPreferences {
+
+    private static final long serialVersionUID = 1L;
+
+}
@@ -1,97 +1,97 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.utils;\r
-\r
-import com.google.common.base.Function;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;\r
-\r
-\r
-/**\r
- * Function which translates {@link TCAAppPreferences} to {@link DMaaPMRPublisherConfig}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 11/17/2016.\r
- */\r
-public class AppPreferencesToPublisherConfigMapper implements Function<TCAAppPreferences, DMaaPMRPublisherConfig> {\r
-\r
-    /**\r
-     * Factory method to convert {@link TCAAppPreferences} to {@link DMaaPMRPublisherConfig} object\r
-     *\r
-     * @param tcaAppPreferences tca App Preferences\r
-     *\r
-     * @return publisher config object\r
-     */\r
-    public static DMaaPMRPublisherConfig map(final TCAAppPreferences tcaAppPreferences) {\r
-        return new AppPreferencesToPublisherConfigMapper().apply(tcaAppPreferences);\r
-    }\r
-\r
-    /**\r
-     * Implementation to convert {@link TCAAppPreferences} to {@link DMaaPMRPublisherConfig} object\r
-     *\r
-     * @param tcaAppPreferences tca App Preferences\r
-     *\r
-     * @return publisher config object\r
-     */\r
-    @Nonnull\r
-    @Override\r
-    public DMaaPMRPublisherConfig apply(@Nonnull TCAAppPreferences tcaAppPreferences) {\r
-\r
-        // Create a new publisher settings builder\r
-        final DMaaPMRPublisherConfig.Builder publisherConfigBuilder = new DMaaPMRPublisherConfig.Builder(\r
-                tcaAppPreferences.getPublisherHostName(), tcaAppPreferences.getPublisherTopicName());\r
-\r
-        // Setup up any optional publisher parameters if they are present\r
-        final Integer publisherHostPort = tcaAppPreferences.getPublisherHostPort();\r
-        if (publisherHostPort != null) {\r
-            publisherConfigBuilder.setPortNumber(publisherHostPort);\r
-        }\r
-        final String publisherProtocol = tcaAppPreferences.getPublisherProtocol();\r
-        if (isPresent(publisherProtocol)) {\r
-            publisherConfigBuilder.setProtocol(publisherProtocol);\r
-        }\r
-        final String publisherUserName = tcaAppPreferences.getPublisherUserName();\r
-        if (isPresent(publisherUserName)) {\r
-            publisherConfigBuilder.setUserName(publisherUserName);\r
-        }\r
-        final String publisherUserPassword = tcaAppPreferences.getPublisherUserPassword();\r
-        if (isPresent(publisherUserPassword)) {\r
-            publisherConfigBuilder.setUserPassword(publisherUserPassword);\r
-        }\r
-        final String publisherContentType = tcaAppPreferences.getPublisherContentType();\r
-        if (isPresent(publisherContentType)) {\r
-            publisherConfigBuilder.setContentType(publisherContentType);\r
-        }\r
-        final Integer publisherMaxBatchSize = tcaAppPreferences.getPublisherMaxBatchSize();\r
-        if (publisherMaxBatchSize != null) {\r
-            publisherConfigBuilder.setMaxBatchSize(publisherMaxBatchSize);\r
-        }\r
-        final Integer publisherMaxRecoveryQueueSize = tcaAppPreferences.getPublisherMaxRecoveryQueueSize();\r
-        if (publisherMaxRecoveryQueueSize != null) {\r
-            publisherConfigBuilder.setMaxRecoveryQueueSize(publisherMaxRecoveryQueueSize);\r
-        }\r
-\r
-        return publisherConfigBuilder.build();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.utils;
+
+import com.google.common.base.Function;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+
+import javax.annotation.Nonnull;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;
+
+
+/**
+ * Function which translates {@link TCAAppPreferences} to {@link DMaaPMRPublisherConfig}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 11/17/2016.
+ */
+public class AppPreferencesToPublisherConfigMapper implements Function<TCAAppPreferences, DMaaPMRPublisherConfig> {
+
+    /**
+     * Factory method to convert {@link TCAAppPreferences} to {@link DMaaPMRPublisherConfig} object
+     *
+     * @param tcaAppPreferences tca App Preferences
+     *
+     * @return publisher config object
+     */
+    public static DMaaPMRPublisherConfig map(final TCAAppPreferences tcaAppPreferences) {
+        return new AppPreferencesToPublisherConfigMapper().apply(tcaAppPreferences);
+    }
+
+    /**
+     * Implementation to convert {@link TCAAppPreferences} to {@link DMaaPMRPublisherConfig} object
+     *
+     * @param tcaAppPreferences tca App Preferences
+     *
+     * @return publisher config object
+     */
+    @Nonnull
+    @Override
+    public DMaaPMRPublisherConfig apply(@Nonnull TCAAppPreferences tcaAppPreferences) {
+
+        // Create a new publisher settings builder
+        final DMaaPMRPublisherConfig.Builder publisherConfigBuilder = new DMaaPMRPublisherConfig.Builder(
+                tcaAppPreferences.getPublisherHostName(), tcaAppPreferences.getPublisherTopicName());
+
+        // Setup up any optional publisher parameters if they are present
+        final Integer publisherHostPort = tcaAppPreferences.getPublisherHostPort();
+        if (publisherHostPort != null) {
+            publisherConfigBuilder.setPortNumber(publisherHostPort);
+        }
+        final String publisherProtocol = tcaAppPreferences.getPublisherProtocol();
+        if (isPresent(publisherProtocol)) {
+            publisherConfigBuilder.setProtocol(publisherProtocol);
+        }
+        final String publisherUserName = tcaAppPreferences.getPublisherUserName();
+        if (isPresent(publisherUserName)) {
+            publisherConfigBuilder.setUserName(publisherUserName);
+        }
+        final String publisherUserPassword = tcaAppPreferences.getPublisherUserPassword();
+        if (isPresent(publisherUserPassword)) {
+            publisherConfigBuilder.setUserPassword(publisherUserPassword);
+        }
+        final String publisherContentType = tcaAppPreferences.getPublisherContentType();
+        if (isPresent(publisherContentType)) {
+            publisherConfigBuilder.setContentType(publisherContentType);
+        }
+        final Integer publisherMaxBatchSize = tcaAppPreferences.getPublisherMaxBatchSize();
+        if (publisherMaxBatchSize != null) {
+            publisherConfigBuilder.setMaxBatchSize(publisherMaxBatchSize);
+        }
+        final Integer publisherMaxRecoveryQueueSize = tcaAppPreferences.getPublisherMaxRecoveryQueueSize();
+        if (publisherMaxRecoveryQueueSize != null) {
+            publisherConfigBuilder.setMaxRecoveryQueueSize(publisherMaxRecoveryQueueSize);
+        }
+
+        return publisherConfigBuilder.build();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.utils;\r
-\r
-import com.google.common.base.Function;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;\r
-\r
-\r
-/**\r
- * Function which translates {@link TCAAppPreferences} to {@link DMaaPMRSubscriberConfig}\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/17/2016.\r
- */\r
-public class AppPreferencesToSubscriberConfigMapper implements Function<TCAAppPreferences, DMaaPMRSubscriberConfig> {\r
-\r
-    /**\r
-     * Factory Method to converts {@link TCAAppPreferences} to {@link DMaaPMRSubscriberConfig} object\r
-     *\r
-     * @param tcaAppPreferences tca app preferences\r
-     * @return DMaaP Subscriber Config\r
-     */\r
-    public static DMaaPMRSubscriberConfig map(final TCAAppPreferences tcaAppPreferences) {\r
-        return new AppPreferencesToSubscriberConfigMapper().apply(tcaAppPreferences);\r
-    }\r
-\r
-    /**\r
-     * Implementation to convert {@link TCAAppPreferences} to {@link DMaaPMRSubscriberConfig} object\r
-     *\r
-     * @param tcaAppPreferences tca app preferences\r
-     *\r
-     * @return DMaaP Subscriber Config\r
-     */\r
-    @Nonnull\r
-    @Override\r
-    public DMaaPMRSubscriberConfig apply(@Nonnull TCAAppPreferences tcaAppPreferences) {\r
-\r
-        // Create a new subscriber settings builder\r
-        final DMaaPMRSubscriberConfig.Builder subscriberConfigBuilder = new DMaaPMRSubscriberConfig.Builder(\r
-                tcaAppPreferences.getSubscriberHostName(), tcaAppPreferences.getSubscriberTopicName());\r
-\r
-        // Setup up any optional subscriber parameters if they are present\r
-        final Integer subscriberHostPortNumber = tcaAppPreferences.getSubscriberHostPort();\r
-        if (subscriberHostPortNumber != null) {\r
-            subscriberConfigBuilder.setPortNumber(subscriberHostPortNumber);\r
-        }\r
-\r
-        final String subscriberProtocol = tcaAppPreferences.getSubscriberProtocol();\r
-        if (isPresent(subscriberProtocol)) {\r
-            subscriberConfigBuilder.setProtocol(subscriberProtocol);\r
-        }\r
-\r
-        final String subscriberUserName = tcaAppPreferences.getSubscriberUserName();\r
-        if (isPresent(subscriberUserName)) {\r
-            subscriberConfigBuilder.setUserName(subscriberUserName);\r
-        }\r
-\r
-        final String subscriberUserPassword = tcaAppPreferences.getSubscriberUserPassword();\r
-        if (isPresent(subscriberUserPassword)) {\r
-            subscriberConfigBuilder.setUserPassword(subscriberUserPassword);\r
-        }\r
-\r
-        final String subscriberContentType = tcaAppPreferences.getSubscriberContentType();\r
-        if (isPresent(subscriberContentType)) {\r
-            subscriberConfigBuilder.setContentType(subscriberContentType);\r
-        }\r
-\r
-        final String subscriberConsumerId = tcaAppPreferences.getSubscriberConsumerId();\r
-        if (isPresent(subscriberConsumerId)) {\r
-            subscriberConfigBuilder.setConsumerId(subscriberConsumerId);\r
-        }\r
-\r
-        final String subscriberConsumerGroup = tcaAppPreferences.getSubscriberConsumerGroup();\r
-        if (isPresent(subscriberConsumerGroup)) {\r
-            subscriberConfigBuilder.setConsumerGroup(subscriberConsumerGroup);\r
-        }\r
-\r
-        final Integer subscriberTimeoutMS = tcaAppPreferences.getSubscriberTimeoutMS();\r
-        if (subscriberTimeoutMS != null) {\r
-            subscriberConfigBuilder.setTimeoutMS(subscriberTimeoutMS);\r
-        }\r
-        final Integer subscriberMessageLimit = tcaAppPreferences.getSubscriberMessageLimit();\r
-        if (subscriberMessageLimit != null) {\r
-            subscriberConfigBuilder.setMessageLimit(subscriberMessageLimit);\r
-        }\r
-\r
-        // return Subscriber settings\r
-        return subscriberConfigBuilder.build();\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.utils;
+
+import com.google.common.base.Function;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+
+import javax.annotation.Nonnull;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isPresent;
+
+
+/**
+ * Function which translates {@link TCAAppPreferences} to {@link DMaaPMRSubscriberConfig}
+ *
+ * @author Rajiv Singla . Creation Date: 11/17/2016.
+ */
+public class AppPreferencesToSubscriberConfigMapper implements Function<TCAAppPreferences, DMaaPMRSubscriberConfig> {
+
+    /**
+     * Factory Method to converts {@link TCAAppPreferences} to {@link DMaaPMRSubscriberConfig} object
+     *
+     * @param tcaAppPreferences tca app preferences
+     * @return DMaaP Subscriber Config
+     */
+    public static DMaaPMRSubscriberConfig map(final TCAAppPreferences tcaAppPreferences) {
+        return new AppPreferencesToSubscriberConfigMapper().apply(tcaAppPreferences);
+    }
+
+    /**
+     * Implementation to convert {@link TCAAppPreferences} to {@link DMaaPMRSubscriberConfig} object
+     *
+     * @param tcaAppPreferences tca app preferences
+     *
+     * @return DMaaP Subscriber Config
+     */
+    @Nonnull
+    @Override
+    public DMaaPMRSubscriberConfig apply(@Nonnull TCAAppPreferences tcaAppPreferences) {
+
+        // Create a new subscriber settings builder
+        final DMaaPMRSubscriberConfig.Builder subscriberConfigBuilder = new DMaaPMRSubscriberConfig.Builder(
+                tcaAppPreferences.getSubscriberHostName(), tcaAppPreferences.getSubscriberTopicName());
+
+        // Setup up any optional subscriber parameters if they are present
+        final Integer subscriberHostPortNumber = tcaAppPreferences.getSubscriberHostPort();
+        if (subscriberHostPortNumber != null) {
+            subscriberConfigBuilder.setPortNumber(subscriberHostPortNumber);
+        }
+
+        final String subscriberProtocol = tcaAppPreferences.getSubscriberProtocol();
+        if (isPresent(subscriberProtocol)) {
+            subscriberConfigBuilder.setProtocol(subscriberProtocol);
+        }
+
+        final String subscriberUserName = tcaAppPreferences.getSubscriberUserName();
+        if (isPresent(subscriberUserName)) {
+            subscriberConfigBuilder.setUserName(subscriberUserName);
+        }
+
+        final String subscriberUserPassword = tcaAppPreferences.getSubscriberUserPassword();
+        if (isPresent(subscriberUserPassword)) {
+            subscriberConfigBuilder.setUserPassword(subscriberUserPassword);
+        }
+
+        final String subscriberContentType = tcaAppPreferences.getSubscriberContentType();
+        if (isPresent(subscriberContentType)) {
+            subscriberConfigBuilder.setContentType(subscriberContentType);
+        }
+
+        final String subscriberConsumerId = tcaAppPreferences.getSubscriberConsumerId();
+        if (isPresent(subscriberConsumerId)) {
+            subscriberConfigBuilder.setConsumerId(subscriberConsumerId);
+        }
+
+        final String subscriberConsumerGroup = tcaAppPreferences.getSubscriberConsumerGroup();
+        if (isPresent(subscriberConsumerGroup)) {
+            subscriberConfigBuilder.setConsumerGroup(subscriberConsumerGroup);
+        }
+
+        final Integer subscriberTimeoutMS = tcaAppPreferences.getSubscriberTimeoutMS();
+        if (subscriberTimeoutMS != null) {
+            subscriberConfigBuilder.setTimeoutMS(subscriberTimeoutMS);
+        }
+        final Integer subscriberMessageLimit = tcaAppPreferences.getSubscriberMessageLimit();
+        if (subscriberMessageLimit != null) {
+            subscriberConfigBuilder.setMessageLimit(subscriberMessageLimit);
+        }
+
+        // return Subscriber settings
+        return subscriberConfigBuilder.build();
+
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.utils;\r
-\r
-import co.cask.cdap.api.RuntimeContext;\r
-import com.google.common.base.Function;\r
-import com.google.common.collect.Lists;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;\r
-import org.openecomp.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfigBuilder;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.validator.TCAPolicyPreferencesValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.validator.TCAPreferencesValidator;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAHandleIn;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAHandleOut;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.net.MalformedURLException;\r
-import java.net.URL;\r
-import java.util.Collection;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.TreeMap;\r
-\r
-import static com.google.common.collect.Lists.newArrayList;\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.validateSettings;\r
-import static org.openecomp.dcae.apod.analytics.common.AnalyticsConstants.TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH;\r
-\r
-/**\r
- * Utility Helper methods for CDAP TCA sub module.\r
- *\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public abstract class CDAPTCAUtils extends TCAUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(CDAPTCAUtils.class);\r
-\r
-    /**\r
-     * Function that extracts alert message string from {@link TCAVESAlertEntity}\r
-     */\r
-    public static final Function<TCAVESAlertEntity, String> MAP_ALERT_ENTITY_TO_ALERT_STRING_FUNCTION =\r
-            new Function<TCAVESAlertEntity, String>() {\r
-                @Override\r
-                public String apply(TCAVESAlertEntity alertEntity) {\r
-                    return alertEntity == null ? null : alertEntity.getAlertMessage();\r
-                }\r
-            };\r
-\r
-\r
-    /**\r
-     * Parses and validates Runtime Arguments to {@link TCAAppPreferences} object\r
-     *\r
-     * @param runtimeContext Runtime Context\r
-     *\r
-     * @return validated runtime arguments as {@link TCAAppPreferences} object\r
-     */\r
-    public static TCAAppPreferences getValidatedTCAAppPreferences(final RuntimeContext runtimeContext) {\r
-        // Parse runtime arguments\r
-        final Map<String, String> runtimeArguments = runtimeContext.getRuntimeArguments();\r
-        final TCAAppPreferences tcaAppPreferences =\r
-                ANALYTICS_MODEL_OBJECT_MAPPER.convertValue(runtimeArguments, TCAAppPreferences.class);\r
-\r
-        final String appConfigString = runtimeContext.getApplicationSpecification().getConfiguration();\r
-\r
-        // populate DMaaP Information from App Config String\r
-        populateDMaaPInfoFromAppConfiguration(appConfigString, tcaAppPreferences);\r
-\r
-        // Validate runtime arguments\r
-        validateSettings(tcaAppPreferences, new TCAPreferencesValidator());\r
-\r
-        return tcaAppPreferences;\r
-    }\r
-\r
-    /**\r
-     * Creates an A&AI Http Client config from give {@link TCAAppPreferences}\r
-     *\r
-     * @param tcaAppPreferences TCA App Preferences\r
-     *\r
-     * @return A&AI Http Client config\r
-     */\r
-    public static AAIHttpClientConfig createAAIEnrichmentClientConfig(final TCAAppPreferences tcaAppPreferences) {\r
-        final String aaiEnrichmentProxyURLString = tcaAppPreferences.getAaiEnrichmentProxyURL();\r
-        URL aaiEnrichmentProxyURL = null;\r
-        if (StringUtils.isNotBlank(aaiEnrichmentProxyURLString)) {\r
-            aaiEnrichmentProxyURL = parseURL(aaiEnrichmentProxyURLString);\r
-        }\r
-\r
-        return new AAIHttpClientConfigBuilder(tcaAppPreferences.getAaiEnrichmentHost())\r
-                .setAaiProtocol(tcaAppPreferences.getAaiEnrichmentProtocol())\r
-                .setAaiHostPortNumber(tcaAppPreferences.getAaiEnrichmentPortNumber())\r
-                .setAaiUserName(tcaAppPreferences.getAaiEnrichmentUserName())\r
-                .setAaiUserPassword(tcaAppPreferences.getAaiEnrichmentUserPassword())\r
-                .setAaiProxyURL(aaiEnrichmentProxyURL)\r
-                .setAaiIgnoreSSLCertificateErrors(tcaAppPreferences.getAaiEnrichmentIgnoreSSLCertificateErrors())\r
-                .build();\r
-    }\r
-\r
-    /**\r
-     * Populated App Preferences DMaaP Information from Application Config String\r
-     *\r
-     * @param appConfigString  CDAP Application config String\r
-     * @param tcaAppPreferences TCA App Preferences\r
-     */\r
-    private static void populateDMaaPInfoFromAppConfiguration(final String appConfigString,\r
-                                                              final TCAAppPreferences tcaAppPreferences) {\r
-\r
-        if (null != tcaAppPreferences.getSubscriberHostName() || null != tcaAppPreferences.getPublisherHostName()) {\r
-            LOG.info("DMaaP Information is set from runtime preferences. Skipping getting DMaaP info from App Config");\r
-            return;\r
-        }\r
-\r
-        LOG.info("Fetching DMaaP information from App Configuration String: {}", appConfigString);\r
-\r
-        try {\r
-            final TCAControllerAppConfig tcaControllerAppConfig =\r
-                    readValue(appConfigString, TCAControllerAppConfig.class);\r
-\r
-            // Parse Subscriber DMaaP information from App Config String\r
-            if (tcaControllerAppConfig.getStreamsSubscribes() != null &&\r
-                    tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn() != null &&\r
-                    tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn().getDmaapInfo() != null) {\r
-\r
-                final DMAAPInfo subscriberDmaapInfo =\r
-                        tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn().getDmaapInfo();\r
-                LOG.debug("App Config Subscriber Host URL: {}", subscriberDmaapInfo.getTopicUrl());\r
-                final URL subscriberUrl = parseURL(subscriberDmaapInfo.getTopicUrl());\r
-                tcaAppPreferences.setSubscriberProtocol(subscriberUrl.getProtocol());\r
-                tcaAppPreferences.setSubscriberHostName(subscriberUrl.getHost());\r
-                final int subscriberUrlPort = subscriberUrl.getPort() != -1 ?\r
-                        subscriberUrl.getPort() : getDefaultDMaaPPort(subscriberUrl.getProtocol());\r
-                tcaAppPreferences.setSubscriberHostPort(subscriberUrlPort);\r
-                tcaAppPreferences.setSubscriberTopicName(subscriberUrl.getPath().substring(8));\r
-\r
-                final TCAHandleIn tcaHandleIn = tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn();\r
-                tcaAppPreferences.setSubscriberUserName(tcaHandleIn.getAafUserName());\r
-                tcaAppPreferences.setSubscriberUserPassword(tcaHandleIn.getAafPassword());\r
-            } else {\r
-                LOG.warn("Unable to populate Subscriber DMaaP Information from App Config String: {}", appConfigString);\r
-            }\r
-\r
-\r
-            // Parse Publisher DMaaP information from App Config String\r
-            if (tcaControllerAppConfig.getStreamsPublishes() != null &&\r
-                    tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut() != null &&\r
-                    tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut().getDmaapInfo() != null) {\r
-\r
-                final DMAAPInfo publisherDmaapInfo =\r
-                        tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut().getDmaapInfo();\r
-                LOG.debug("App Config Publisher Host URL: {}", publisherDmaapInfo.getTopicUrl());\r
-                final URL publisherUrl = parseURL(publisherDmaapInfo.getTopicUrl());\r
-                tcaAppPreferences.setPublisherProtocol(publisherUrl.getProtocol());\r
-                tcaAppPreferences.setPublisherHostName(publisherUrl.getHost());\r
-                final int publisherUrlPort = publisherUrl.getPort() != -1 ?\r
-                        publisherUrl.getPort() : getDefaultDMaaPPort(publisherUrl.getProtocol());\r
-                tcaAppPreferences.setPublisherHostPort(publisherUrlPort);\r
-                tcaAppPreferences.setPublisherTopicName(publisherUrl.getPath().substring(8));\r
-\r
-                final TCAHandleOut tcaHandleOut = tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut();\r
-                tcaAppPreferences.setPublisherUserName(tcaHandleOut.getAafUserName());\r
-                tcaAppPreferences.setPublisherUserPassword(tcaHandleOut.getAafPassword());\r
-            } else {\r
-                LOG.warn("Unable to populate Publisher DMaaP Information from App Config String: {}", appConfigString);\r
-            }\r
-\r
-\r
-        } catch (IOException e) {\r
-            throw new CDAPSettingsException(\r
-                    "Unable to parse App Config to Json Object.Invalid App Config String: " + appConfigString, LOG, e);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Parses provided DMaaP MR URL string to {@link URL} object\r
-     *\r
-     * @param urlString url string\r
-     *\r
-     * @return url object\r
-     */\r
-    private static URL parseURL(final String urlString) {\r
-        try {\r
-            return new URL(urlString);\r
-        } catch (MalformedURLException e) {\r
-            final String errorMessage = String.format("Invalid URL format: %s", urlString);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Sets up default DMaaP Port if not provided with DMaaP URL\r
-     *\r
-     * @param protocol protocol e.g. http or https\r
-     *\r
-     * @return default DMaaP MR port number\r
-     */\r
-    private static int getDefaultDMaaPPort(final String protocol) {\r
-        if ("http".equals(protocol)) {\r
-            return 3904;\r
-        } else if ("https".equals(protocol)) {\r
-            return 3905;\r
-        } else {\r
-            return 80;\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Extracts alert message strings from {@link TCAVESAlertEntity}\r
-     *\r
-     * @param alertEntities collection of alert entities\r
-     *\r
-     * @return List of alert message strings\r
-     */\r
-    public static List<String> extractAlertFromAlertEntities(final Collection<TCAVESAlertEntity> alertEntities) {\r
-        return Lists.transform(newArrayList(alertEntities), MAP_ALERT_ENTITY_TO_ALERT_STRING_FUNCTION);\r
-    }\r
-\r
-\r
-    /**\r
-     * Converts Runtime Arguments to {@link TCAPolicyPreferences} object\r
-     *\r
-     * @param runtimeContext CDAP Runtime Arguments\r
-     *\r
-     * @return TCA Policy Preferences\r
-     */\r
-    public static TCAPolicy getValidatedTCAPolicyPreferences(final RuntimeContext runtimeContext) {\r
-\r
-        final Map<String, String> runtimeArguments = runtimeContext.getRuntimeArguments();\r
-        final TreeMap<String, String> sortedRuntimeArguments = new TreeMap<>(runtimeArguments);\r
-\r
-        LOG.debug("Printing all Received Runtime Arguments:");\r
-        for (Map.Entry<String, String> runtimeArgsEntry : sortedRuntimeArguments.entrySet()) {\r
-            LOG.debug("{}:{}", runtimeArgsEntry.getKey(), runtimeArgsEntry.getValue());\r
-        }\r
-\r
-        TCAPolicyPreferences tcaPolicyPreferences = new TCAPolicyPreferences();\r
-\r
-        final String tcaPolicyJsonString = sortedRuntimeArguments.get(AnalyticsConstants.TCA_POLICY_JSON_KEY);\r
-\r
-        if (StringUtils.isNotBlank(tcaPolicyJsonString)) {\r
-\r
-            LOG.info("TcaPolicy will be set from input argument name: {} as JSON String with value: {}",\r
-                    AnalyticsConstants.TCA_POLICY_JSON_KEY, tcaPolicyJsonString);\r
-\r
-            // initialize unquotedTCAPolicy\r
-            String unquotedTCAPolicy = tcaPolicyJsonString.trim();\r
-\r
-            //remove starting and ending quote from passed tca policy Json string if present\r
-            if (tcaPolicyJsonString.trim().startsWith(AnalyticsConstants.TCA_POLICY_STRING_DELIMITER) &&\r
-                    tcaPolicyJsonString.trim().endsWith(AnalyticsConstants.TCA_POLICY_STRING_DELIMITER)) {\r
-                unquotedTCAPolicy = tcaPolicyJsonString.trim().substring(1, tcaPolicyJsonString.trim().length() - 1);\r
-            }\r
-\r
-            try {\r
-                tcaPolicyPreferences = readValue(unquotedTCAPolicy , TCAPolicyPreferences.class);\r
-            } catch (IOException e) {\r
-                throw new CDAPSettingsException(\r
-                        "Input tca_policy string format is not correct. tca_policy: " + tcaPolicyJsonString, LOG, e);\r
-            }\r
-\r
-        } else {  // classical controller is being used.  Validate preferences as received from classical controller\r
-\r
-            LOG.info("TcaPolicy is being parsed as key value pair from classical controller");\r
-\r
-            // extract TCA Policy Domain from Runtime Arguments\r
-            final String policyDomain = sortedRuntimeArguments.get(AnalyticsConstants.TCA_POLICY_DOMAIN_PATH);\r
-\r
-            // create new TCA Policy object\r
-            tcaPolicyPreferences.setDomain(policyDomain);\r
-\r
-            // filter out other non relevant fields which are not related to tca policy\r
-            final Map<String, String> tcaPolicyMap = filterMapByKeyNamePrefix(sortedRuntimeArguments,\r
-                    TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH);\r
-\r
-            // determine functional Roles\r
-            final Map<String, Map<String, String>> functionalRolesMap =\r
-                    extractSubTree(tcaPolicyMap, 2, 3, AnalyticsConstants.TCA_POLICY_DELIMITER);\r
-\r
-            // create metrics per functional role list\r
-            tcaPolicyPreferences.setMetricsPerEventName(\r
-                    createTCAPolicyMetricsPerEventNameList(functionalRolesMap));\r
-\r
-        }\r
-\r
-        // validate tca Policy Preferences\r
-        validateSettings(tcaPolicyPreferences, new TCAPolicyPreferencesValidator());\r
-\r
-        LOG.info("Printing Effective TCA Policy: {}", tcaPolicyPreferences);\r
-\r
-        return tcaPolicyPreferences;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.utils;
+
+import co.cask.cdap.api.RuntimeContext;
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfig;
+import org.onap.dcae.apod.analytics.aai.domain.config.AAIHttpClientConfigBuilder;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.validator.TCAPolicyPreferencesValidator;
+import org.onap.dcae.apod.analytics.cdap.tca.validator.TCAPreferencesValidator;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAHandleIn;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAHandleOut;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import static com.google.common.collect.Lists.newArrayList;
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.validateSettings;
+import static org.onap.dcae.apod.analytics.common.AnalyticsConstants.TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH;
+
+/**
+ * Utility Helper methods for CDAP TCA sub module.
+ *
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public abstract class CDAPTCAUtils extends TCAUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(CDAPTCAUtils.class);
+
+    /**
+     * Function that extracts alert message string from {@link TCAVESAlertEntity}
+     */
+    public static final Function<TCAVESAlertEntity, String> MAP_ALERT_ENTITY_TO_ALERT_STRING_FUNCTION =
+            new Function<TCAVESAlertEntity, String>() {
+                @Override
+                public String apply(TCAVESAlertEntity alertEntity) {
+                    return alertEntity == null ? null : alertEntity.getAlertMessage();
+                }
+            };
+
+
+    /**
+     * Parses and validates Runtime Arguments to {@link TCAAppPreferences} object
+     *
+     * @param runtimeContext Runtime Context
+     *
+     * @return validated runtime arguments as {@link TCAAppPreferences} object
+     */
+    public static TCAAppPreferences getValidatedTCAAppPreferences(final RuntimeContext runtimeContext) {
+        // Parse runtime arguments
+        final Map<String, String> runtimeArguments = runtimeContext.getRuntimeArguments();
+        final TCAAppPreferences tcaAppPreferences =
+                ANALYTICS_MODEL_OBJECT_MAPPER.convertValue(runtimeArguments, TCAAppPreferences.class);
+
+        final String appConfigString = runtimeContext.getApplicationSpecification().getConfiguration();
+
+        // populate DMaaP Information from App Config String
+        populateDMaaPInfoFromAppConfiguration(appConfigString, tcaAppPreferences);
+
+        // Validate runtime arguments
+        validateSettings(tcaAppPreferences, new TCAPreferencesValidator());
+
+        return tcaAppPreferences;
+    }
+
+    /**
+     * Creates an A&AI Http Client config from give {@link TCAAppPreferences}
+     *
+     * @param tcaAppPreferences TCA App Preferences
+     *
+     * @return A&AI Http Client config
+     */
+    public static AAIHttpClientConfig createAAIEnrichmentClientConfig(final TCAAppPreferences tcaAppPreferences) {
+        final String aaiEnrichmentProxyURLString = tcaAppPreferences.getAaiEnrichmentProxyURL();
+        URL aaiEnrichmentProxyURL = null;
+        if (StringUtils.isNotBlank(aaiEnrichmentProxyURLString)) {
+            aaiEnrichmentProxyURL = parseURL(aaiEnrichmentProxyURLString);
+        }
+
+        return new AAIHttpClientConfigBuilder(tcaAppPreferences.getAaiEnrichmentHost())
+                .setAaiProtocol(tcaAppPreferences.getAaiEnrichmentProtocol())
+                .setAaiHostPortNumber(tcaAppPreferences.getAaiEnrichmentPortNumber())
+                .setAaiUserName(tcaAppPreferences.getAaiEnrichmentUserName())
+                .setAaiUserPassword(tcaAppPreferences.getAaiEnrichmentUserPassword())
+                .setAaiProxyURL(aaiEnrichmentProxyURL)
+                .setAaiIgnoreSSLCertificateErrors(tcaAppPreferences.getAaiEnrichmentIgnoreSSLCertificateErrors())
+                .build();
+    }
+
+    /**
+     * Populated App Preferences DMaaP Information from Application Config String
+     *
+     * @param appConfigString  CDAP Application config String
+     * @param tcaAppPreferences TCA App Preferences
+     */
+    private static void populateDMaaPInfoFromAppConfiguration(final String appConfigString,
+                                                              final TCAAppPreferences tcaAppPreferences) {
+
+        if (null != tcaAppPreferences.getSubscriberHostName() || null != tcaAppPreferences.getPublisherHostName()) {
+            LOG.info("DMaaP Information is set from runtime preferences. Skipping getting DMaaP info from App Config");
+            return;
+        }
+
+        LOG.info("Fetching DMaaP information from App Configuration String: {}", appConfigString);
+
+        try {
+            final TCAControllerAppConfig tcaControllerAppConfig =
+                    readValue(appConfigString, TCAControllerAppConfig.class);
+
+            // Parse Subscriber DMaaP information from App Config String
+            if (tcaControllerAppConfig.getStreamsSubscribes() != null &&
+                    tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn() != null &&
+                    tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn().getDmaapInfo() != null) {
+
+                final DMAAPInfo subscriberDmaapInfo =
+                        tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn().getDmaapInfo();
+                LOG.debug("App Config Subscriber Host URL: {}", subscriberDmaapInfo.getTopicUrl());
+                final URL subscriberUrl = parseURL(subscriberDmaapInfo.getTopicUrl());
+                tcaAppPreferences.setSubscriberProtocol(subscriberUrl.getProtocol());
+                tcaAppPreferences.setSubscriberHostName(subscriberUrl.getHost());
+                final int subscriberUrlPort = subscriberUrl.getPort() != -1 ?
+                        subscriberUrl.getPort() : getDefaultDMaaPPort(subscriberUrl.getProtocol());
+                tcaAppPreferences.setSubscriberHostPort(subscriberUrlPort);
+                tcaAppPreferences.setSubscriberTopicName(subscriberUrl.getPath().substring(8));
+
+                final TCAHandleIn tcaHandleIn = tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn();
+                tcaAppPreferences.setSubscriberUserName(tcaHandleIn.getAafUserName());
+                tcaAppPreferences.setSubscriberUserPassword(tcaHandleIn.getAafPassword());
+            } else {
+                LOG.warn("Unable to populate Subscriber DMaaP Information from App Config String: {}", appConfigString);
+            }
+
+
+            // Parse Publisher DMaaP information from App Config String
+            if (tcaControllerAppConfig.getStreamsPublishes() != null &&
+                    tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut() != null &&
+                    tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut().getDmaapInfo() != null) {
+
+                final DMAAPInfo publisherDmaapInfo =
+                        tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut().getDmaapInfo();
+                LOG.debug("App Config Publisher Host URL: {}", publisherDmaapInfo.getTopicUrl());
+                final URL publisherUrl = parseURL(publisherDmaapInfo.getTopicUrl());
+                tcaAppPreferences.setPublisherProtocol(publisherUrl.getProtocol());
+                tcaAppPreferences.setPublisherHostName(publisherUrl.getHost());
+                final int publisherUrlPort = publisherUrl.getPort() != -1 ?
+                        publisherUrl.getPort() : getDefaultDMaaPPort(publisherUrl.getProtocol());
+                tcaAppPreferences.setPublisherHostPort(publisherUrlPort);
+                tcaAppPreferences.setPublisherTopicName(publisherUrl.getPath().substring(8));
+
+                final TCAHandleOut tcaHandleOut = tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut();
+                tcaAppPreferences.setPublisherUserName(tcaHandleOut.getAafUserName());
+                tcaAppPreferences.setPublisherUserPassword(tcaHandleOut.getAafPassword());
+            } else {
+                LOG.warn("Unable to populate Publisher DMaaP Information from App Config String: {}", appConfigString);
+            }
+
+
+        } catch (IOException e) {
+            throw new CDAPSettingsException(
+                    "Unable to parse App Config to Json Object.Invalid App Config String: " + appConfigString, LOG, e);
+        }
+    }
+
+    /**
+     * Parses provided DMaaP MR URL string to {@link URL} object
+     *
+     * @param urlString url string
+     *
+     * @return url object
+     */
+    private static URL parseURL(final String urlString) {
+        try {
+            return new URL(urlString);
+        } catch (MalformedURLException e) {
+            final String errorMessage = String.format("Invalid URL format: %s", urlString);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+    }
+
+    /**
+     * Sets up default DMaaP Port if not provided with DMaaP URL
+     *
+     * @param protocol protocol e.g. http or https
+     *
+     * @return default DMaaP MR port number
+     */
+    private static int getDefaultDMaaPPort(final String protocol) {
+        if ("http".equals(protocol)) {
+            return 3904;
+        } else if ("https".equals(protocol)) {
+            return 3905;
+        } else {
+            return 80;
+        }
+    }
+
+
+    /**
+     * Extracts alert message strings from {@link TCAVESAlertEntity}
+     *
+     * @param alertEntities collection of alert entities
+     *
+     * @return List of alert message strings
+     */
+    public static List<String> extractAlertFromAlertEntities(final Collection<TCAVESAlertEntity> alertEntities) {
+        return Lists.transform(newArrayList(alertEntities), MAP_ALERT_ENTITY_TO_ALERT_STRING_FUNCTION);
+    }
+
+
+    /**
+     * Converts Runtime Arguments to {@link TCAPolicyPreferences} object
+     *
+     * @param runtimeContext CDAP Runtime Arguments
+     *
+     * @return TCA Policy Preferences
+     */
+    public static TCAPolicy getValidatedTCAPolicyPreferences(final RuntimeContext runtimeContext) {
+
+        final Map<String, String> runtimeArguments = runtimeContext.getRuntimeArguments();
+        final TreeMap<String, String> sortedRuntimeArguments = new TreeMap<>(runtimeArguments);
+
+        LOG.debug("Printing all Received Runtime Arguments:");
+        for (Map.Entry<String, String> runtimeArgsEntry : sortedRuntimeArguments.entrySet()) {
+            LOG.debug("{}:{}", runtimeArgsEntry.getKey(), runtimeArgsEntry.getValue());
+        }
+
+        TCAPolicyPreferences tcaPolicyPreferences = new TCAPolicyPreferences();
+
+        final String tcaPolicyJsonString = sortedRuntimeArguments.get(AnalyticsConstants.TCA_POLICY_JSON_KEY);
+
+        if (StringUtils.isNotBlank(tcaPolicyJsonString)) {
+
+            LOG.info("TcaPolicy will be set from input argument name: {} as JSON String with value: {}",
+                    AnalyticsConstants.TCA_POLICY_JSON_KEY, tcaPolicyJsonString);
+
+            // initialize unquotedTCAPolicy
+            String unquotedTCAPolicy = tcaPolicyJsonString.trim();
+
+            //remove starting and ending quote from passed tca policy Json string if present
+            if (tcaPolicyJsonString.trim().startsWith(AnalyticsConstants.TCA_POLICY_STRING_DELIMITER) &&
+                    tcaPolicyJsonString.trim().endsWith(AnalyticsConstants.TCA_POLICY_STRING_DELIMITER)) {
+                unquotedTCAPolicy = tcaPolicyJsonString.trim().substring(1, tcaPolicyJsonString.trim().length() - 1);
+            }
+
+            try {
+                tcaPolicyPreferences = readValue(unquotedTCAPolicy , TCAPolicyPreferences.class);
+            } catch (IOException e) {
+                throw new CDAPSettingsException(
+                        "Input tca_policy string format is not correct. tca_policy: " + tcaPolicyJsonString, LOG, e);
+            }
+
+        } else {  // classical controller is being used.  Validate preferences as received from classical controller
+
+            LOG.info("TcaPolicy is being parsed as key value pair from classical controller");
+
+            // extract TCA Policy Domain from Runtime Arguments
+            final String policyDomain = sortedRuntimeArguments.get(AnalyticsConstants.TCA_POLICY_DOMAIN_PATH);
+
+            // create new TCA Policy object
+            tcaPolicyPreferences.setDomain(policyDomain);
+
+            // filter out other non relevant fields which are not related to tca policy
+            final Map<String, String> tcaPolicyMap = filterMapByKeyNamePrefix(sortedRuntimeArguments,
+                    TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH);
+
+            // determine functional Roles
+            final Map<String, Map<String, String>> functionalRolesMap =
+                    extractSubTree(tcaPolicyMap, 2, 3, AnalyticsConstants.TCA_POLICY_DELIMITER);
+
+            // create metrics per functional role list
+            tcaPolicyPreferences.setMetricsPerEventName(
+                    createTCAPolicyMetricsPerEventNameList(functionalRolesMap));
+
+        }
+
+        // validate tca Policy Preferences
+        validateSettings(tcaPolicyPreferences, new TCAPolicyPreferencesValidator());
+
+        LOG.info("Printing Effective TCA Policy: {}", tcaPolicyPreferences);
+
+        return tcaPolicyPreferences;
+    }
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.validator;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;\r
-\r
-/**\r
- *  <p>\r
- *      TCA App Config Validator validates any TCA App Config parameter values\r
- *  </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public class TCAAppConfigValidator implements CDAPAppSettingsValidator<TCAAppConfig,\r
-        GenericValidationResponse<TCAAppConfig>> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public GenericValidationResponse<TCAAppConfig> validateAppSettings(TCAAppConfig tcaAppConfig) {\r
-\r
-        final GenericValidationResponse<TCAAppConfig> validationResponse = new GenericValidationResponse<>();\r
-\r
-        if (isEmpty(tcaAppConfig.getTcaSubscriberOutputStreamName())) {\r
-            validationResponse.addErrorMessage("tcaSubscriberOutputStreamName",\r
-                    "tcaSubscriberOutputStreamName must be present");\r
-        }\r
-\r
-        if (isEmpty(tcaAppConfig.getTcaVESMessageStatusTableName())) {\r
-            validationResponse.addErrorMessage("tcaVESMessageStatusTableName",\r
-                    "tcaVESMessageStatusTableName must be present");\r
-        }\r
-        if (isEmpty(tcaAppConfig.getTcaVESAlertsTableName())) {\r
-            validationResponse.addErrorMessage("tcaVESAlertsTableName",\r
-                    "tcaVESAlertsTableName must be present");\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.validator;
+
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;
+
+/**
+ *  <p>
+ *      TCA App Config Validator validates any TCA App Config parameter values
+ *  </p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public class TCAAppConfigValidator implements CDAPAppSettingsValidator<TCAAppConfig,
+        GenericValidationResponse<TCAAppConfig>> {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public GenericValidationResponse<TCAAppConfig> validateAppSettings(TCAAppConfig tcaAppConfig) {
+
+        final GenericValidationResponse<TCAAppConfig> validationResponse = new GenericValidationResponse<>();
+
+        if (isEmpty(tcaAppConfig.getTcaSubscriberOutputStreamName())) {
+            validationResponse.addErrorMessage("tcaSubscriberOutputStreamName",
+                    "tcaSubscriberOutputStreamName must be present");
+        }
+
+        if (isEmpty(tcaAppConfig.getTcaVESMessageStatusTableName())) {
+            validationResponse.addErrorMessage("tcaVESMessageStatusTableName",
+                    "tcaVESMessageStatusTableName must be present");
+        }
+        if (isEmpty(tcaAppConfig.getTcaVESAlertsTableName())) {
+            validationResponse.addErrorMessage("tcaVESAlertsTableName",
+                    "tcaVESAlertsTableName must be present");
+        }
+
+        return validationResponse;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.validator;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;\r
-\r
-/**\r
- * Validates TCA Policy Preferences\r
- * <p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/29/2016.\r
- */\r
-public class TCAPolicyPreferencesValidator implements CDAPAppSettingsValidator<TCAPolicyPreferences,\r
-        GenericValidationResponse<TCAPolicyPreferences>> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public GenericValidationResponse<TCAPolicyPreferences> validateAppSettings(\r
-            final TCAPolicyPreferences tcaPolicyPreferences) {\r
-\r
-        final GenericValidationResponse<TCAPolicyPreferences> validationResponse = new GenericValidationResponse<>();\r
-\r
-        // validate TCA Policy must domain present\r
-        final String domain = tcaPolicyPreferences.getDomain();\r
-        if (isEmpty(domain)) {\r
-            validationResponse.addErrorMessage("domain", "TCA Policy must have only one domain present");\r
-        }\r
-\r
-        // validate TCA Policy must have at least one event name\r
-        final List<String> policyEventNames = TCAUtils.getPolicyEventNames(tcaPolicyPreferences);\r
-        if (policyEventNames.isEmpty()) {\r
-            validationResponse.addErrorMessage("metricsPerEventNames",\r
-                    "TCA Policy must have at least one or more event names");\r
-        }\r
-\r
-        final List<MetricsPerEventName> metricsPerEventNames =\r
-                tcaPolicyPreferences.getMetricsPerEventName();\r
-\r
-        // validate Metrics Per Event Name\r
-        for (MetricsPerEventName metricsPerEventName : metricsPerEventNames) {\r
-\r
-            // event name must be present\r
-            final String eventName = metricsPerEventName.getEventName();\r
-            if (isEmpty(eventName)) {\r
-                validationResponse.addErrorMessage("eventName",\r
-                        "TCA Policy eventName is not present for metricsPerEventName:" + metricsPerEventName);\r
-            }\r
-\r
-            // control Loop Schema type must be present\r
-            final ControlLoopSchemaType controlLoopSchemaType = metricsPerEventName.getControlLoopSchemaType();\r
-            if (controlLoopSchemaType == null) {\r
-                validationResponse.addErrorMessage("controlLoopEventType",\r
-                        "TCA Policy controlLoopSchemaType is not present for metricsPerEventName:"\r
-                                + metricsPerEventName);\r
-            }\r
-\r
-            // must have at least 1 threshold defined\r
-            if (metricsPerEventName.getThresholds() == null || metricsPerEventName.getThresholds().isEmpty()) {\r
-                validationResponse.addErrorMessage("thresholds",\r
-                        "TCA Policy event Name must have at least one threshold. " +\r
-                                "Event Name causing this validation error:" + metricsPerEventName);\r
-            } else {\r
-                // validate each threshold must have non null - fieldPath, thresholdValue, direction and severity\r
-                final List<Threshold> eventNameThresholds = metricsPerEventName.getThresholds();\r
-                for (Threshold eventNameThreshold : eventNameThresholds) {\r
-                    final String fieldPath = eventNameThreshold.getFieldPath();\r
-                    final Long thresholdValue = eventNameThreshold.getThresholdValue();\r
-                    final Direction direction = eventNameThreshold.getDirection();\r
-                    final EventSeverity severity = eventNameThreshold.getSeverity();\r
-                    final ClosedLoopEventStatus closedLoopEventStatus = eventNameThreshold.getClosedLoopEventStatus();\r
-                    if (isEmpty(fieldPath) || thresholdValue == null || direction == null || severity == null ||\r
-                            closedLoopEventStatus == null) {\r
-                        validationResponse.addErrorMessage("threshold",\r
-                                "TCA Policy threshold must have fieldPath,thresholdValue,direction, " +\r
-                                        "closedLoopEventStatus and severity defined." +\r
-                                        "Threshold causing this validation error:" + eventNameThreshold);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.validator;
+
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;
+
+/**
+ * Validates TCA Policy Preferences
+ * <p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/29/2016.
+ */
+public class TCAPolicyPreferencesValidator implements CDAPAppSettingsValidator<TCAPolicyPreferences,
+        GenericValidationResponse<TCAPolicyPreferences>> {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public GenericValidationResponse<TCAPolicyPreferences> validateAppSettings(
+            final TCAPolicyPreferences tcaPolicyPreferences) {
+
+        final GenericValidationResponse<TCAPolicyPreferences> validationResponse = new GenericValidationResponse<>();
+
+        // validate TCA Policy must domain present
+        final String domain = tcaPolicyPreferences.getDomain();
+        if (isEmpty(domain)) {
+            validationResponse.addErrorMessage("domain", "TCA Policy must have only one domain present");
+        }
+
+        // validate TCA Policy must have at least one event name
+        final List<String> policyEventNames = TCAUtils.getPolicyEventNames(tcaPolicyPreferences);
+        if (policyEventNames.isEmpty()) {
+            validationResponse.addErrorMessage("metricsPerEventNames",
+                    "TCA Policy must have at least one or more event names");
+        }
+
+        final List<MetricsPerEventName> metricsPerEventNames =
+                tcaPolicyPreferences.getMetricsPerEventName();
+
+        // validate Metrics Per Event Name
+        for (MetricsPerEventName metricsPerEventName : metricsPerEventNames) {
+
+            // event name must be present
+            final String eventName = metricsPerEventName.getEventName();
+            if (isEmpty(eventName)) {
+                validationResponse.addErrorMessage("eventName",
+                        "TCA Policy eventName is not present for metricsPerEventName:" + metricsPerEventName);
+            }
+
+            // control Loop Schema type must be present
+            final ControlLoopSchemaType controlLoopSchemaType = metricsPerEventName.getControlLoopSchemaType();
+            if (controlLoopSchemaType == null) {
+                validationResponse.addErrorMessage("controlLoopEventType",
+                        "TCA Policy controlLoopSchemaType is not present for metricsPerEventName:"
+                                + metricsPerEventName);
+            }
+
+            // must have at least 1 threshold defined
+            if (metricsPerEventName.getThresholds() == null || metricsPerEventName.getThresholds().isEmpty()) {
+                validationResponse.addErrorMessage("thresholds",
+                        "TCA Policy event Name must have at least one threshold. " +
+                                "Event Name causing this validation error:" + metricsPerEventName);
+            } else {
+                // validate each threshold must have non null - fieldPath, thresholdValue, direction and severity
+                final List<Threshold> eventNameThresholds = metricsPerEventName.getThresholds();
+                for (Threshold eventNameThreshold : eventNameThresholds) {
+                    final String fieldPath = eventNameThreshold.getFieldPath();
+                    final Long thresholdValue = eventNameThreshold.getThresholdValue();
+                    final Direction direction = eventNameThreshold.getDirection();
+                    final EventSeverity severity = eventNameThreshold.getSeverity();
+                    final ClosedLoopEventStatus closedLoopEventStatus = eventNameThreshold.getClosedLoopEventStatus();
+                    if (isEmpty(fieldPath) || thresholdValue == null || direction == null || severity == null ||
+                            closedLoopEventStatus == null) {
+                        validationResponse.addErrorMessage("threshold",
+                                "TCA Policy threshold must have fieldPath,thresholdValue,direction, " +
+                                        "closedLoopEventStatus and severity defined." +
+                                        "Threshold causing this validation error:" + eventNameThreshold);
+                    }
+                }
+            }
+        }
+        return validationResponse;
+    }
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.validator;\r
-\r
-import org.openecomp.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class TCAPreferencesValidator implements CDAPAppSettingsValidator<TCAAppPreferences,\r
-        GenericValidationResponse<TCAAppPreferences>> {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public GenericValidationResponse<TCAAppPreferences> validateAppSettings(TCAAppPreferences appPreferences) {\r
-\r
-        final GenericValidationResponse<TCAAppPreferences> validationResponse = new GenericValidationResponse<>();\r
-\r
-        // subscriber validations\r
-        final String subscriberHostName = appPreferences.getSubscriberHostName();\r
-        if (isEmpty(subscriberHostName)) {\r
-            validationResponse.addErrorMessage("subscriberHostName", "Subscriber host name must be present");\r
-        }\r
-        final String subscriberTopicName = appPreferences.getSubscriberTopicName();\r
-        if (isEmpty(subscriberTopicName)) {\r
-            validationResponse.addErrorMessage("subscriberTopicName", "Subscriber topic name must be present");\r
-        }\r
-\r
-        // publisher validations\r
-        final String publisherHostName = appPreferences.getPublisherHostName();\r
-        if (isEmpty(publisherHostName)) {\r
-            validationResponse.addErrorMessage("publisherHostName", "Publisher host name must be present");\r
-        }\r
-        final String publisherTopicName = appPreferences.getPublisherTopicName();\r
-        if (isEmpty(publisherTopicName)) {\r
-            validationResponse.addErrorMessage("publisherTopicName", "Publisher topic name must be present");\r
-        }\r
-\r
-        final Boolean enableAAIEnrichment = appPreferences.getEnableAAIEnrichment();\r
-\r
-        // if aai enrichment is enabled then do some aai validations\r
-        if (enableAAIEnrichment) {\r
-            final String aaiEnrichmentHost = appPreferences.getAaiEnrichmentHost();\r
-            if (isEmpty(aaiEnrichmentHost)) {\r
-                validationResponse.addErrorMessage("aaiEnrichmentHost", "AAI Enrichment Host must be present");\r
-            }\r
-            final String aaiVMEnrichmentAPIPath = appPreferences.getAaiVMEnrichmentAPIPath();\r
-            if (isEmpty(aaiVMEnrichmentAPIPath)) {\r
-                validationResponse.addErrorMessage("aaiVMEnrichmentAPIPath", "AAI VM Enrichment path must be present");\r
-            }\r
-            final String aaiVNFEnrichmentAPIPath = appPreferences.getAaiVNFEnrichmentAPIPath();\r
-            if (isEmpty(aaiVNFEnrichmentAPIPath)) {\r
-                validationResponse.addErrorMessage("aaiVNFEnrichmentAPIPath", "AAI VNF Enrichment path must be " +\r
-                        "present");\r
-            }\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.validator;
+
+import org.onap.dcae.apod.analytics.cdap.common.validation.CDAPAppSettingsValidator;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.onap.dcae.apod.analytics.cdap.common.utils.ValidationUtils.isEmpty;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class TCAPreferencesValidator implements CDAPAppSettingsValidator<TCAAppPreferences,
+        GenericValidationResponse<TCAAppPreferences>> {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public GenericValidationResponse<TCAAppPreferences> validateAppSettings(TCAAppPreferences appPreferences) {
+
+        final GenericValidationResponse<TCAAppPreferences> validationResponse = new GenericValidationResponse<>();
+
+        // subscriber validations
+        final String subscriberHostName = appPreferences.getSubscriberHostName();
+        if (isEmpty(subscriberHostName)) {
+            validationResponse.addErrorMessage("subscriberHostName", "Subscriber host name must be present");
+        }
+        final String subscriberTopicName = appPreferences.getSubscriberTopicName();
+        if (isEmpty(subscriberTopicName)) {
+            validationResponse.addErrorMessage("subscriberTopicName", "Subscriber topic name must be present");
+        }
+
+        // publisher validations
+        final String publisherHostName = appPreferences.getPublisherHostName();
+        if (isEmpty(publisherHostName)) {
+            validationResponse.addErrorMessage("publisherHostName", "Publisher host name must be present");
+        }
+        final String publisherTopicName = appPreferences.getPublisherTopicName();
+        if (isEmpty(publisherTopicName)) {
+            validationResponse.addErrorMessage("publisherTopicName", "Publisher topic name must be present");
+        }
+
+        final Boolean enableAAIEnrichment = appPreferences.getEnableAAIEnrichment();
+
+        // if aai enrichment is enabled then do some aai validations
+        if (enableAAIEnrichment) {
+            final String aaiEnrichmentHost = appPreferences.getAaiEnrichmentHost();
+            if (isEmpty(aaiEnrichmentHost)) {
+                validationResponse.addErrorMessage("aaiEnrichmentHost", "AAI Enrichment Host must be present");
+            }
+            final String aaiVMEnrichmentAPIPath = appPreferences.getAaiVMEnrichmentAPIPath();
+            if (isEmpty(aaiVMEnrichmentAPIPath)) {
+                validationResponse.addErrorMessage("aaiVMEnrichmentAPIPath", "AAI VM Enrichment path must be present");
+            }
+            final String aaiVNFEnrichmentAPIPath = appPreferences.getAaiVNFEnrichmentAPIPath();
+            if (isEmpty(aaiVNFEnrichmentAPIPath)) {
+                validationResponse.addErrorMessage("aaiVNFEnrichmentAPIPath", "AAI VNF Enrichment path must be " +
+                        "present");
+            }
+        }
+
+        return validationResponse;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.worker.AbstractWorker;\r
-import com.google.common.base.Preconditions;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.quartz.Scheduler;\r
-import org.quartz.SchedulerException;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.concurrent.atomic.AtomicBoolean;\r
-\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * Base logic for DMaaP Workers which uses scheduler to poll DMaaP MR topics at frequent intervals\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 12/19/2016.\r
- */\r
-public abstract class BaseTCADMaaPMRWorker extends AbstractWorker {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(BaseTCADMaaPMRWorker.class);\r
-\r
-    /**\r
-     * Quartz Scheduler\r
-     */\r
-    protected Scheduler scheduler;\r
-    /**\r
-     * Determines if scheduler is shutdown\r
-     */\r
-    protected AtomicBoolean isSchedulerShutdown;\r
-\r
-\r
-    @Override\r
-    public void run() {\r
-\r
-        Preconditions.checkNotNull(scheduler, "Scheduler must not be null");\r
-        String schedulerName = "";\r
-\r
-        // Start scheduler\r
-        try {\r
-            schedulerName = scheduler.getSchedulerName();\r
-            scheduler.start();\r
-            isSchedulerShutdown.getAndSet(false);\r
-\r
-        } catch (SchedulerException e) {\r
-            final String errorMessage =\r
-                    format("Error while starting TCA DMaaP MR scheduler name: %s, error: %s", schedulerName, e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-        LOG.info("Successfully started DMaaP MR Scheduler: {}", schedulerName);\r
-\r
-        // indefinite loop which wakes up and confirms scheduler is indeed running\r
-        while (!isSchedulerShutdown.get()) {\r
-            try {\r
-\r
-                Thread.sleep(AnalyticsConstants.TCA_DEFAULT_WORKER_SHUTDOWN_CHECK_INTERVAL_MS);\r
-\r
-            } catch (InterruptedException e) {\r
-\r
-                final String errorMessage =\r
-                        format("Error while checking TCA DMaaP MR Scheduler worker status name: %s, error: %s",\r
-                                schedulerName, e);\r
-                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-            }\r
-        }\r
-\r
-        LOG.info("Finished execution of TCA DMaaP MR worker thread: {}", schedulerName);\r
-\r
-    }\r
-\r
-    @Override\r
-    public void stop() {\r
-\r
-        Preconditions.checkNotNull(scheduler, "Scheduler must not be null");\r
-        String schedulerName = "";\r
-\r
-        // Stop Scheduler\r
-        try {\r
-            schedulerName = scheduler.getSchedulerName();\r
-            LOG.info("Shutting TCA DMaaP MR Scheduler: {}", schedulerName);\r
-            scheduler.shutdown();\r
-            isSchedulerShutdown.getAndSet(true);\r
-\r
-        } catch (SchedulerException e) {\r
-\r
-            final String errorMessage =\r
-                    format("Error while shutting down TCA DMaaP MR Scheduler: name: %s, error: %s", schedulerName, e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.worker.AbstractWorker;
+import com.google.common.base.Preconditions;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static java.lang.String.format;
+
+/**
+ * Base logic for DMaaP Workers which uses scheduler to poll DMaaP MR topics at frequent intervals
+ * <p>
+ * @author Rajiv Singla . Creation Date: 12/19/2016.
+ */
+public abstract class BaseTCADMaaPMRWorker extends AbstractWorker {
+
+    private static final Logger LOG = LoggerFactory.getLogger(BaseTCADMaaPMRWorker.class);
+
+    /**
+     * Quartz Scheduler
+     */
+    protected Scheduler scheduler;
+    /**
+     * Determines if scheduler is shutdown
+     */
+    protected AtomicBoolean isSchedulerShutdown;
+
+
+    @Override
+    public void run() {
+
+        Preconditions.checkNotNull(scheduler, "Scheduler must not be null");
+        String schedulerName = "";
+
+        // Start scheduler
+        try {
+            schedulerName = scheduler.getSchedulerName();
+            scheduler.start();
+            isSchedulerShutdown.getAndSet(false);
+
+        } catch (SchedulerException e) {
+            final String errorMessage =
+                    format("Error while starting TCA DMaaP MR scheduler name: %s, error: %s", schedulerName, e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+        LOG.info("Successfully started DMaaP MR Scheduler: {}", schedulerName);
+
+        // indefinite loop which wakes up and confirms scheduler is indeed running
+        while (!isSchedulerShutdown.get()) {
+            try {
+
+                Thread.sleep(AnalyticsConstants.TCA_DEFAULT_WORKER_SHUTDOWN_CHECK_INTERVAL_MS);
+
+            } catch (InterruptedException e) {
+
+                final String errorMessage =
+                        format("Error while checking TCA DMaaP MR Scheduler worker status name: %s, error: %s",
+                                schedulerName, e);
+                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+            }
+        }
+
+        LOG.info("Finished execution of TCA DMaaP MR worker thread: {}", schedulerName);
+
+    }
+
+    @Override
+    public void stop() {
+
+        Preconditions.checkNotNull(scheduler, "Scheduler must not be null");
+        String schedulerName = "";
+
+        // Stop Scheduler
+        try {
+            schedulerName = scheduler.getSchedulerName();
+            LOG.info("Shutting TCA DMaaP MR Scheduler: {}", schedulerName);
+            scheduler.shutdown();
+            isSchedulerShutdown.getAndSet(true);
+
+        } catch (SchedulerException e) {
+
+            final String errorMessage =
+                    format("Error while shutting down TCA DMaaP MR Scheduler: name: %s, error: %s", schedulerName, e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.TxRunnable;\r
-import co.cask.cdap.api.common.Bytes;\r
-import co.cask.cdap.api.data.DatasetContext;\r
-import co.cask.cdap.api.dataset.lib.CloseableIterator;\r
-import co.cask.cdap.api.dataset.lib.KeyValue;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import com.google.common.base.Joiner;\r
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\r
-import org.apache.tephra.TransactionFailureException;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.quartz.DisallowConcurrentExecution;\r
-import org.quartz.Job;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.JobExecutionContext;\r
-import org.quartz.JobExecutionException;\r
-import org.quartz.PersistJobDataAfterExecution;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Date;\r
-import java.util.LinkedHashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.AnalyticsConstants.CDAP_ALERTS_TABLE_VARIABLE_NAME;\r
-import static org.openecomp.dcae.apod.analytics.common.AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME;\r
-import static org.openecomp.dcae.apod.analytics.common.AnalyticsConstants.DMAAP_PUBLISHER_VARIABLE_NAME;\r
-import static org.openecomp.dcae.apod.analytics.common.AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME;\r
-\r
-/**\r
- * Quartz Job that will monitor any new alert messages in given TCA Alerts table and if any found publish them to\r
- * DMaaP MR topic\r
- *<p>\r
- * @author Rajiv Singla . Creation Date: 11/17/2016.\r
- */\r
-@DisallowConcurrentExecution\r
-@PersistJobDataAfterExecution\r
-@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON")\r
-public class TCADMaaPMRPublisherJob implements Job {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPMRPublisherJob.class);\r
-\r
-    @Override\r
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {\r
-\r
-        LOG.debug("Starting DMaaP MR Topic Publisher fetch Job. Next firing time will be: {}",\r
-                jobExecutionContext.getNextFireTime());\r
-\r
-        // Get Job Data Map\r
-        final JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();\r
-\r
-        // Fetch all Job Params from Job Data Map\r
-        final String cdapAlertsTableName = jobDataMap.getString(CDAP_ALERTS_TABLE_VARIABLE_NAME);\r
-        final WorkerContext workerContext = (WorkerContext) jobDataMap.get(WORKER_CONTEXT_VARIABLE_NAME);\r
-        final DMaaPMRPublisher publisher = (DMaaPMRPublisher) jobDataMap.get(DMAAP_PUBLISHER_VARIABLE_NAME);\r
-        final Metrics metrics = (Metrics) jobDataMap.get(DMAAP_METRICS_VARIABLE_NAME);\r
-\r
-        LOG.debug("Start looking for new message in Alerts Table: {}", cdapAlertsTableName);\r
-\r
-        // Get new alerts from alerts table\r
-        final Map<String, TCAVESAlertEntity> newAlertsMap = getNewAlertsMap(cdapAlertsTableName, workerContext);\r
-\r
-        // If no new alerts are found - nothing to publish\r
-        if (newAlertsMap.isEmpty()) {\r
-            LOG.debug("No new alerts found in Alerts Table name: {}. Nothing to Publisher....", cdapAlertsTableName);\r
-            metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_NO_NEW_ALERTS_LOOKUP_METRIC, 1);\r
-            return;\r
-        }\r
-\r
-        final int newAlertsCount = newAlertsMap.size();\r
-        LOG.debug("Found new alerts in Alerts Table name: {}. No of new alerts: {}", cdapAlertsTableName,\r
-                newAlertsCount);\r
-        metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_NEW_ALERTS_METRIC, newAlertsCount);\r
-\r
-        // Get alert message strings from alert Entities\r
-        final List<String> newAlertsMessages = CDAPTCAUtils.extractAlertFromAlertEntities(newAlertsMap.values());\r
-\r
-        // Publish messages to DMaaP MR Topic\r
-        try {\r
-\r
-            final DMaaPMRPublisherResponse publisherResponse = publisher.publish(newAlertsMessages);\r
-\r
-            final Integer responseCode = publisherResponse.getResponseCode();\r
-            final String responseMessage = publisherResponse.getResponseMessage();\r
-            final int pendingMessagesCount = publisherResponse.getPendingMessagesCount();\r
-\r
-            LOG.debug("Publisher Response Code: {}, Publisher message: {}, Pending Messages Count: {}", responseCode,\r
-                    responseMessage, pendingMessagesCount);\r
-\r
-            if (HTTPUtils.isSuccessfulResponseCode(responseCode)) {\r
-                LOG.debug("Successfully Published alerts to DMaaP MR Topic.");\r
-                metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_SUCCESSFUL_DMAAP_RESPONSE_METRIC, 1);\r
-            } else {\r
-                LOG.warn("Unable to publish alerts to DMaaP MR Topic. Publisher will try to send it later....");\r
-                metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_UNSUCCESSFUL_DMAAP_RESPONSE_METRIC, 1);\r
-            }\r
-\r
-        } catch (DCAEAnalyticsRuntimeException e) {\r
-            LOG.error("Exception while publishing messages to DMaaP MR Topic: {}", e);\r
-        } finally {\r
-            // delete send message from alerts table\r
-            deleteAlertsByKey(cdapAlertsTableName, workerContext, newAlertsMap.keySet(), metrics);\r
-        }\r
-\r
-        LOG.debug("Finished DMaaP MR Topic Publisher fetch Job.");\r
-\r
-    }\r
-\r
-    /**\r
-     * Gets New Messages from alerts table as Map with row keys as keys and {@link TCAVESAlertEntity} as values\r
-     *\r
-     * @param cdapAlertsTableName alerts table name\r
-     * @param workerContext worker context\r
-     * @return Map with row keys as keys and {@link TCAVESAlertEntity} as values\r
-     */\r
-    protected Map<String, TCAVESAlertEntity> getNewAlertsMap(final String cdapAlertsTableName,\r
-                                                           final WorkerContext workerContext) {\r
-        final Map<String, TCAVESAlertEntity> newAlertsMap = new LinkedHashMap<>();\r
-        try {\r
-            workerContext.execute(new TxRunnable() {\r
-                @Override\r
-                public void run(DatasetContext context) throws Exception {\r
-                    final ObjectMappedTable<TCAVESAlertEntity> alertsTable = context.getDataset(cdapAlertsTableName);\r
-                    final Date currentTime = new Date();\r
-                    final String rowKey = TCAVESAlertsPersister.createRowKey(currentTime);\r
-                    final CloseableIterator<KeyValue<byte[], TCAVESAlertEntity>> scan = alertsTable.scan(null, rowKey);\r
-                    while (scan.hasNext()) {\r
-                        final KeyValue<byte[], TCAVESAlertEntity> alertEntityKeyValue = scan.next();\r
-                        newAlertsMap.put(Bytes.toString(alertEntityKeyValue.getKey()), alertEntityKeyValue.getValue());\r
-                    }\r
-                }\r
-            });\r
-        } catch (TransactionFailureException e) {\r
-            final String errorMessage = "Transaction Error while getting new alerts from alerts table: " + e.toString();\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-        return newAlertsMap;\r
-    }\r
-\r
-    /**\r
-     * Deletes rows in Alerts table for give rowKeys\r
-     *\r
-     * @param cdapAlertsTableName CDAP Alerts Table Name\r
-     * @param workerContext Worker Context\r
-     * @param rowKeys Row Key Set\r
-     * @param metrics CDAP metrics\r
-     */\r
-    protected void deleteAlertsByKey(final String cdapAlertsTableName, final WorkerContext workerContext,\r
-                                   final Set<String> rowKeys, final Metrics metrics) {\r
-        LOG.debug("Deleting Published Alerts from alerts table with rowKeys: {}", Joiner.on(",").join(rowKeys));\r
-        try {\r
-            workerContext.execute(new TxRunnable() {\r
-                @Override\r
-                public void run(DatasetContext context) throws Exception {\r
-                    final ObjectMappedTable<TCAVESAlertEntity> alertsTable = context.getDataset(cdapAlertsTableName);\r
-                    for (String rowKey : rowKeys) {\r
-                        alertsTable.delete(rowKey);\r
-                        metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_DELETED_ALERTS_METRIC, 1);\r
-                    }\r
-                }\r
-            });\r
-        } catch (TransactionFailureException e) {\r
-            final String errorMessage =\r
-                    "Transaction Error while deleting published alerts in alerts table: " + e.toString();\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.TxRunnable;
+import co.cask.cdap.api.common.Bytes;
+import co.cask.cdap.api.data.DatasetContext;
+import co.cask.cdap.api.dataset.lib.CloseableIterator;
+import co.cask.cdap.api.dataset.lib.KeyValue;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.metrics.Metrics;
+import co.cask.cdap.api.worker.WorkerContext;
+import com.google.common.base.Joiner;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.apache.tephra.TransactionFailureException;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.common.utils.HTTPUtils;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.quartz.DisallowConcurrentExecution;
+import org.quartz.Job;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.quartz.PersistJobDataAfterExecution;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static org.onap.dcae.apod.analytics.common.AnalyticsConstants.CDAP_ALERTS_TABLE_VARIABLE_NAME;
+import static org.onap.dcae.apod.analytics.common.AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME;
+import static org.onap.dcae.apod.analytics.common.AnalyticsConstants.DMAAP_PUBLISHER_VARIABLE_NAME;
+import static org.onap.dcae.apod.analytics.common.AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME;
+
+/**
+ * Quartz Job that will monitor any new alert messages in given TCA Alerts table and if any found publish them to
+ * DMaaP MR topic
+ *<p>
+ * @author Rajiv Singla . Creation Date: 11/17/2016.
+ */
+@DisallowConcurrentExecution
+@PersistJobDataAfterExecution
+@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON")
+public class TCADMaaPMRPublisherJob implements Job {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPMRPublisherJob.class);
+
+    @Override
+    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+
+        LOG.debug("Starting DMaaP MR Topic Publisher fetch Job. Next firing time will be: {}",
+                jobExecutionContext.getNextFireTime());
+
+        // Get Job Data Map
+        final JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();
+
+        // Fetch all Job Params from Job Data Map
+        final String cdapAlertsTableName = jobDataMap.getString(CDAP_ALERTS_TABLE_VARIABLE_NAME);
+        final WorkerContext workerContext = (WorkerContext) jobDataMap.get(WORKER_CONTEXT_VARIABLE_NAME);
+        final DMaaPMRPublisher publisher = (DMaaPMRPublisher) jobDataMap.get(DMAAP_PUBLISHER_VARIABLE_NAME);
+        final Metrics metrics = (Metrics) jobDataMap.get(DMAAP_METRICS_VARIABLE_NAME);
+
+        LOG.debug("Start looking for new message in Alerts Table: {}", cdapAlertsTableName);
+
+        // Get new alerts from alerts table
+        final Map<String, TCAVESAlertEntity> newAlertsMap = getNewAlertsMap(cdapAlertsTableName, workerContext);
+
+        // If no new alerts are found - nothing to publish
+        if (newAlertsMap.isEmpty()) {
+            LOG.debug("No new alerts found in Alerts Table name: {}. Nothing to Publisher....", cdapAlertsTableName);
+            metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_NO_NEW_ALERTS_LOOKUP_METRIC, 1);
+            return;
+        }
+
+        final int newAlertsCount = newAlertsMap.size();
+        LOG.debug("Found new alerts in Alerts Table name: {}. No of new alerts: {}", cdapAlertsTableName,
+                newAlertsCount);
+        metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_NEW_ALERTS_METRIC, newAlertsCount);
+
+        // Get alert message strings from alert Entities
+        final List<String> newAlertsMessages = CDAPTCAUtils.extractAlertFromAlertEntities(newAlertsMap.values());
+
+        // Publish messages to DMaaP MR Topic
+        try {
+
+            final DMaaPMRPublisherResponse publisherResponse = publisher.publish(newAlertsMessages);
+
+            final Integer responseCode = publisherResponse.getResponseCode();
+            final String responseMessage = publisherResponse.getResponseMessage();
+            final int pendingMessagesCount = publisherResponse.getPendingMessagesCount();
+
+            LOG.debug("Publisher Response Code: {}, Publisher message: {}, Pending Messages Count: {}", responseCode,
+                    responseMessage, pendingMessagesCount);
+
+            if (HTTPUtils.isSuccessfulResponseCode(responseCode)) {
+                LOG.debug("Successfully Published alerts to DMaaP MR Topic.");
+                metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_SUCCESSFUL_DMAAP_RESPONSE_METRIC, 1);
+            } else {
+                LOG.warn("Unable to publish alerts to DMaaP MR Topic. Publisher will try to send it later....");
+                metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_UNSUCCESSFUL_DMAAP_RESPONSE_METRIC, 1);
+            }
+
+        } catch (DCAEAnalyticsRuntimeException e) {
+            LOG.error("Exception while publishing messages to DMaaP MR Topic: {}", e);
+        } finally {
+            // delete send message from alerts table
+            deleteAlertsByKey(cdapAlertsTableName, workerContext, newAlertsMap.keySet(), metrics);
+        }
+
+        LOG.debug("Finished DMaaP MR Topic Publisher fetch Job.");
+
+    }
+
+    /**
+     * Gets New Messages from alerts table as Map with row keys as keys and {@link TCAVESAlertEntity} as values
+     *
+     * @param cdapAlertsTableName alerts table name
+     * @param workerContext worker context
+     * @return Map with row keys as keys and {@link TCAVESAlertEntity} as values
+     */
+    protected Map<String, TCAVESAlertEntity> getNewAlertsMap(final String cdapAlertsTableName,
+                                                           final WorkerContext workerContext) {
+        final Map<String, TCAVESAlertEntity> newAlertsMap = new LinkedHashMap<>();
+        try {
+            workerContext.execute(new TxRunnable() {
+                @Override
+                public void run(DatasetContext context) throws Exception {
+                    final ObjectMappedTable<TCAVESAlertEntity> alertsTable = context.getDataset(cdapAlertsTableName);
+                    final Date currentTime = new Date();
+                    final String rowKey = TCAVESAlertsPersister.createRowKey(currentTime);
+                    final CloseableIterator<KeyValue<byte[], TCAVESAlertEntity>> scan = alertsTable.scan(null, rowKey);
+                    while (scan.hasNext()) {
+                        final KeyValue<byte[], TCAVESAlertEntity> alertEntityKeyValue = scan.next();
+                        newAlertsMap.put(Bytes.toString(alertEntityKeyValue.getKey()), alertEntityKeyValue.getValue());
+                    }
+                }
+            });
+        } catch (TransactionFailureException e) {
+            final String errorMessage = "Transaction Error while getting new alerts from alerts table: " + e.toString();
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+        return newAlertsMap;
+    }
+
+    /**
+     * Deletes rows in Alerts table for give rowKeys
+     *
+     * @param cdapAlertsTableName CDAP Alerts Table Name
+     * @param workerContext Worker Context
+     * @param rowKeys Row Key Set
+     * @param metrics CDAP metrics
+     */
+    protected void deleteAlertsByKey(final String cdapAlertsTableName, final WorkerContext workerContext,
+                                   final Set<String> rowKeys, final Metrics metrics) {
+        LOG.debug("Deleting Published Alerts from alerts table with rowKeys: {}", Joiner.on(",").join(rowKeys));
+        try {
+            workerContext.execute(new TxRunnable() {
+                @Override
+                public void run(DatasetContext context) throws Exception {
+                    final ObjectMappedTable<TCAVESAlertEntity> alertsTable = context.getDataset(cdapAlertsTableName);
+                    for (String rowKey : rowKeys) {
+                        alertsTable.delete(rowKey);
+                        metrics.count(CDAPMetricsConstants.TCA_PUBLISHER_DELETED_ALERTS_METRIC, 1);
+                    }
+                }
+            });
+        } catch (TransactionFailureException e) {
+            final String errorMessage =
+                    "Transaction Error while deleting published alerts in alerts table: " + e.toString();
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import com.google.common.base.Optional;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.utils.DMaaPMRUtils;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.quartz.DisallowConcurrentExecution;\r
-import org.quartz.Job;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.JobExecutionContext;\r
-import org.quartz.JobExecutionException;\r
-import org.quartz.PersistJobDataAfterExecution;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.util.List;\r
-\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * Quartz Job which polls DMaaP MR VES Collector Topic for messages and writes them to\r
- * a given CDAP Stream\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-@DisallowConcurrentExecution\r
-@PersistJobDataAfterExecution\r
-public class TCADMaaPMRSubscriberJob implements Job {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPMRSubscriberJob.class);\r
-\r
-    @Override\r
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {\r
-\r
-        LOG.debug("Starting DMaaP MR Topic Subscriber fetch Job. Next firing time will be: {}",\r
-                jobExecutionContext.getNextFireTime());\r
-\r
-        // Get Job Data Map\r
-        final JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();\r
-\r
-        // Fetch all Job Params from Job Data Map\r
-        final String cdapStreamName = jobDataMap.getString(AnalyticsConstants.CDAP_STREAM_VARIABLE_NAME);\r
-        final WorkerContext workerContext =\r
-                (WorkerContext) jobDataMap.get(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME);\r
-        final DMaaPMRSubscriber subscriber =\r
-                (DMaaPMRSubscriber) jobDataMap.get(AnalyticsConstants.DMAAP_SUBSCRIBER_VARIABLE_NAME);\r
-        final Metrics metrics = (Metrics) jobDataMap.get(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME);\r
-\r
-        final Optional<List<String>> subscriberMessagesOptional =\r
-                DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);\r
-\r
-        // Write message to CDAP Stream using Stream Writer\r
-        if (subscriberMessagesOptional.isPresent()) {\r
-            writeMessageToCDAPStream(subscriberMessagesOptional.get(), cdapStreamName, workerContext, metrics);\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Writes given messages to CDAP Stream\r
-     *\r
-     * @param actualMessages List of messages that need to written to cdap stream\r
-     * @param cdapStreamName cdap stream name\r
-     * @param workerContext cdap worker context\r
-     * @param metrics cdap metrics\r
-     */\r
-    private void writeMessageToCDAPStream(final List<String> actualMessages, final String cdapStreamName,\r
-                                          final WorkerContext workerContext, final Metrics metrics) {\r
-        LOG.debug("Writing message to CDAP Stream: {}, Message Count: {}", cdapStreamName, actualMessages.size());\r
-        try {\r
-\r
-            for (String message : actualMessages) {\r
-                workerContext.write(cdapStreamName, message);\r
-            }\r
-\r
-        } catch (IOException e) {\r
-            metrics.count(CDAPMetricsConstants.TCA_SUBSCRIBER_FAILURE_TO_WRITE_TO_STREAM_METRIC, 1);\r
-            final String errorMessage =\r
-                    format("Error while DMaaP message router subscriber attempting to write to CDAP Stream: %s, " +\r
-                            "Exception: %s", cdapStreamName, e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-        LOG.debug("DMaaP MR Subscriber successfully finished writing messages to CDAP Stream: {}, Message count: {}",\r
-                cdapStreamName, actualMessages.size());\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.metrics.Metrics;
+import co.cask.cdap.api.worker.WorkerContext;
+import com.google.common.base.Optional;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.utils.DMaaPMRUtils;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.quartz.DisallowConcurrentExecution;
+import org.quartz.Job;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.quartz.PersistJobDataAfterExecution;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.List;
+
+import static java.lang.String.format;
+
+/**
+ * Quartz Job which polls DMaaP MR VES Collector Topic for messages and writes them to
+ * a given CDAP Stream
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+@DisallowConcurrentExecution
+@PersistJobDataAfterExecution
+public class TCADMaaPMRSubscriberJob implements Job {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPMRSubscriberJob.class);
+
+    @Override
+    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+
+        LOG.debug("Starting DMaaP MR Topic Subscriber fetch Job. Next firing time will be: {}",
+                jobExecutionContext.getNextFireTime());
+
+        // Get Job Data Map
+        final JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();
+
+        // Fetch all Job Params from Job Data Map
+        final String cdapStreamName = jobDataMap.getString(AnalyticsConstants.CDAP_STREAM_VARIABLE_NAME);
+        final WorkerContext workerContext =
+                (WorkerContext) jobDataMap.get(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME);
+        final DMaaPMRSubscriber subscriber =
+                (DMaaPMRSubscriber) jobDataMap.get(AnalyticsConstants.DMAAP_SUBSCRIBER_VARIABLE_NAME);
+        final Metrics metrics = (Metrics) jobDataMap.get(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME);
+
+        final Optional<List<String>> subscriberMessagesOptional =
+                DMaaPMRUtils.getSubscriberMessages(subscriber, metrics);
+
+        // Write message to CDAP Stream using Stream Writer
+        if (subscriberMessagesOptional.isPresent()) {
+            writeMessageToCDAPStream(subscriberMessagesOptional.get(), cdapStreamName, workerContext, metrics);
+        }
+    }
+
+
+    /**
+     * Writes given messages to CDAP Stream
+     *
+     * @param actualMessages List of messages that need to written to cdap stream
+     * @param cdapStreamName cdap stream name
+     * @param workerContext cdap worker context
+     * @param metrics cdap metrics
+     */
+    private void writeMessageToCDAPStream(final List<String> actualMessages, final String cdapStreamName,
+                                          final WorkerContext workerContext, final Metrics metrics) {
+        LOG.debug("Writing message to CDAP Stream: {}, Message Count: {}", cdapStreamName, actualMessages.size());
+        try {
+
+            for (String message : actualMessages) {
+                workerContext.write(cdapStreamName, message);
+            }
+
+        } catch (IOException e) {
+            metrics.count(CDAPMetricsConstants.TCA_SUBSCRIBER_FAILURE_TO_WRITE_TO_STREAM_METRIC, 1);
+            final String errorMessage =
+                    format("Error while DMaaP message router subscriber attempting to write to CDAP Stream: %s, " +
+                            "Exception: %s", cdapStreamName, e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+        LOG.debug("DMaaP MR Subscriber successfully finished writing messages to CDAP Stream: {}, Message count: {}",
+                cdapStreamName, actualMessages.size());
+
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.annotation.Property;\r
-import co.cask.cdap.api.worker.AbstractWorker;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.FileNotFoundException;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils.readValue;\r
-import static org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils.writeValueAsString;\r
-\r
-/**\r
- * CDAP Worker which mocks fetching VES Messages from DMaaP MR topic.\r
- * The mock instead of making DMaaP MR calls will actually take messages\r
- * from file and send them to stream at subscriber polling interval\r
- *\r
- * TODO: To be removed before going to production - only for testing purposes\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/4/2016.\r
- */\r
-public class TCADMaaPMockSubscriberWorker extends AbstractWorker {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPMockSubscriberWorker.class);\r
-\r
-    // TODO: Remove this file before going to production - only for mocking purposes\r
-    private static final String MOCK_MESSAGE_FILE_LOCATION = "ves_mock_messages.json";\r
-    private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =\r
-            new TypeReference<List<EventListener>>() {\r
-            };\r
-\r
-    private TCAAppPreferences tcaAppPreferences;\r
-    private boolean stopSendingMessages;\r
-    @Property\r
-    private final String tcaSubscriberOutputStreamName;\r
-\r
-    public TCADMaaPMockSubscriberWorker(final String tcaSubscriberOutputStreamName) {\r
-        this.tcaSubscriberOutputStreamName = tcaSubscriberOutputStreamName;\r
-    }\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName("MockTCASubscriberWorker");\r
-        setDescription("Writes Mocked VES messages to CDAP Stream");\r
-        LOG.info("Configuring Mock TCA MR DMaaP Subscriber worker with name: {}", "MockTCASubscriberWorker");\r
-    }\r
-\r
-    @Override\r
-    public void initialize(WorkerContext context) throws Exception {\r
-        super.initialize(context);\r
-\r
-        final TCAAppPreferences appPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(context);\r
-        LOG.info("Initializing Mock TCA MR DMaaP Subscriber worker with preferences: {}", appPreferences);\r
-        this.tcaAppPreferences = appPreferences;\r
-        this.stopSendingMessages = false;\r
-    }\r
-\r
-\r
-    @Override\r
-    public void run() {\r
-        final Integer subscriberPollingInterval = tcaAppPreferences.getSubscriberPollingInterval();\r
-        LOG.debug("Mock TCA Subscriber Polling interval: {}", subscriberPollingInterval);\r
-\r
-        final InputStream resourceAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream\r
-                (MOCK_MESSAGE_FILE_LOCATION);\r
-\r
-        if (resourceAsStream == null) {\r
-            LOG.error("Unable to find file at location: {}", MOCK_MESSAGE_FILE_LOCATION);\r
-            throw new DCAEAnalyticsRuntimeException("Unable to find file", LOG, new FileNotFoundException());\r
-        }\r
-\r
-\r
-        try {\r
-            List<EventListener> eventListeners = readValue(resourceAsStream, EVENT_LISTENER_TYPE_REFERENCE);\r
-\r
-            final int totalMessageCount = eventListeners.size();\r
-            LOG.debug("Mock message count to be written to cdap stream: ()", totalMessageCount);\r
-\r
-            int i = 1;\r
-            for (EventListener eventListener : eventListeners) {\r
-                if (stopSendingMessages) {\r
-                    LOG.debug("Stop sending messages......");\r
-                    break;\r
-                }\r
-                final String eventListenerString = writeValueAsString(eventListener);\r
-                LOG.debug("=======>> Writing message to cdap stream no: {} of {}", i, totalMessageCount);\r
-                getContext().write(tcaSubscriberOutputStreamName, eventListenerString);\r
-                i++;\r
-\r
-                try {\r
-                    Thread.sleep(subscriberPollingInterval);\r
-                } catch (InterruptedException e) {\r
-                    LOG.error("Error while sleeping");\r
-                    throw new DCAEAnalyticsRuntimeException("Error while sleeping", LOG, e);\r
-                }\r
-            }\r
-\r
-            LOG.debug("Finished writing mock messages to CDAP Stream");\r
-\r
-        } catch (IOException e) {\r
-            LOG.error("Error while parsing json file");\r
-            throw new DCAEAnalyticsRuntimeException("Error while parsing mock json file", LOG, e);\r
-        }\r
-\r
-\r
-    }\r
-\r
-    @Override\r
-    public void stop() {\r
-        stopSendingMessages = true;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.annotation.Property;
+import co.cask.cdap.api.worker.AbstractWorker;
+import co.cask.cdap.api.worker.WorkerContext;
+import com.fasterxml.jackson.core.type.TypeReference;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.tca.utils.TCAUtils.readValue;
+import static org.onap.dcae.apod.analytics.tca.utils.TCAUtils.writeValueAsString;
+
+/**
+ * CDAP Worker which mocks fetching VES Messages from DMaaP MR topic.
+ * The mock instead of making DMaaP MR calls will actually take messages
+ * from file and send them to stream at subscriber polling interval
+ *
+ * TODO: To be removed before going to production - only for testing purposes
+ *
+ * @author Rajiv Singla . Creation Date: 11/4/2016.
+ */
+public class TCADMaaPMockSubscriberWorker extends AbstractWorker {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPMockSubscriberWorker.class);
+
+    // TODO: Remove this file before going to production - only for mocking purposes
+    private static final String MOCK_MESSAGE_FILE_LOCATION = "ves_mock_messages.json";
+    private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =
+            new TypeReference<List<EventListener>>() {
+            };
+
+    private TCAAppPreferences tcaAppPreferences;
+    private boolean stopSendingMessages;
+    @Property
+    private final String tcaSubscriberOutputStreamName;
+
+    public TCADMaaPMockSubscriberWorker(final String tcaSubscriberOutputStreamName) {
+        this.tcaSubscriberOutputStreamName = tcaSubscriberOutputStreamName;
+    }
+
+    @Override
+    public void configure() {
+        setName("MockTCASubscriberWorker");
+        setDescription("Writes Mocked VES messages to CDAP Stream");
+        LOG.info("Configuring Mock TCA MR DMaaP Subscriber worker with name: {}", "MockTCASubscriberWorker");
+    }
+
+    @Override
+    public void initialize(WorkerContext context) throws Exception {
+        super.initialize(context);
+
+        final TCAAppPreferences appPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(context);
+        LOG.info("Initializing Mock TCA MR DMaaP Subscriber worker with preferences: {}", appPreferences);
+        this.tcaAppPreferences = appPreferences;
+        this.stopSendingMessages = false;
+    }
+
+
+    @Override
+    public void run() {
+        final Integer subscriberPollingInterval = tcaAppPreferences.getSubscriberPollingInterval();
+        LOG.debug("Mock TCA Subscriber Polling interval: {}", subscriberPollingInterval);
+
+        final InputStream resourceAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream
+                (MOCK_MESSAGE_FILE_LOCATION);
+
+        if (resourceAsStream == null) {
+            LOG.error("Unable to find file at location: {}", MOCK_MESSAGE_FILE_LOCATION);
+            throw new DCAEAnalyticsRuntimeException("Unable to find file", LOG, new FileNotFoundException());
+        }
+
+
+        try {
+            List<EventListener> eventListeners = readValue(resourceAsStream, EVENT_LISTENER_TYPE_REFERENCE);
+
+            final int totalMessageCount = eventListeners.size();
+            LOG.debug("Mock message count to be written to cdap stream: ()", totalMessageCount);
+
+            int i = 1;
+            for (EventListener eventListener : eventListeners) {
+                if (stopSendingMessages) {
+                    LOG.debug("Stop sending messages......");
+                    break;
+                }
+                final String eventListenerString = writeValueAsString(eventListener);
+                LOG.debug("=======>> Writing message to cdap stream no: {} of {}", i, totalMessageCount);
+                getContext().write(tcaSubscriberOutputStreamName, eventListenerString);
+                i++;
+
+                try {
+                    Thread.sleep(subscriberPollingInterval);
+                } catch (InterruptedException e) {
+                    LOG.error("Error while sleeping");
+                    throw new DCAEAnalyticsRuntimeException("Error while sleeping", LOG, e);
+                }
+            }
+
+            LOG.debug("Finished writing mock messages to CDAP Stream");
+
+        } catch (IOException e) {
+            LOG.error("Error while parsing json file");
+            throw new DCAEAnalyticsRuntimeException("Error while parsing mock json file", LOG, e);
+        }
+
+
+    }
+
+    @Override
+    public void stop() {
+        stopSendingMessages = true;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.annotation.Property;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.AppPreferencesToPublisherConfigMapper;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.SchedulerException;\r
-import org.quartz.impl.StdSchedulerFactory;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.concurrent.atomic.AtomicBoolean;\r
-\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * TCA DMaaP Publisher will monitor alerts table at regular intervals and publish any alerts to DMaaP MR Publishing\r
- * Topic\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 11/16/2016.\r
- */\r
-public class TCADMaaPPublisherWorker extends BaseTCADMaaPMRWorker {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPPublisherWorker.class);\r
-\r
-    private DMaaPMRPublisher publisher;\r
-    private Metrics metrics;\r
-    @Property\r
-    private final String tcaVESAlertsTableName;\r
-\r
-    public TCADMaaPPublisherWorker(final String tcaVESAlertsTableName) {\r
-        this.tcaVESAlertsTableName = tcaVESAlertsTableName;\r
-    }\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_WORKER);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER);\r
-        LOG.debug("Configuring TCA MR DMaaP Publisher worker with name: {}",\r
-                CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_WORKER);\r
-    }\r
-\r
-\r
-    @Override\r
-    public void initialize(WorkerContext context) throws Exception {\r
-        super.initialize(context);\r
-\r
-        // Parse runtime arguments\r
-        final TCAAppPreferences tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(context);\r
-\r
-        LOG.info("Initializing TCA MR DMaaP Publisher worker with preferences: {}", tcaAppPreferences);\r
-\r
-        //  Map TCA App Preferences to DMaaP MR Publisher Config\r
-        final DMaaPMRPublisherConfig publisherConfig = AppPreferencesToPublisherConfigMapper.map(tcaAppPreferences);\r
-\r
-        LOG.info("TCA DMaaP MR Publisher worker will be polling TCA Alerts Table Name: {}", tcaVESAlertsTableName);\r
-\r
-        // Create an instance of DMaaP MR Publisher\r
-        LOG.debug("Creating an instance of DMaaP Publisher");\r
-        publisher = DMaaPMRFactory.create().createPublisher(publisherConfig);\r
-\r
-        // initialize a new Quartz scheduler\r
-        initializeScheduler(tcaAppPreferences, new StdSchedulerFactory());\r
-\r
-        // initialize scheduler state\r
-        isSchedulerShutdown = new AtomicBoolean(true);\r
-    }\r
-\r
-\r
-    /**\r
-     * Stop DMaaP Publisher\r
-     */\r
-    @Override\r
-    public void stop() {\r
-        // Close Publisher - which will flush any batch messages if present in batch queue\r
-        if (publisher != null) {\r
-            try {\r
-                publisher.close();\r
-            } catch (Exception e) {\r
-                final String errorMessage = format("Error while shutting down DMaaP MR Publisher: %s", e);\r
-                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-            }\r
-        }\r
-        // Shut down scheduler\r
-        super.stop();\r
-    }\r
-\r
-\r
-    /**\r
-     * Initializes a scheduler instance for DMaaP MR Publisher Job\r
-     *\r
-     * @throws SchedulerException SchedulerException\r
-     */\r
-    private void initializeScheduler(final TCAAppPreferences tcaAnalyticsAppConfig,\r
-                                     final StdSchedulerFactory stdSchedulerFactory) throws SchedulerException {\r
-\r
-        // Get Publisher polling interval\r
-        final Integer publisherPollingInterval = tcaAnalyticsAppConfig.getPublisherPollingInterval();\r
-\r
-        // Publisher Quartz Properties file\r
-        final String quartzPublisherPropertiesFileName = AnalyticsConstants.TCA_QUARTZ_PUBLISHER_PROPERTIES_FILE_NAME;\r
-\r
-        // Create a new JobDataMap containing information required by TCA DMaaP Publisher Job\r
-        final JobDataMap jobDataMap = new JobDataMap();\r
-        jobDataMap.put(AnalyticsConstants.CDAP_ALERTS_TABLE_VARIABLE_NAME, tcaVESAlertsTableName);\r
-        jobDataMap.put(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME, getContext());\r
-        jobDataMap.put(AnalyticsConstants.DMAAP_PUBLISHER_VARIABLE_NAME, publisher);\r
-        jobDataMap.put(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME, metrics);\r
-\r
-        // Create new publisher scheduler\r
-        scheduler = TCAUtils.createQuartzScheduler(publisherPollingInterval, stdSchedulerFactory,\r
-                quartzPublisherPropertiesFileName, jobDataMap, TCADMaaPMRPublisherJob.class,\r
-                AnalyticsConstants.TCA_DMAAP_PUBLISHER_QUARTZ_JOB_NAME,\r
-                AnalyticsConstants.TCA_DMAAP_PUBLISHER_QUARTZ_TRIGGER_NAME);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.annotation.Property;
+import co.cask.cdap.api.metrics.Metrics;
+import co.cask.cdap.api.worker.WorkerContext;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.AppPreferencesToPublisherConfigMapper;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.quartz.JobDataMap;
+import org.quartz.SchedulerException;
+import org.quartz.impl.StdSchedulerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static java.lang.String.format;
+
+/**
+ * TCA DMaaP Publisher will monitor alerts table at regular intervals and publish any alerts to DMaaP MR Publishing
+ * Topic
+ * <p>
+ * @author Rajiv Singla . Creation Date: 11/16/2016.
+ */
+public class TCADMaaPPublisherWorker extends BaseTCADMaaPMRWorker {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPPublisherWorker.class);
+
+    private DMaaPMRPublisher publisher;
+    private Metrics metrics;
+    @Property
+    private final String tcaVESAlertsTableName;
+
+    public TCADMaaPPublisherWorker(final String tcaVESAlertsTableName) {
+        this.tcaVESAlertsTableName = tcaVESAlertsTableName;
+    }
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_WORKER);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER);
+        LOG.debug("Configuring TCA MR DMaaP Publisher worker with name: {}",
+                CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_WORKER);
+    }
+
+
+    @Override
+    public void initialize(WorkerContext context) throws Exception {
+        super.initialize(context);
+
+        // Parse runtime arguments
+        final TCAAppPreferences tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(context);
+
+        LOG.info("Initializing TCA MR DMaaP Publisher worker with preferences: {}", tcaAppPreferences);
+
+        //  Map TCA App Preferences to DMaaP MR Publisher Config
+        final DMaaPMRPublisherConfig publisherConfig = AppPreferencesToPublisherConfigMapper.map(tcaAppPreferences);
+
+        LOG.info("TCA DMaaP MR Publisher worker will be polling TCA Alerts Table Name: {}", tcaVESAlertsTableName);
+
+        // Create an instance of DMaaP MR Publisher
+        LOG.debug("Creating an instance of DMaaP Publisher");
+        publisher = DMaaPMRFactory.create().createPublisher(publisherConfig);
+
+        // initialize a new Quartz scheduler
+        initializeScheduler(tcaAppPreferences, new StdSchedulerFactory());
+
+        // initialize scheduler state
+        isSchedulerShutdown = new AtomicBoolean(true);
+    }
+
+
+    /**
+     * Stop DMaaP Publisher
+     */
+    @Override
+    public void stop() {
+        // Close Publisher - which will flush any batch messages if present in batch queue
+        if (publisher != null) {
+            try {
+                publisher.close();
+            } catch (Exception e) {
+                final String errorMessage = format("Error while shutting down DMaaP MR Publisher: %s", e);
+                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+            }
+        }
+        // Shut down scheduler
+        super.stop();
+    }
+
+
+    /**
+     * Initializes a scheduler instance for DMaaP MR Publisher Job
+     *
+     * @throws SchedulerException SchedulerException
+     */
+    private void initializeScheduler(final TCAAppPreferences tcaAnalyticsAppConfig,
+                                     final StdSchedulerFactory stdSchedulerFactory) throws SchedulerException {
+
+        // Get Publisher polling interval
+        final Integer publisherPollingInterval = tcaAnalyticsAppConfig.getPublisherPollingInterval();
+
+        // Publisher Quartz Properties file
+        final String quartzPublisherPropertiesFileName = AnalyticsConstants.TCA_QUARTZ_PUBLISHER_PROPERTIES_FILE_NAME;
+
+        // Create a new JobDataMap containing information required by TCA DMaaP Publisher Job
+        final JobDataMap jobDataMap = new JobDataMap();
+        jobDataMap.put(AnalyticsConstants.CDAP_ALERTS_TABLE_VARIABLE_NAME, tcaVESAlertsTableName);
+        jobDataMap.put(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME, getContext());
+        jobDataMap.put(AnalyticsConstants.DMAAP_PUBLISHER_VARIABLE_NAME, publisher);
+        jobDataMap.put(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME, metrics);
+
+        // Create new publisher scheduler
+        scheduler = TCAUtils.createQuartzScheduler(publisherPollingInterval, stdSchedulerFactory,
+                quartzPublisherPropertiesFileName, jobDataMap, TCADMaaPMRPublisherJob.class,
+                AnalyticsConstants.TCA_DMAAP_PUBLISHER_QUARTZ_JOB_NAME,
+                AnalyticsConstants.TCA_DMAAP_PUBLISHER_QUARTZ_TRIGGER_NAME);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.annotation.Property;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.AppPreferencesToSubscriberConfigMapper;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.SchedulerException;\r
-import org.quartz.impl.StdSchedulerFactory;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.concurrent.atomic.AtomicBoolean;\r
-\r
-/**\r
- * TCA DMaaP Subscriber will read messages and post them to cdap stream at regular intervals\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/14/2016.\r
- */\r
-public class TCADMaaPSubscriberWorker extends BaseTCADMaaPMRWorker {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPSubscriberWorker.class);\r
-\r
-    private DMaaPMRSubscriber subscriber;\r
-    private Metrics metrics;\r
-    @Property\r
-    private final String tcaSubscriberOutputStreamName;\r
-\r
-    public TCADMaaPSubscriberWorker(final String tcaSubscriberOutputStreamName) {\r
-        this.tcaSubscriberOutputStreamName = tcaSubscriberOutputStreamName;\r
-    }\r
-\r
-\r
-    @Override\r
-    public void configure() {\r
-        setName(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_WORKER);\r
-        setDescription(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER);\r
-        LOG.debug("Configuring TCA MR DMaaP Subscriber worker with name: {}",\r
-                CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_WORKER);\r
-    }\r
-\r
-    @Override\r
-    public void initialize(WorkerContext context) throws Exception {\r
-        super.initialize(context);\r
-\r
-        // Parse runtime arguments\r
-        final TCAAppPreferences tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(context);\r
-\r
-        LOG.info("Initializing TCA MR DMaaP Subscriber worker with preferences: {}", tcaAppPreferences);\r
-\r
-        // Map TCA App Preferences to DMaaP MR Subscriber Config\r
-        final DMaaPMRSubscriberConfig subscriberConfig = AppPreferencesToSubscriberConfigMapper.map(tcaAppPreferences);\r
-\r
-        LOG.info("TCA DMaaP MR Subscriber worker will be writing to CDAP Stream: {}", tcaSubscriberOutputStreamName);\r
-\r
-        // Create an instance of DMaaP MR Subscriber\r
-        LOG.debug("Creating an instance of DMaaP Subscriber");\r
-        subscriber = DMaaPMRFactory.create().createSubscriber(subscriberConfig);\r
-\r
-        // initialize a new Quartz scheduler\r
-        initializeScheduler(tcaAppPreferences, new StdSchedulerFactory());\r
-\r
-        // initialize scheduler state\r
-        isSchedulerShutdown = new AtomicBoolean(true);\r
-    }\r
-\r
-    /**\r
-     * Initializes a scheduler instance for DMaaP MR Subscriber Job\r
-     *\r
-     * @throws SchedulerException SchedulerException\r
-     */\r
-    private void initializeScheduler(final TCAAppPreferences tcaAppPreferences,\r
-                                     final StdSchedulerFactory stdSchedulerFactory) throws SchedulerException {\r
-\r
-        // Get Subscriber polling interval\r
-        final Integer subscriberPollingInterval = tcaAppPreferences.getSubscriberPollingInterval();\r
-\r
-        // Subscriber Quartz Properties file\r
-        final String quartzSubscriberPropertiesFileName = AnalyticsConstants.TCA_QUARTZ_SUBSCRIBER_PROPERTIES_FILE_NAME;\r
-\r
-        // Create a new JobDataMap containing information required by TCA DMaaP Subscriber Job\r
-        final JobDataMap jobDataMap = new JobDataMap();\r
-        jobDataMap.put(AnalyticsConstants.CDAP_STREAM_VARIABLE_NAME, tcaSubscriberOutputStreamName);\r
-        jobDataMap.put(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME, getContext());\r
-        jobDataMap.put(AnalyticsConstants.DMAAP_SUBSCRIBER_VARIABLE_NAME, subscriber);\r
-        jobDataMap.put(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME, metrics);\r
-\r
-        // Create new publisher scheduler\r
-        scheduler = TCAUtils.createQuartzScheduler(subscriberPollingInterval, stdSchedulerFactory,\r
-                quartzSubscriberPropertiesFileName, jobDataMap, TCADMaaPMRSubscriberJob.class,\r
-                AnalyticsConstants.TCA_DMAAP_SUBSCRIBER_QUARTZ_JOB_NAME,\r
-                AnalyticsConstants.TCA_DMAAP_SUBSCRIBER_QUARTZ_TRIGGER_NAME);\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.annotation.Property;
+import co.cask.cdap.api.metrics.Metrics;
+import co.cask.cdap.api.worker.WorkerContext;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.AppPreferencesToSubscriberConfigMapper;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.quartz.JobDataMap;
+import org.quartz.SchedulerException;
+import org.quartz.impl.StdSchedulerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * TCA DMaaP Subscriber will read messages and post them to cdap stream at regular intervals
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/14/2016.
+ */
+public class TCADMaaPSubscriberWorker extends BaseTCADMaaPMRWorker {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCADMaaPSubscriberWorker.class);
+
+    private DMaaPMRSubscriber subscriber;
+    private Metrics metrics;
+    @Property
+    private final String tcaSubscriberOutputStreamName;
+
+    public TCADMaaPSubscriberWorker(final String tcaSubscriberOutputStreamName) {
+        this.tcaSubscriberOutputStreamName = tcaSubscriberOutputStreamName;
+    }
+
+
+    @Override
+    public void configure() {
+        setName(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_WORKER);
+        setDescription(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER);
+        LOG.debug("Configuring TCA MR DMaaP Subscriber worker with name: {}",
+                CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_WORKER);
+    }
+
+    @Override
+    public void initialize(WorkerContext context) throws Exception {
+        super.initialize(context);
+
+        // Parse runtime arguments
+        final TCAAppPreferences tcaAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(context);
+
+        LOG.info("Initializing TCA MR DMaaP Subscriber worker with preferences: {}", tcaAppPreferences);
+
+        // Map TCA App Preferences to DMaaP MR Subscriber Config
+        final DMaaPMRSubscriberConfig subscriberConfig = AppPreferencesToSubscriberConfigMapper.map(tcaAppPreferences);
+
+        LOG.info("TCA DMaaP MR Subscriber worker will be writing to CDAP Stream: {}", tcaSubscriberOutputStreamName);
+
+        // Create an instance of DMaaP MR Subscriber
+        LOG.debug("Creating an instance of DMaaP Subscriber");
+        subscriber = DMaaPMRFactory.create().createSubscriber(subscriberConfig);
+
+        // initialize a new Quartz scheduler
+        initializeScheduler(tcaAppPreferences, new StdSchedulerFactory());
+
+        // initialize scheduler state
+        isSchedulerShutdown = new AtomicBoolean(true);
+    }
+
+    /**
+     * Initializes a scheduler instance for DMaaP MR Subscriber Job
+     *
+     * @throws SchedulerException SchedulerException
+     */
+    private void initializeScheduler(final TCAAppPreferences tcaAppPreferences,
+                                     final StdSchedulerFactory stdSchedulerFactory) throws SchedulerException {
+
+        // Get Subscriber polling interval
+        final Integer subscriberPollingInterval = tcaAppPreferences.getSubscriberPollingInterval();
+
+        // Subscriber Quartz Properties file
+        final String quartzSubscriberPropertiesFileName = AnalyticsConstants.TCA_QUARTZ_SUBSCRIBER_PROPERTIES_FILE_NAME;
+
+        // Create a new JobDataMap containing information required by TCA DMaaP Subscriber Job
+        final JobDataMap jobDataMap = new JobDataMap();
+        jobDataMap.put(AnalyticsConstants.CDAP_STREAM_VARIABLE_NAME, tcaSubscriberOutputStreamName);
+        jobDataMap.put(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME, getContext());
+        jobDataMap.put(AnalyticsConstants.DMAAP_SUBSCRIBER_VARIABLE_NAME, subscriber);
+        jobDataMap.put(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME, metrics);
+
+        // Create new publisher scheduler
+        scheduler = TCAUtils.createQuartzScheduler(subscriberPollingInterval, stdSchedulerFactory,
+                quartzSubscriberPropertiesFileName, jobDataMap, TCADMaaPMRSubscriberJob.class,
+                AnalyticsConstants.TCA_DMAAP_SUBSCRIBER_QUARTZ_JOB_NAME,
+                AnalyticsConstants.TCA_DMAAP_SUBSCRIBER_QUARTZ_TRIGGER_NAME);
+    }
+
+
+}
@@ -1,95 +1,95 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.fasterxml.jackson.databind.SerializationFeature;\r
-import com.google.common.base.Suppliers;\r
-import org.junit.BeforeClass;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;\r
-\r
-import java.util.Map;\r
-import java.util.Properties;\r
-import java.util.TreeMap;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/25/2016.\r
- */\r
-public abstract class BaseAnalyticsCDAPTCAIT extends BaseDCAEAnalyticsIT {\r
-\r
-    protected static ObjectMapper objectMapper;\r
-\r
-    @BeforeClass\r
-    public static void beforeClass() {\r
-        final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =\r
-                new AnalyticsModelObjectMapperSupplier();\r
-        objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();\r
-        objectMapper.enable(SerializationFeature.INDENT_OUTPUT);\r
-    }\r
-\r
-    protected static final String TCA_CONTROLLER_POLICY_FILE_LOCATION =\r
-            "data/properties/tca_controller_policy.properties";\r
-\r
-    // App Settings\r
-    protected static final String DCAE_ANALYTICS_TCA_TEST_APP_NAME = "dcae-tca";\r
-    protected static final String DCAE_ANALYTICS_TCA_TEST_APP_DESC =\r
-            "DCAE Analytics Threshold Crossing Alert Application";\r
-    \r
-\r
-    protected static TCATestAppConfig getTCATestAppConfig() {\r
-        final TCATestAppConfig tcaTestAppConfig = new TCATestAppConfig();\r
-        tcaTestAppConfig.setAppName(DCAE_ANALYTICS_TCA_TEST_APP_NAME);\r
-        tcaTestAppConfig.setAppDescription(DCAE_ANALYTICS_TCA_TEST_APP_DESC);\r
-        return tcaTestAppConfig;\r
-    }\r
-\r
-    protected static TCATestAppPreferences getTCATestAppPreferences() {\r
-        final TCATestAppPreferences tcaTestAppPreferences = new TCATestAppPreferences(getTCAPolicyPreferences());\r
-        tcaTestAppPreferences.setSubscriberPollingInterval(null);\r
-        tcaTestAppPreferences.setPublisherMaxBatchSize(null);\r
-        tcaTestAppPreferences.setPublisherMaxRecoveryQueueSize(null);\r
-        tcaTestAppPreferences.setEnableAlertCEFFormat(null);\r
-        tcaTestAppPreferences.setPublisherPollingInterval(null);\r
-        return tcaTestAppPreferences;\r
-    }\r
-\r
-\r
-    protected static Map<String, String> getTCAPolicyPreferences() {\r
-        final Map<String, String> policyPreferences = new TreeMap<>();\r
-        final Properties policyPreferencesProps =\r
-                AnalyticsModelIOUtils.loadPropertiesFile(TCA_CONTROLLER_POLICY_FILE_LOCATION, new Properties());\r
-        for (Map.Entry<Object, Object> propEntry : policyPreferencesProps.entrySet()) {\r
-            policyPreferences.put(propEntry.getKey().toString(), propEntry.getValue().toString());\r
-        }\r
-\r
-        return policyPreferences;\r
-    }\r
-\r
-    protected static String serializeModelToJson(Object model) throws JsonProcessingException {\r
-        return objectMapper.writeValueAsString(model);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.google.common.base.Suppliers;
+import org.junit.BeforeClass;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
+import org.onap.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;
+
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 10/25/2016.
+ */
+public abstract class BaseAnalyticsCDAPTCAIT extends BaseDCAEAnalyticsIT {
+
+    protected static ObjectMapper objectMapper;
+
+    @BeforeClass
+    public static void beforeClass() {
+        final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =
+                new AnalyticsModelObjectMapperSupplier();
+        objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();
+        objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
+    }
+
+    protected static final String TCA_CONTROLLER_POLICY_FILE_LOCATION =
+            "data/properties/tca_controller_policy.properties";
+
+    // App Settings
+    protected static final String DCAE_ANALYTICS_TCA_TEST_APP_NAME = "dcae-tca";
+    protected static final String DCAE_ANALYTICS_TCA_TEST_APP_DESC =
+            "DCAE Analytics Threshold Crossing Alert Application";
+    
+
+    protected static TCATestAppConfig getTCATestAppConfig() {
+        final TCATestAppConfig tcaTestAppConfig = new TCATestAppConfig();
+        tcaTestAppConfig.setAppName(DCAE_ANALYTICS_TCA_TEST_APP_NAME);
+        tcaTestAppConfig.setAppDescription(DCAE_ANALYTICS_TCA_TEST_APP_DESC);
+        return tcaTestAppConfig;
+    }
+
+    protected static TCATestAppPreferences getTCATestAppPreferences() {
+        final TCATestAppPreferences tcaTestAppPreferences = new TCATestAppPreferences(getTCAPolicyPreferences());
+        tcaTestAppPreferences.setSubscriberPollingInterval(null);
+        tcaTestAppPreferences.setPublisherMaxBatchSize(null);
+        tcaTestAppPreferences.setPublisherMaxRecoveryQueueSize(null);
+        tcaTestAppPreferences.setEnableAlertCEFFormat(null);
+        tcaTestAppPreferences.setPublisherPollingInterval(null);
+        return tcaTestAppPreferences;
+    }
+
+
+    protected static Map<String, String> getTCAPolicyPreferences() {
+        final Map<String, String> policyPreferences = new TreeMap<>();
+        final Properties policyPreferencesProps =
+                AnalyticsModelIOUtils.loadPropertiesFile(TCA_CONTROLLER_POLICY_FILE_LOCATION, new Properties());
+        for (Map.Entry<Object, Object> propEntry : policyPreferencesProps.entrySet()) {
+            policyPreferences.put(propEntry.getKey().toString(), propEntry.getValue().toString());
+        }
+
+        return policyPreferences;
+    }
+
+    protected static String serializeModelToJson(Object model) throws JsonProcessingException {
+        return objectMapper.writeValueAsString(model);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca;\r
-\r
-import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import co.cask.cdap.internal.flow.DefaultFlowletConfigurer;\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.junit.Assert;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.HashMap;\r
-import java.util.LinkedHashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Properties;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/25/2016.\r
- */\r
-public abstract class BaseAnalyticsCDAPTCAUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-    /**\r
-     * Object mapper to be used for all TCA Json Parsing\r
-     */\r
-    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =\r
-            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();\r
-\r
-    protected static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";\r
-    protected static final String CEF_MESSAGES_JSON_FILE_LOCATION = "data/json/cef/cef_messages.json";\r
-    protected static final String CEF_MESSAGE_JSON_FILE_LOCATION = "data/json/cef/cef_message.json";\r
-    protected static final String CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION =\r
-            "data/json/cef/cef_message_with_threshold_violation.json";\r
-    protected static final String TCA_APP_CONFIG_FILE_LOCATION = "data/json/config/controller_app_config.json";\r
-    protected static final String TCA_ALERT_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";\r
-\r
-\r
-    protected static final String TCA_CONTROLLER_POLICY_FILE_LOCATION =\r
-            "data/properties/tca_controller_policy.properties";\r
-\r
-    protected static final String TCA_CONTROLLER_POLICY_FROM_JSON_FILE_LOCATION =\r
-            "data/properties/tca_controller_policy_from_json.properties";\r
-\r
-\r
-    protected static final String TCA_TEST_APP_CONFIG_NAME = "testTCAAppName";\r
-    protected static final String TCA_TEST_APP_CONFIG_DESCRIPTION = "testTCAAppDescription";\r
-    protected static final String TCA_TEST_APP_CONFIG_SUBSCRIBER_OUTPUT_STREAM_NAME =\r
-            "testTcaSubscriberOutputStreamName";\r
-    protected static final String TCA_TEST_APP_CONFIG_VES_ALERT_TABLE_NAME = "testTcaVESAlertsTableName";\r
-    protected static final String TCA_TEST_APP_CONFIG_VES_MESSAGE_STATUS_TABLE_NAME =\r
-            "testTcaVESMessageStatusTableName";\r
-\r
-\r
-    /**\r
-     * Provides TCA Policy that can be used for testing\r
-     *\r
-     * @return test TCA Policy Object\r
-     */\r
-    protected static TCAPolicy getSampleTCAPolicy() {\r
-        return deserializeJsonFileToModel(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicy.class);\r
-    }\r
-\r
-    /**\r
-     * Provides TCA Policy that can be used for testing\r
-     *\r
-     * @return test {@link TCAPolicyPreferences}\r
-     */\r
-    protected static TCAPolicyPreferences getSampleTCAPolicyPreferences() {\r
-        return deserializeJsonFileToModel(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicyPreferences.class);\r
-    }\r
-\r
-    /**\r
-     * Provides list containing 350 CEF messages\r
-     *\r
-     * @return CEF Test Message\r
-     *\r
-     * @throws Exception Exception\r
-     */\r
-    protected static List<EventListener> getCEFMessages() throws Exception {\r
-        final String cefMessageAsString = fromStream(CEF_MESSAGES_JSON_FILE_LOCATION);\r
-        final TypeReference<List<EventListener>> eventListenerListTypeReference =\r
-                new TypeReference<List<EventListener>>() {\r
-                };\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, eventListenerListTypeReference);\r
-    }\r
-\r
-    /**\r
-     * Provides 1 valid CEF messages which does not violate Threshold as String\r
-     *\r
-     * @return CEF Test Message String\r
-     *\r
-     * @throws Exception Exception\r
-     */\r
-    protected static String getValidCEFMessage() throws Exception {\r
-        return fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides single CEF Test Message\r
-     *\r
-     * @return CEF Test Message\r
-     *\r
-     * @throws Exception Exception\r
-     */\r
-    protected static EventListener getCEFEventListener() throws Exception {\r
-        final String cefMessageAsString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, EventListener.class);\r
-    }\r
-\r
-    /**\r
-     * Deserialize given Json file location to given model class and returns it back without any validation check\r
-     *\r
-     * @param jsonFileLocation Classpath location of the json file\r
-     * @param modelClass Model Class type\r
-     * @param <T> Json Model Type\r
-     *\r
-     * @return Json model object\r
-     */\r
-    public static <T> T deserializeJsonFileToModel(String jsonFileLocation, Class<T> modelClass) {\r
-        final InputStream jsonFileInputStream =\r
-                BaseDCAEAnalyticsUnitTest.class.getClassLoader().getResourceAsStream(jsonFileLocation);\r
-        Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);\r
-        try {\r
-            return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonFileInputStream, modelClass);\r
-        } catch (IOException ex) {\r
-            LOG.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}",\r
-                    jsonFileLocation, modelClass, ex);\r
-            throw new RuntimeException(ex);\r
-        } finally {\r
-            try {\r
-                jsonFileInputStream.close();\r
-            } catch (IOException e) {\r
-                LOG.error("Error while closing input stream at file location: {}", jsonFileLocation);\r
-                throw new RuntimeException(e);\r
-            }\r
-        }\r
-    }\r
-\r
-    protected static TCATestAppConfig getTCATestAppConfig() {\r
-        final TCATestAppConfig tcaAppConfig = new TCATestAppConfig();\r
-        tcaAppConfig.setAppName(TCA_TEST_APP_CONFIG_NAME);\r
-        tcaAppConfig.setAppDescription(TCA_TEST_APP_CONFIG_DESCRIPTION);\r
-        tcaAppConfig.setTcaSubscriberOutputStreamName(TCA_TEST_APP_CONFIG_SUBSCRIBER_OUTPUT_STREAM_NAME);\r
-        tcaAppConfig.setTcaVESAlertsTableName(TCA_TEST_APP_CONFIG_VES_ALERT_TABLE_NAME);\r
-        tcaAppConfig.setTcaVESMessageStatusTableName(TCA_TEST_APP_CONFIG_VES_MESSAGE_STATUS_TABLE_NAME);\r
-        return tcaAppConfig;\r
-    }\r
-\r
-    /**\r
-     * Provides a test application preference for unit testing\r
-     *\r
-     * @return tca app preferences\r
-     */\r
-    protected static TCATestAppPreferences getTCATestAppPreferences() {\r
-        final TCATestAppPreferences tcaTestAppPreferences = new TCATestAppPreferences();\r
-        tcaTestAppPreferences.setSubscriberHostName("SUBSCRIBER_HOST_NAME");\r
-        tcaTestAppPreferences.setSubscriberHostPortNumber(10000);\r
-        tcaTestAppPreferences.setSubscriberTopicName("SUBSCRIBER_TOPIC_NAME");\r
-        tcaTestAppPreferences.setSubscriberUserName("SUBSCRIBER_USERNAME");\r
-        tcaTestAppPreferences.setSubscriberUserPassword("SUBSCRIBER_PASSWORD");\r
-        tcaTestAppPreferences.setSubscriberProtocol("https");\r
-        tcaTestAppPreferences.setSubscriberContentType("application/json");\r
-        tcaTestAppPreferences.setSubscriberConsumerId("SUBSCRIBER_CONSUMER_ID");\r
-        tcaTestAppPreferences.setSubscriberConsumerGroup("SUBSCRIBER_CONSUMER_GROUP_NAME");\r
-        tcaTestAppPreferences.setSubscriberTimeoutMS(10);\r
-        tcaTestAppPreferences.setSubscriberMessageLimit(100);\r
-        tcaTestAppPreferences.setSubscriberPollingInterval(1000);\r
-\r
-        tcaTestAppPreferences.setPublisherHostName("PUBLISHER_HOST_NAME");\r
-        tcaTestAppPreferences.setPublisherHostPort(1234);\r
-        tcaTestAppPreferences.setPublisherTopicName("PUBLISHER_TOPIC_NAME");\r
-        tcaTestAppPreferences.setPublisherUserName("PUBLISHER_USERNAME");\r
-        tcaTestAppPreferences.setPublisherUserPassword("PUBLISHER_PASSWORD");\r
-        tcaTestAppPreferences.setPublisherProtocol("https");\r
-        tcaTestAppPreferences.setPublisherContentType("application/json");\r
-        tcaTestAppPreferences.setPublisherMaxBatchSize(100);\r
-        tcaTestAppPreferences.setPublisherMaxRecoveryQueueSize(100);\r
-        tcaTestAppPreferences.setPublisherPollingInterval(6000);\r
-\r
-        tcaTestAppPreferences.setEnableAAIEnrichment(true);\r
-        tcaTestAppPreferences.setAaiEnrichmentHost("AAI_ENRICHMENT_HOST");\r
-        tcaTestAppPreferences.setAaiEnrichmentPortNumber(8443);\r
-        tcaTestAppPreferences.setAaiEnrichmentProtocol("https");\r
-        tcaTestAppPreferences.setAaiEnrichmentUserName("AAI_USERNAME");\r
-        tcaTestAppPreferences.setAaiEnrichmentUserPassword("AAI_USERPASSWORD");\r
-        tcaTestAppPreferences.setAaiEnrichmentIgnoreSSLCertificateErrors(true);\r
-        tcaTestAppPreferences.setAaiVMEnrichmentAPIPath("VM_ENRICHMENT_PATH");\r
-        tcaTestAppPreferences.setAaiVNFEnrichmentAPIPath("VNF_ENRICHMENT_PATH");\r
-        return tcaTestAppPreferences;\r
-    }\r
-\r
-    protected static Map<String, String> getPreferenceMap() {\r
-        Map<String, String> preference = new HashMap<>();\r
-        preference.put("subscriberHostName", "mrlocal-mtnjftle01.homer.com");\r
-        preference.put("subscriberHostPort", "3905");\r
-        preference.put("subscriberTopicName", "com.dcae.dmaap.mtnje2.DcaeTestVESPub");\r
-        preference.put("subscriberProtocol", "https");\r
-        preference.put("subscriberUserName", "USER");\r
-        preference.put("subscriberUserPassword", "PASSWORD");\r
-        preference.put("subscriberContentType", "application/json");\r
-        preference.put("subscriberConsumerId", "123");\r
-        preference.put("subscriberConsumerGroup", "testTCAConsumerName-123");\r
-        preference.put("subscriberTimeoutMS", "-1");\r
-        preference.put("subscriberMessageLimit", "-1");\r
-        preference.put("subscriberPollingInterval", "30000");\r
-\r
-        preference.put("publisherHostName", "publisherHostName");\r
-        preference.put("publisherHostPort", "3905");\r
-        preference.put("publisherTopicName", "publisherTopicName");\r
-        preference.put("publisherProtocol", "https");\r
-        preference.put("publisherUserName", "publisherUserName");\r
-        preference.put("publisherContentType", "application/json");\r
-        preference.put("publisherMaxBatchSize", "1000");\r
-        preference.put("publisherMaxRecoveryQueueSize", "100");\r
-        preference.put("publisherPollingInterval", "6000");\r
-        return preference;\r
-    }\r
-\r
-    protected static <T extends AbstractFlowlet> void assertFlowletNameAndDescription(\r
-            final String expectedName, final String expectedDescription, final T flowlet) {\r
-        final DefaultFlowletConfigurer defaultFlowletConfigurer =\r
-                new DefaultFlowletConfigurer(flowlet);\r
-        flowlet.configure(defaultFlowletConfigurer);\r
-\r
-        final String flowletName = getPrivateFiledValue(defaultFlowletConfigurer, "name", String.class);\r
-        final String flowletDescription =\r
-                getPrivateFiledValue(defaultFlowletConfigurer, "description", String.class);\r
-\r
-        assertThat("Flowlet name must match with CDAPComponentsConstants",\r
-                flowletName, is(expectedName));\r
-\r
-        assertThat("Flowlet description must match with CDAPComponentsConstants",\r
-                flowletDescription, is(expectedDescription));\r
-\r
-    }\r
-\r
-    protected static FlowletContext getTestFlowletContextWithValidPolicy() {\r
-        return createNewFlowletContextFromPropertiesFile(TCA_CONTROLLER_POLICY_FILE_LOCATION);\r
-    }\r
-\r
-    protected static FlowletContext getTestFlowletContextWithValidPolicyFromJSON() {\r
-        return createNewFlowletContextFromPropertiesFile(TCA_CONTROLLER_POLICY_FROM_JSON_FILE_LOCATION);\r
-    }\r
-\r
-    private static FlowletContext createNewFlowletContextFromPropertiesFile(final String propertyFileLocation) {\r
-        final Properties controllerProperties =\r
-                AnalyticsModelIOUtils.loadPropertiesFile(propertyFileLocation, new Properties());\r
-\r
-        Map<String, String> runtimeArgs = new LinkedHashMap<>();\r
-        for (Map.Entry<Object, Object> property : controllerProperties.entrySet()) {\r
-            runtimeArgs.put(property.getKey().toString(), property.getValue().toString());\r
-        }\r
-\r
-        final FlowletContext flowletContext = mock(FlowletContext.class);\r
-        when(flowletContext.getRuntimeArguments()).thenReturn(runtimeArgs);\r
-        return flowletContext;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca;
+
+import co.cask.cdap.api.flow.flowlet.AbstractFlowlet;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import co.cask.cdap.internal.flow.DefaultFlowletConfigurer;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.junit.Assert;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/25/2016.
+ */
+public abstract class BaseAnalyticsCDAPTCAUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+    /**
+     * Object mapper to be used for all TCA Json Parsing
+     */
+    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =
+            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();
+
+    protected static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";
+    protected static final String CEF_MESSAGES_JSON_FILE_LOCATION = "data/json/cef/cef_messages.json";
+    protected static final String CEF_MESSAGE_JSON_FILE_LOCATION = "data/json/cef/cef_message.json";
+    protected static final String CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION =
+            "data/json/cef/cef_message_with_threshold_violation.json";
+    protected static final String TCA_APP_CONFIG_FILE_LOCATION = "data/json/config/controller_app_config.json";
+    protected static final String TCA_ALERT_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";
+
+
+    protected static final String TCA_CONTROLLER_POLICY_FILE_LOCATION =
+            "data/properties/tca_controller_policy.properties";
+
+    protected static final String TCA_CONTROLLER_POLICY_FROM_JSON_FILE_LOCATION =
+            "data/properties/tca_controller_policy_from_json.properties";
+
+
+    protected static final String TCA_TEST_APP_CONFIG_NAME = "testTCAAppName";
+    protected static final String TCA_TEST_APP_CONFIG_DESCRIPTION = "testTCAAppDescription";
+    protected static final String TCA_TEST_APP_CONFIG_SUBSCRIBER_OUTPUT_STREAM_NAME =
+            "testTcaSubscriberOutputStreamName";
+    protected static final String TCA_TEST_APP_CONFIG_VES_ALERT_TABLE_NAME = "testTcaVESAlertsTableName";
+    protected static final String TCA_TEST_APP_CONFIG_VES_MESSAGE_STATUS_TABLE_NAME =
+            "testTcaVESMessageStatusTableName";
+
+
+    /**
+     * Provides TCA Policy that can be used for testing
+     *
+     * @return test TCA Policy Object
+     */
+    protected static TCAPolicy getSampleTCAPolicy() {
+        return deserializeJsonFileToModel(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicy.class);
+    }
+
+    /**
+     * Provides TCA Policy that can be used for testing
+     *
+     * @return test {@link TCAPolicyPreferences}
+     */
+    protected static TCAPolicyPreferences getSampleTCAPolicyPreferences() {
+        return deserializeJsonFileToModel(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicyPreferences.class);
+    }
+
+    /**
+     * Provides list containing 350 CEF messages
+     *
+     * @return CEF Test Message
+     *
+     * @throws Exception Exception
+     */
+    protected static List<EventListener> getCEFMessages() throws Exception {
+        final String cefMessageAsString = fromStream(CEF_MESSAGES_JSON_FILE_LOCATION);
+        final TypeReference<List<EventListener>> eventListenerListTypeReference =
+                new TypeReference<List<EventListener>>() {
+                };
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, eventListenerListTypeReference);
+    }
+
+    /**
+     * Provides 1 valid CEF messages which does not violate Threshold as String
+     *
+     * @return CEF Test Message String
+     *
+     * @throws Exception Exception
+     */
+    protected static String getValidCEFMessage() throws Exception {
+        return fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+    }
+
+
+    /**
+     * Provides single CEF Test Message
+     *
+     * @return CEF Test Message
+     *
+     * @throws Exception Exception
+     */
+    protected static EventListener getCEFEventListener() throws Exception {
+        final String cefMessageAsString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, EventListener.class);
+    }
+
+    /**
+     * Deserialize given Json file location to given model class and returns it back without any validation check
+     *
+     * @param jsonFileLocation Classpath location of the json file
+     * @param modelClass Model Class type
+     * @param <T> Json Model Type
+     *
+     * @return Json model object
+     */
+    public static <T> T deserializeJsonFileToModel(String jsonFileLocation, Class<T> modelClass) {
+        final InputStream jsonFileInputStream =
+                BaseDCAEAnalyticsUnitTest.class.getClassLoader().getResourceAsStream(jsonFileLocation);
+        Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);
+        try {
+            return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonFileInputStream, modelClass);
+        } catch (IOException ex) {
+            LOG.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}",
+                    jsonFileLocation, modelClass, ex);
+            throw new RuntimeException(ex);
+        } finally {
+            try {
+                jsonFileInputStream.close();
+            } catch (IOException e) {
+                LOG.error("Error while closing input stream at file location: {}", jsonFileLocation);
+                throw new RuntimeException(e);
+            }
+        }
+    }
+
+    protected static TCATestAppConfig getTCATestAppConfig() {
+        final TCATestAppConfig tcaAppConfig = new TCATestAppConfig();
+        tcaAppConfig.setAppName(TCA_TEST_APP_CONFIG_NAME);
+        tcaAppConfig.setAppDescription(TCA_TEST_APP_CONFIG_DESCRIPTION);
+        tcaAppConfig.setTcaSubscriberOutputStreamName(TCA_TEST_APP_CONFIG_SUBSCRIBER_OUTPUT_STREAM_NAME);
+        tcaAppConfig.setTcaVESAlertsTableName(TCA_TEST_APP_CONFIG_VES_ALERT_TABLE_NAME);
+        tcaAppConfig.setTcaVESMessageStatusTableName(TCA_TEST_APP_CONFIG_VES_MESSAGE_STATUS_TABLE_NAME);
+        return tcaAppConfig;
+    }
+
+    /**
+     * Provides a test application preference for unit testing
+     *
+     * @return tca app preferences
+     */
+    protected static TCATestAppPreferences getTCATestAppPreferences() {
+        final TCATestAppPreferences tcaTestAppPreferences = new TCATestAppPreferences();
+        tcaTestAppPreferences.setSubscriberHostName("SUBSCRIBER_HOST_NAME");
+        tcaTestAppPreferences.setSubscriberHostPortNumber(10000);
+        tcaTestAppPreferences.setSubscriberTopicName("SUBSCRIBER_TOPIC_NAME");
+        tcaTestAppPreferences.setSubscriberUserName("SUBSCRIBER_USERNAME");
+        tcaTestAppPreferences.setSubscriberUserPassword("SUBSCRIBER_PASSWORD");
+        tcaTestAppPreferences.setSubscriberProtocol("https");
+        tcaTestAppPreferences.setSubscriberContentType("application/json");
+        tcaTestAppPreferences.setSubscriberConsumerId("SUBSCRIBER_CONSUMER_ID");
+        tcaTestAppPreferences.setSubscriberConsumerGroup("SUBSCRIBER_CONSUMER_GROUP_NAME");
+        tcaTestAppPreferences.setSubscriberTimeoutMS(10);
+        tcaTestAppPreferences.setSubscriberMessageLimit(100);
+        tcaTestAppPreferences.setSubscriberPollingInterval(1000);
+
+        tcaTestAppPreferences.setPublisherHostName("PUBLISHER_HOST_NAME");
+        tcaTestAppPreferences.setPublisherHostPort(1234);
+        tcaTestAppPreferences.setPublisherTopicName("PUBLISHER_TOPIC_NAME");
+        tcaTestAppPreferences.setPublisherUserName("PUBLISHER_USERNAME");
+        tcaTestAppPreferences.setPublisherUserPassword("PUBLISHER_PASSWORD");
+        tcaTestAppPreferences.setPublisherProtocol("https");
+        tcaTestAppPreferences.setPublisherContentType("application/json");
+        tcaTestAppPreferences.setPublisherMaxBatchSize(100);
+        tcaTestAppPreferences.setPublisherMaxRecoveryQueueSize(100);
+        tcaTestAppPreferences.setPublisherPollingInterval(6000);
+
+        tcaTestAppPreferences.setEnableAAIEnrichment(true);
+        tcaTestAppPreferences.setAaiEnrichmentHost("AAI_ENRICHMENT_HOST");
+        tcaTestAppPreferences.setAaiEnrichmentPortNumber(8443);
+        tcaTestAppPreferences.setAaiEnrichmentProtocol("https");
+        tcaTestAppPreferences.setAaiEnrichmentUserName("AAI_USERNAME");
+        tcaTestAppPreferences.setAaiEnrichmentUserPassword("AAI_USERPASSWORD");
+        tcaTestAppPreferences.setAaiEnrichmentIgnoreSSLCertificateErrors(true);
+        tcaTestAppPreferences.setAaiVMEnrichmentAPIPath("VM_ENRICHMENT_PATH");
+        tcaTestAppPreferences.setAaiVNFEnrichmentAPIPath("VNF_ENRICHMENT_PATH");
+        return tcaTestAppPreferences;
+    }
+
+    protected static Map<String, String> getPreferenceMap() {
+        Map<String, String> preference = new HashMap<>();
+        preference.put("subscriberHostName", "mrlocal-mtnjftle01.homer.com");
+        preference.put("subscriberHostPort", "3905");
+        preference.put("subscriberTopicName", "com.dcae.dmaap.mtnje2.DcaeTestVESPub");
+        preference.put("subscriberProtocol", "https");
+        preference.put("subscriberUserName", "USER");
+        preference.put("subscriberUserPassword", "PASSWORD");
+        preference.put("subscriberContentType", "application/json");
+        preference.put("subscriberConsumerId", "123");
+        preference.put("subscriberConsumerGroup", "testTCAConsumerName-123");
+        preference.put("subscriberTimeoutMS", "-1");
+        preference.put("subscriberMessageLimit", "-1");
+        preference.put("subscriberPollingInterval", "30000");
+
+        preference.put("publisherHostName", "publisherHostName");
+        preference.put("publisherHostPort", "3905");
+        preference.put("publisherTopicName", "publisherTopicName");
+        preference.put("publisherProtocol", "https");
+        preference.put("publisherUserName", "publisherUserName");
+        preference.put("publisherContentType", "application/json");
+        preference.put("publisherMaxBatchSize", "1000");
+        preference.put("publisherMaxRecoveryQueueSize", "100");
+        preference.put("publisherPollingInterval", "6000");
+        return preference;
+    }
+
+    protected static <T extends AbstractFlowlet> void assertFlowletNameAndDescription(
+            final String expectedName, final String expectedDescription, final T flowlet) {
+        final DefaultFlowletConfigurer defaultFlowletConfigurer =
+                new DefaultFlowletConfigurer(flowlet);
+        flowlet.configure(defaultFlowletConfigurer);
+
+        final String flowletName = getPrivateFiledValue(defaultFlowletConfigurer, "name", String.class);
+        final String flowletDescription =
+                getPrivateFiledValue(defaultFlowletConfigurer, "description", String.class);
+
+        assertThat("Flowlet name must match with CDAPComponentsConstants",
+                flowletName, is(expectedName));
+
+        assertThat("Flowlet description must match with CDAPComponentsConstants",
+                flowletDescription, is(expectedDescription));
+
+    }
+
+    protected static FlowletContext getTestFlowletContextWithValidPolicy() {
+        return createNewFlowletContextFromPropertiesFile(TCA_CONTROLLER_POLICY_FILE_LOCATION);
+    }
+
+    protected static FlowletContext getTestFlowletContextWithValidPolicyFromJSON() {
+        return createNewFlowletContextFromPropertiesFile(TCA_CONTROLLER_POLICY_FROM_JSON_FILE_LOCATION);
+    }
+
+    private static FlowletContext createNewFlowletContextFromPropertiesFile(final String propertyFileLocation) {
+        final Properties controllerProperties =
+                AnalyticsModelIOUtils.loadPropertiesFile(propertyFileLocation, new Properties());
+
+        Map<String, String> runtimeArgs = new LinkedHashMap<>();
+        for (Map.Entry<Object, Object> property : controllerProperties.entrySet()) {
+            runtimeArgs.put(property.getKey().toString(), property.getValue().toString());
+        }
+
+        final FlowletContext flowletContext = mock(FlowletContext.class);
+        when(flowletContext.getRuntimeArguments()).thenReturn(runtimeArgs);
+        return flowletContext;
+    }
+
+}
@@ -1,47 +1,47 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca;\r
-\r
-import co.cask.cdap.app.DefaultApplicationContext;\r
-import co.cask.cdap.app.MockAppConfigurer;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/12/2017.\r
- */\r
-public class TCAAnalyticsApplicationTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        final TCAAnalyticsApplication tcaAnalyticsApplication = new TCAAnalyticsApplication();\r
-        MockAppConfigurer mockAppConfigurer = new MockAppConfigurer(tcaAnalyticsApplication);\r
-        final DefaultApplicationContext<TCAAppConfig> applicationContext =\r
-                new DefaultApplicationContext<TCAAppConfig>(getTCATestAppConfig());\r
-        tcaAnalyticsApplication.configure(mockAppConfigurer, applicationContext);\r
-        assertThat(TCA_TEST_APP_CONFIG_NAME, is(mockAppConfigurer.getName()));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca;
+
+import co.cask.cdap.app.DefaultApplicationContext;
+import co.cask.cdap.app.MockAppConfigurer;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/12/2017.
+ */
+public class TCAAnalyticsApplicationTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    @Test
+    public void testConfigure() throws Exception {
+        final TCAAnalyticsApplication tcaAnalyticsApplication = new TCAAnalyticsApplication();
+        MockAppConfigurer mockAppConfigurer = new MockAppConfigurer(tcaAnalyticsApplication);
+        final DefaultApplicationContext<TCAAppConfig> applicationContext =
+                new DefaultApplicationContext<TCAAppConfig>(getTCATestAppConfig());
+        tcaAnalyticsApplication.configure(mockAppConfigurer, applicationContext);
+        assertThat(TCA_TEST_APP_CONFIG_NAME, is(mockAppConfigurer.getName()));
+    }
+
+
+}
@@ -1,79 +1,79 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flow;\r
-\r
-import co.cask.cdap.AllProgramsApp;\r
-import co.cask.cdap.api.flow.FlowletConnection;\r
-import co.cask.cdap.api.flow.FlowletDefinition;\r
-import co.cask.cdap.internal.app.runtime.flow.DefaultFlowConfigurer;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.hamcrest.Matchers.containsInAnyOrder;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 1/12/2017.\r
- */\r
-public class TCAVESCollectorFlowTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    @Test\r
-    @SuppressWarnings("unchecked")\r
-    public void testConfigure() throws Exception {\r
-\r
-        final TCAVESCollectorFlow tcavesCollectorFlow = new TCAVESCollectorFlow(getTCATestAppConfig());\r
-        final DefaultFlowConfigurer configurer = new DefaultFlowConfigurer(new AllProgramsApp.NoOpFlow());\r
-        tcavesCollectorFlow.configure(configurer);\r
-        final String flowName = getPrivateFiledValue(configurer, "name", String.class);\r
-        final String flowDescription = getPrivateFiledValue(configurer, "description", String.class);\r
-\r
-        assertThat("TCAVESCollectorFlow Name must match with what is defined in CDAPComponents Constants",\r
-                flowName, is(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_NAME_FLOW));\r
-\r
-        assertThat("TCAVESCollectorFlow Description must match with what is defined in CDAPComponents Constants",\r
-                flowDescription, is(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW));\r
-\r
-        final Map<String, FlowletDefinition> flowlets =\r
-                (Map<String, FlowletDefinition>) getPrivateFiledValue(configurer, "flowlets", HashMap.class);\r
-\r
-        assertThat("TCAVESCollector must contain all TCA VES flowlets", flowlets.keySet(),\r
-                containsInAnyOrder(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET,\r
-                        CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET,\r
-                        CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET,\r
-                        CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_FLOWLET,\r
-                        CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET));\r
-\r
-        final List<FlowletConnection> connections =\r
-                (List<FlowletConnection>) getPrivateFiledValue(configurer, "connections", ArrayList.class);\r
-\r
-        assertThat("There must be four connections in VES Collector Flow", connections.size(), is(5));\r
-\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flow;
+
+import co.cask.cdap.AllProgramsApp;
+import co.cask.cdap.api.flow.FlowletConnection;
+import co.cask.cdap.api.flow.FlowletDefinition;
+import co.cask.cdap.internal.app.runtime.flow.DefaultFlowConfigurer;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 1/12/2017.
+ */
+public class TCAVESCollectorFlowTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    @Test
+    @SuppressWarnings("unchecked")
+    public void testConfigure() throws Exception {
+
+        final TCAVESCollectorFlow tcavesCollectorFlow = new TCAVESCollectorFlow(getTCATestAppConfig());
+        final DefaultFlowConfigurer configurer = new DefaultFlowConfigurer(new AllProgramsApp.NoOpFlow());
+        tcavesCollectorFlow.configure(configurer);
+        final String flowName = getPrivateFiledValue(configurer, "name", String.class);
+        final String flowDescription = getPrivateFiledValue(configurer, "description", String.class);
+
+        assertThat("TCAVESCollectorFlow Name must match with what is defined in CDAPComponents Constants",
+                flowName, is(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_NAME_FLOW));
+
+        assertThat("TCAVESCollectorFlow Description must match with what is defined in CDAPComponents Constants",
+                flowDescription, is(CDAPComponentsConstants.TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW));
+
+        final Map<String, FlowletDefinition> flowlets =
+                (Map<String, FlowletDefinition>) getPrivateFiledValue(configurer, "flowlets", HashMap.class);
+
+        assertThat("TCAVESCollector must contain all TCA VES flowlets", flowlets.keySet(),
+                containsInAnyOrder(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET,
+                        CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET,
+                        CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET,
+                        CDAPComponentsConstants.TCA_FIXED_VES_AAI_ENRICHMENT_NAME_FLOWLET,
+                        CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET));
+
+        final List<FlowletConnection> connections =
+                (List<FlowletConnection>) getPrivateFiledValue(configurer, "connections", ArrayList.class);
+
+        assertThat("There must be four connections in VES Collector Flow", connections.size(), is(5));
+
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 9/12/2017.\r
- */\r
-@SuppressWarnings("unchecked")\r
-public class TCAVESAlertsAbatementFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private static final TCAPolicyPreferences sampleTCAPolicyPreferences = getSampleTCAPolicyPreferences();\r
-    private static final List<MetricsPerEventName> metricsPerEventNames = sampleTCAPolicyPreferences\r
-            .getMetricsPerEventName();\r
-    private final OutputEmitter<String> mockOutputEmitter = mock(OutputEmitter.class);\r
-\r
-    private class TestTCAVESAlertsAbatementFlowlet extends TCAVESAlertsAbatementFlowlet {\r
-\r
-        public TestTCAVESAlertsAbatementFlowlet(String tcaAlertsAbatementTableName) {\r
-            super(tcaAlertsAbatementTableName);\r
-            this.alertsAbatementOutputEmitter = mockOutputEmitter;\r
-            doNothing().when(mockOutputEmitter).emit(any(String.class));\r
-        }\r
-    }\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        final TCAVESAlertsAbatementFlowlet tcavesAlertsAbatementFlowlet =\r
-                new TCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-        assertFlowletNameAndDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET,\r
-                CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_DESCRIPTION_FLOWLET,\r
-                tcavesAlertsAbatementFlowlet);\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testDetermineAbatementAlertsWhenViolatedMetricsEventNameIsBlank() throws Exception {\r
-\r
-        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =\r
-                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ONSET);\r
-        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =\r
-                getMockThresholdCalculatorOutput(violatedThreshold);\r
-        when(mockThresholdCalculatorOutput.getViolatedMetricsPerEventName()).thenReturn("");\r
-\r
-        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);\r
-    }\r
-\r
-    @Test\r
-    public void testDetermineAbatementAlertsWhenControlLoopTypeIsONSET() throws Exception {\r
-\r
-        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";\r
-        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =\r
-                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-\r
-        final FlowletContext mockFlowletContext = mock(FlowletContext.class);\r
-        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);\r
-        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);\r
-        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);\r
-\r
-        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-\r
-        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ONSET);\r
-        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =\r
-                getMockThresholdCalculatorOutput(violatedThreshold);\r
-\r
-        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);\r
-        verify(mockObjectMappedTable,\r
-                times(1)).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        verify(mockOutputEmitter, times(1)).emit(any(String.class));\r
-\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testDetermineAbatementAlertsWhenControlLoopTypeIsABATEDAndNoPreviousAlertWasSent() throws Exception {\r
-\r
-        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";\r
-        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =\r
-                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-\r
-        final FlowletContext mockFlowletContext = mock(FlowletContext.class);\r
-        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);\r
-        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);\r
-        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);\r
-\r
-        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        final TCAAlertsAbatementEntity tcaAlertsAbatementEntity = mock(TCAAlertsAbatementEntity.class);\r
-        when(mockObjectMappedTable.read(any(String.class))).thenReturn(tcaAlertsAbatementEntity);\r
-        when(tcaAlertsAbatementEntity.getAbatementSentTS()).thenReturn(null);\r
-\r
-        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ABATED);\r
-        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =\r
-                getMockThresholdCalculatorOutput(violatedThreshold);\r
-\r
-        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);\r
-        verify(mockObjectMappedTable,\r
-                times(1)).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        verify(mockOutputEmitter, times(1)).emit(any(String.class));\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testDetermineAbatementAlertsWhenControlLoopTypeIsABATEDAndPreviousAlertWasAlreadySent() throws\r
-            Exception {\r
-\r
-        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";\r
-        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =\r
-                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-\r
-        final FlowletContext mockFlowletContext = mock(FlowletContext.class);\r
-        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);\r
-        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);\r
-        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);\r
-\r
-        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        final TCAAlertsAbatementEntity tcaAlertsAbatementEntity = mock(TCAAlertsAbatementEntity.class);\r
-        when(mockObjectMappedTable.read(any(String.class))).thenReturn(tcaAlertsAbatementEntity);\r
-        final long time = new Date().getTime();\r
-        when(tcaAlertsAbatementEntity.getAbatementSentTS()).thenReturn(Long.toString(time));\r
-\r
-        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ABATED);\r
-        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =\r
-                getMockThresholdCalculatorOutput(violatedThreshold);\r
-\r
-        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);\r
-        verify(mockObjectMappedTable,\r
-                times(0)).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        verify(mockOutputEmitter, times(0)).emit(any(String.class));\r
-\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testDetermineAbatementAlertsWhenControlLoopTypeIsABATEDAndNoPreviousONSETEventFound() throws\r
-            Exception {\r
-\r
-        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";\r
-        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =\r
-                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-\r
-        final FlowletContext mockFlowletContext = mock(FlowletContext.class);\r
-        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);\r
-        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);\r
-        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);\r
-\r
-        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        when(mockObjectMappedTable.read(any(String.class))).thenReturn(null);\r
-\r
-        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ABATED);\r
-        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =\r
-                getMockThresholdCalculatorOutput(violatedThreshold);\r
-\r
-        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);\r
-        verify(mockObjectMappedTable,\r
-                times(0)).write(any(String.class), any(TCAAlertsAbatementEntity.class));\r
-        verify(mockOutputEmitter, times(0)).emit(any(String.class));\r
-\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testDetermineAbatementAlertsWhenControlLoopTypeIsNotOnsetOrAbated() throws\r
-            Exception {\r
-        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =\r
-                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");\r
-        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.CONTINUE);\r
-        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =\r
-                getMockThresholdCalculatorOutput(violatedThreshold);\r
-\r
-        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);\r
-\r
-    }\r
-\r
-    private static Threshold getViolatedThreshold(final ClosedLoopEventStatus closedLoopEventStatus) {\r
-        final Threshold violatedThreshold = Threshold.copy(metricsPerEventNames.get(0).getThresholds().get(0));\r
-        violatedThreshold.setClosedLoopEventStatus(closedLoopEventStatus);\r
-        return violatedThreshold;\r
-    }\r
-\r
-\r
-    private static ThresholdCalculatorOutput getMockThresholdCalculatorOutput(final Threshold violatedThreshold) throws\r
-            Exception {\r
-\r
-        final MetricsPerEventName violatedMetricsPerEventName =\r
-                MetricsPerEventName.copy(metricsPerEventNames.get(0));\r
-        violatedMetricsPerEventName.setThresholds(ImmutableList.of(violatedThreshold));\r
-        return getMockThresholdCalculatorOutput(\r
-                fromStream(CEF_MESSAGE_JSON_FILE_LOCATION),\r
-                fromStream(TCA_POLICY_JSON_FILE_LOCATION),\r
-                TCAUtils.writeValueAsString(violatedMetricsPerEventName),\r
-                fromStream(TCA_ALERT_JSON_FILE_LOCATION)\r
-        );\r
-    }\r
-\r
-\r
-    private static ThresholdCalculatorOutput getMockThresholdCalculatorOutput(final String cefMessage,\r
-                                                                              final String tcaPolicy,\r
-                                                                              final String violatedMetricsPerEventName,\r
-                                                                              final String alertMessage) {\r
-        final ThresholdCalculatorOutput thresholdCalculatorOutput = mock(ThresholdCalculatorOutput.class);\r
-        when(thresholdCalculatorOutput.getCefMessage()).thenReturn(cefMessage);\r
-        when(thresholdCalculatorOutput.getTcaPolicy()).thenReturn(tcaPolicy);\r
-        when(thresholdCalculatorOutput.getViolatedMetricsPerEventName()).thenReturn(violatedMetricsPerEventName);\r
-        when(thresholdCalculatorOutput.getAlertMessage()).thenReturn(alertMessage);\r
-        return thresholdCalculatorOutput;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import com.google.common.collect.ImmutableList;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAAlertsAbatementEntity;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+
+import java.util.Date;
+import java.util.List;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 9/12/2017.
+ */
+@SuppressWarnings("unchecked")
+public class TCAVESAlertsAbatementFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private static final TCAPolicyPreferences sampleTCAPolicyPreferences = getSampleTCAPolicyPreferences();
+    private static final List<MetricsPerEventName> metricsPerEventNames = sampleTCAPolicyPreferences
+            .getMetricsPerEventName();
+    private final OutputEmitter<String> mockOutputEmitter = mock(OutputEmitter.class);
+
+    private class TestTCAVESAlertsAbatementFlowlet extends TCAVESAlertsAbatementFlowlet {
+
+        public TestTCAVESAlertsAbatementFlowlet(String tcaAlertsAbatementTableName) {
+            super(tcaAlertsAbatementTableName);
+            this.alertsAbatementOutputEmitter = mockOutputEmitter;
+            doNothing().when(mockOutputEmitter).emit(any(String.class));
+        }
+    }
+
+    @Test
+    public void testConfigure() throws Exception {
+        final TCAVESAlertsAbatementFlowlet tcavesAlertsAbatementFlowlet =
+                new TCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+        assertFlowletNameAndDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_NAME_FLOWLET,
+                CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_ABATEMENT_DESCRIPTION_FLOWLET,
+                tcavesAlertsAbatementFlowlet);
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testDetermineAbatementAlertsWhenViolatedMetricsEventNameIsBlank() throws Exception {
+
+        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =
+                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ONSET);
+        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =
+                getMockThresholdCalculatorOutput(violatedThreshold);
+        when(mockThresholdCalculatorOutput.getViolatedMetricsPerEventName()).thenReturn("");
+
+        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);
+    }
+
+    @Test
+    public void testDetermineAbatementAlertsWhenControlLoopTypeIsONSET() throws Exception {
+
+        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";
+        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =
+                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+
+        final FlowletContext mockFlowletContext = mock(FlowletContext.class);
+        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);
+        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);
+        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);
+
+        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+
+        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ONSET);
+        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =
+                getMockThresholdCalculatorOutput(violatedThreshold);
+
+        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);
+        verify(mockObjectMappedTable,
+                times(1)).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        verify(mockOutputEmitter, times(1)).emit(any(String.class));
+
+    }
+
+
+    @Test
+    public void testDetermineAbatementAlertsWhenControlLoopTypeIsABATEDAndNoPreviousAlertWasSent() throws Exception {
+
+        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";
+        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =
+                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+
+        final FlowletContext mockFlowletContext = mock(FlowletContext.class);
+        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);
+        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);
+        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);
+
+        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        final TCAAlertsAbatementEntity tcaAlertsAbatementEntity = mock(TCAAlertsAbatementEntity.class);
+        when(mockObjectMappedTable.read(any(String.class))).thenReturn(tcaAlertsAbatementEntity);
+        when(tcaAlertsAbatementEntity.getAbatementSentTS()).thenReturn(null);
+
+        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ABATED);
+        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =
+                getMockThresholdCalculatorOutput(violatedThreshold);
+
+        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);
+        verify(mockObjectMappedTable,
+                times(1)).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        verify(mockOutputEmitter, times(1)).emit(any(String.class));
+
+    }
+
+    @Test
+    public void testDetermineAbatementAlertsWhenControlLoopTypeIsABATEDAndPreviousAlertWasAlreadySent() throws
+            Exception {
+
+        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";
+        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =
+                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+
+        final FlowletContext mockFlowletContext = mock(FlowletContext.class);
+        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);
+        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);
+        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);
+
+        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        final TCAAlertsAbatementEntity tcaAlertsAbatementEntity = mock(TCAAlertsAbatementEntity.class);
+        when(mockObjectMappedTable.read(any(String.class))).thenReturn(tcaAlertsAbatementEntity);
+        final long time = new Date().getTime();
+        when(tcaAlertsAbatementEntity.getAbatementSentTS()).thenReturn(Long.toString(time));
+
+        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ABATED);
+        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =
+                getMockThresholdCalculatorOutput(violatedThreshold);
+
+        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);
+        verify(mockObjectMappedTable,
+                times(0)).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        verify(mockOutputEmitter, times(0)).emit(any(String.class));
+
+    }
+
+
+    @Test
+    public void testDetermineAbatementAlertsWhenControlLoopTypeIsABATEDAndNoPreviousONSETEventFound() throws
+            Exception {
+
+        final String testTCAAlertsAbatementTableName = "testTCAAlertsAbatementTableName";
+        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =
+                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+
+        final FlowletContext mockFlowletContext = mock(FlowletContext.class);
+        final ObjectMappedTable<TCAAlertsAbatementEntity> mockObjectMappedTable = mock(ObjectMappedTable.class);
+        when(mockFlowletContext.getDataset(eq(testTCAAlertsAbatementTableName))).thenReturn(mockObjectMappedTable);
+        tcaAlertsAbatementFlowlet.initialize(mockFlowletContext);
+
+        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        when(mockObjectMappedTable.read(any(String.class))).thenReturn(null);
+
+        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.ABATED);
+        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =
+                getMockThresholdCalculatorOutput(violatedThreshold);
+
+        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);
+        verify(mockObjectMappedTable,
+                times(0)).write(any(String.class), any(TCAAlertsAbatementEntity.class));
+        verify(mockOutputEmitter, times(0)).emit(any(String.class));
+
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testDetermineAbatementAlertsWhenControlLoopTypeIsNotOnsetOrAbated() throws
+            Exception {
+        final TestTCAVESAlertsAbatementFlowlet tcaAlertsAbatementFlowlet =
+                new TestTCAVESAlertsAbatementFlowlet("testTCAAlertsAbatementTableName");
+        final Threshold violatedThreshold = getViolatedThreshold(ClosedLoopEventStatus.CONTINUE);
+        final ThresholdCalculatorOutput mockThresholdCalculatorOutput =
+                getMockThresholdCalculatorOutput(violatedThreshold);
+
+        tcaAlertsAbatementFlowlet.determineAbatementAlerts(mockThresholdCalculatorOutput);
+
+    }
+
+    private static Threshold getViolatedThreshold(final ClosedLoopEventStatus closedLoopEventStatus) {
+        final Threshold violatedThreshold = Threshold.copy(metricsPerEventNames.get(0).getThresholds().get(0));
+        violatedThreshold.setClosedLoopEventStatus(closedLoopEventStatus);
+        return violatedThreshold;
+    }
+
+
+    private static ThresholdCalculatorOutput getMockThresholdCalculatorOutput(final Threshold violatedThreshold) throws
+            Exception {
+
+        final MetricsPerEventName violatedMetricsPerEventName =
+                MetricsPerEventName.copy(metricsPerEventNames.get(0));
+        violatedMetricsPerEventName.setThresholds(ImmutableList.of(violatedThreshold));
+        return getMockThresholdCalculatorOutput(
+                fromStream(CEF_MESSAGE_JSON_FILE_LOCATION),
+                fromStream(TCA_POLICY_JSON_FILE_LOCATION),
+                TCAUtils.writeValueAsString(violatedMetricsPerEventName),
+                fromStream(TCA_ALERT_JSON_FILE_LOCATION)
+        );
+    }
+
+
+    private static ThresholdCalculatorOutput getMockThresholdCalculatorOutput(final String cefMessage,
+                                                                              final String tcaPolicy,
+                                                                              final String violatedMetricsPerEventName,
+                                                                              final String alertMessage) {
+        final ThresholdCalculatorOutput thresholdCalculatorOutput = mock(ThresholdCalculatorOutput.class);
+        when(thresholdCalculatorOutput.getCefMessage()).thenReturn(cefMessage);
+        when(thresholdCalculatorOutput.getTcaPolicy()).thenReturn(tcaPolicy);
+        when(thresholdCalculatorOutput.getViolatedMetricsPerEventName()).thenReturn(violatedMetricsPerEventName);
+        when(thresholdCalculatorOutput.getAlertMessage()).thenReturn(alertMessage);
+        return thresholdCalculatorOutput;
+    }
+
+}
@@ -1,78 +1,78 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class TCAVESAlertsSinkFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        final TCAVESAlertsSinkFlowlet tcavesAlertsSinkFlowlet =\r
-                new TCAVESAlertsSinkFlowlet("testTCAVESAlertTableName");\r
-        assertFlowletNameAndDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET,\r
-                CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET, tcavesAlertsSinkFlowlet);\r
-    }\r
-\r
-    @SuppressWarnings("unchecked")\r
-    @Test\r
-    public void saveAlerts() throws Exception {\r
-\r
-        final String testAlertTableName = "testTCAVESAlertTableName";\r
-\r
-        final TCAVESAlertsSinkFlowlet tcavesAlertsSinkFlowlet = new TCAVESAlertsSinkFlowlet(testAlertTableName);\r
-\r
-        final FlowletContext mockFlowletContext = Mockito.mock(FlowletContext.class);\r
-        final ObjectMappedTable mockObjectMappedTable = Mockito.mock(ObjectMappedTable.class);\r
-        when(mockFlowletContext.getDataset(eq(testAlertTableName))).thenReturn(mockObjectMappedTable);\r
-        tcavesAlertsSinkFlowlet.initialize(mockFlowletContext);\r
-        final ObjectMappedTable tcaVESAlertsTableName =\r
-                getPrivateFiledValue(tcavesAlertsSinkFlowlet, "tcaVESAlertsTable", ObjectMappedTable.class);\r
-        assertTrue(tcaVESAlertsTableName == mockObjectMappedTable);\r
-\r
-        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAVESAlertEntity.class));\r
-        final String testAlertMessage = "testMessage";\r
-        tcavesAlertsSinkFlowlet.saveAlerts(testAlertMessage);\r
-\r
-        verify(mockObjectMappedTable,\r
-                times(1)).write(any(String.class), any(TCAVESAlertEntity.class));\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class TCAVESAlertsSinkFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+
+    @Test
+    public void testConfigure() throws Exception {
+        final TCAVESAlertsSinkFlowlet tcavesAlertsSinkFlowlet =
+                new TCAVESAlertsSinkFlowlet("testTCAVESAlertTableName");
+        assertFlowletNameAndDescription(CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET,
+                CDAPComponentsConstants.TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET, tcavesAlertsSinkFlowlet);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void saveAlerts() throws Exception {
+
+        final String testAlertTableName = "testTCAVESAlertTableName";
+
+        final TCAVESAlertsSinkFlowlet tcavesAlertsSinkFlowlet = new TCAVESAlertsSinkFlowlet(testAlertTableName);
+
+        final FlowletContext mockFlowletContext = Mockito.mock(FlowletContext.class);
+        final ObjectMappedTable mockObjectMappedTable = Mockito.mock(ObjectMappedTable.class);
+        when(mockFlowletContext.getDataset(eq(testAlertTableName))).thenReturn(mockObjectMappedTable);
+        tcavesAlertsSinkFlowlet.initialize(mockFlowletContext);
+        final ObjectMappedTable tcaVESAlertsTableName =
+                getPrivateFiledValue(tcavesAlertsSinkFlowlet, "tcaVESAlertsTable", ObjectMappedTable.class);
+        assertTrue(tcaVESAlertsTableName == mockObjectMappedTable);
+
+        doNothing().when(mockObjectMappedTable).write(any(String.class), any(TCAVESAlertEntity.class));
+        final String testAlertMessage = "testMessage";
+        tcavesAlertsSinkFlowlet.saveAlerts(testAlertMessage);
+
+        verify(mockObjectMappedTable,
+                times(1)).write(any(String.class), any(TCAVESAlertEntity.class));
+
+    }
+
+}
@@ -1,80 +1,80 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import co.cask.cdap.api.flow.flowlet.StreamEvent;\r
-import com.google.common.base.Charsets;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-import java.nio.ByteBuffer;\r
-\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/19/2016.\r
- */\r
-public class TCAVESMessageRouterFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private static final String TEST_MESSAGE = "test message";\r
-    private final OutputEmitter mockOutputEmitter = Mockito.mock(OutputEmitter.class);\r
-\r
-    private class TCATestVESMessageRouterFlowlet extends TCAVESMessageRouterFlowlet {\r
-\r
-        @SuppressWarnings("unchecked")\r
-        public TCATestVESMessageRouterFlowlet() {\r
-            this.vesMessageEmitter = mockOutputEmitter;\r
-            doNothing().when(mockOutputEmitter).emit(eq(TEST_MESSAGE),\r
-                    eq(AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY),\r
-                    eq(TEST_MESSAGE.hashCode()));\r
-        }\r
-    }\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        final TCAVESMessageRouterFlowlet tcavesMessageRouterFlowlet = new TCAVESMessageRouterFlowlet();\r
-        assertFlowletNameAndDescription(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET,\r
-                CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET, tcavesMessageRouterFlowlet);\r
-    }\r
-\r
-    @SuppressWarnings("unchecked")\r
-    @Test\r
-    public void routeVESMessage() throws Exception {\r
-        final TCATestVESMessageRouterFlowlet tcavesMessageRouterFlowlet = new TCATestVESMessageRouterFlowlet();\r
-        final StreamEvent mockStreamEvent = Mockito.mock(StreamEvent.class);\r
-        final ByteBuffer testMessage = Charsets.UTF_8.encode(TEST_MESSAGE);\r
-        when(mockStreamEvent.getBody()).thenReturn(testMessage);\r
-        tcavesMessageRouterFlowlet.routeVESMessage(mockStreamEvent);\r
-        verify(mockOutputEmitter,\r
-                times(1)).emit(eq(TEST_MESSAGE),\r
-                eq(AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY),\r
-                eq(TEST_MESSAGE.hashCode()));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import co.cask.cdap.api.flow.flowlet.StreamEvent;
+import com.google.common.base.Charsets;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+import java.nio.ByteBuffer;
+
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/19/2016.
+ */
+public class TCAVESMessageRouterFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private static final String TEST_MESSAGE = "test message";
+    private final OutputEmitter mockOutputEmitter = Mockito.mock(OutputEmitter.class);
+
+    private class TCATestVESMessageRouterFlowlet extends TCAVESMessageRouterFlowlet {
+
+        @SuppressWarnings("unchecked")
+        public TCATestVESMessageRouterFlowlet() {
+            this.vesMessageEmitter = mockOutputEmitter;
+            doNothing().when(mockOutputEmitter).emit(eq(TEST_MESSAGE),
+                    eq(AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY),
+                    eq(TEST_MESSAGE.hashCode()));
+        }
+    }
+
+    @Test
+    public void testConfigure() throws Exception {
+        final TCAVESMessageRouterFlowlet tcavesMessageRouterFlowlet = new TCAVESMessageRouterFlowlet();
+        assertFlowletNameAndDescription(CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET,
+                CDAPComponentsConstants.TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET, tcavesMessageRouterFlowlet);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void routeVESMessage() throws Exception {
+        final TCATestVESMessageRouterFlowlet tcavesMessageRouterFlowlet = new TCATestVESMessageRouterFlowlet();
+        final StreamEvent mockStreamEvent = Mockito.mock(StreamEvent.class);
+        final ByteBuffer testMessage = Charsets.UTF_8.encode(TEST_MESSAGE);
+        when(mockStreamEvent.getBody()).thenReturn(testMessage);
+        tcavesMessageRouterFlowlet.routeVESMessage(mockStreamEvent);
+        verify(mockOutputEmitter,
+                times(1)).emit(eq(TEST_MESSAGE),
+                eq(AnalyticsConstants.TCA_VES_MESSAGE_ROUTER_PARTITION_KEY),
+                eq(TEST_MESSAGE.hashCode()));
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.flowlet;\r
-\r
-import co.cask.cdap.api.app.ApplicationSpecification;\r
-import co.cask.cdap.api.dataset.lib.ObjectMappedTable;\r
-import co.cask.cdap.api.flow.flowlet.FlowletContext;\r
-import co.cask.cdap.api.flow.flowlet.OutputEmitter;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.anyInt;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/19/2016.\r
- */\r
-@SuppressWarnings("unchecked")\r
-public class TCAVESThresholdViolationCalculatorFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private static final String messageStatusTableName = "TEST_MESSAGE_STATUS_TABLE";\r
-\r
-    private TCAVESThresholdViolationCalculatorFlowlet violationCalculatorFlowlet;\r
-    private Metrics metrics;\r
-    private OutputEmitter outputEmitter;\r
-    private ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable;\r
-\r
-    private static class TCATestVESThresholdViolationCalculatorFlowlet extends\r
-            TCAVESThresholdViolationCalculatorFlowlet {\r
-        public TCATestVESThresholdViolationCalculatorFlowlet(\r
-                final String messageStatusTableName,\r
-                final OutputEmitter tcaAlertOutputEmitter,\r
-                ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable,\r
-                Metrics metrics) {\r
-            super(messageStatusTableName);\r
-            this.tcaAlertOutputEmitter = tcaAlertOutputEmitter;\r
-            this.metrics = metrics;\r
-        }\r
-    }\r
-\r
-    @Before\r
-    public void before() {\r
-        violationCalculatorFlowlet = new TCAVESThresholdViolationCalculatorFlowlet(messageStatusTableName);\r
-        vesMessageStatusTable = Mockito.mock(ObjectMappedTable.class);\r
-        outputEmitter = Mockito.mock(OutputEmitter.class);\r
-        metrics = Mockito.mock(Metrics.class);\r
-    }\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        assertFlowletNameAndDescription(\r
-                CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET,\r
-                CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET,\r
-                violationCalculatorFlowlet);\r
-    }\r
-\r
-    @Test\r
-    public void testInitialize() throws Exception {\r
-        final FlowletContext mockFlowletContext = initializeFlowlet(violationCalculatorFlowlet, vesMessageStatusTable);\r
-        verify(mockFlowletContext, times(1)).getDataset(anyString());\r
-    }\r
-\r
-    @Test\r
-    public void testFilterVESMessagesWhenVESMessageIsInApplicable() throws Exception {\r
-        final TCATestVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =\r
-                createTestViolationCalculator(vesMessageStatusTable, outputEmitter, metrics);\r
-        initializeFlowlet(thresholdViolationCalculatorFlowlet, vesMessageStatusTable);\r
-        thresholdViolationCalculatorFlowlet.filterVESMessages("inapplicable");\r
-        verify(vesMessageStatusTable, times(1)).write(anyString(),\r
-                any(TCAMessageStatusEntity.class));\r
-    }\r
-\r
-    @Test\r
-    public void testFilterVESMessagesWhenVESMessageIsCompliant() throws Exception {\r
-        final TCATestVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =\r
-                createTestViolationCalculator(vesMessageStatusTable, outputEmitter, metrics);\r
-        initializeFlowlet(thresholdViolationCalculatorFlowlet, vesMessageStatusTable);\r
-        thresholdViolationCalculatorFlowlet.filterVESMessages(getValidCEFMessage());\r
-        verify(vesMessageStatusTable, times(1)).write(anyString(),\r
-                any(TCAMessageStatusEntity.class));\r
-    }\r
-\r
-    @Test\r
-    public void testFilterVESMessagesWhenVESMessageNonCompliant() throws Exception {\r
-        final TCATestVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =\r
-                createTestViolationCalculator(vesMessageStatusTable, outputEmitter, metrics);\r
-        final FlowletContext flowletContext =\r
-                initializeFlowlet(thresholdViolationCalculatorFlowlet, vesMessageStatusTable);\r
-        final TCAPolicy policy = CDAPTCAUtils.getValidatedTCAPolicyPreferences(flowletContext);\r
-        final Threshold threshold = policy.getMetricsPerEventName().get(0).getThresholds().get(0);\r
-        final Long thresholdValue = threshold.getThresholdValue();\r
-        final EventListener thresholdViolatingMessage = getCEFEventListener();\r
-        thresholdViolatingMessage.getEvent().getMeasurementsForVfScalingFields().getVNicPerformanceArray().\r
-                get(0).setReceivedBroadcastPacketsAccumulated(thresholdValue - 1);\r
-        thresholdViolationCalculatorFlowlet.filterVESMessages(\r
-                ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(thresholdViolatingMessage));\r
-        verify(vesMessageStatusTable, times(1)).write(anyString(),\r
-                any(TCAMessageStatusEntity.class));\r
-        verify(outputEmitter, times(1)).emit(any(ThresholdCalculatorOutput.class));\r
-    }\r
-\r
-    private static TCATestVESThresholdViolationCalculatorFlowlet createTestViolationCalculator(\r
-            final ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable,\r
-            final OutputEmitter outputEmitter, final Metrics metrics) {\r
-        doNothing().when(outputEmitter).emit(anyString());\r
-        doNothing().when(metrics).count(anyString(), anyInt());\r
-        doNothing().when(vesMessageStatusTable).write(anyString(), any(TCAMessageStatusEntity.class));\r
-        return new TCATestVESThresholdViolationCalculatorFlowlet(messageStatusTableName, outputEmitter,\r
-                vesMessageStatusTable, metrics);\r
-    }\r
-\r
-    private static <T extends TCAVESThresholdViolationCalculatorFlowlet> FlowletContext initializeFlowlet(\r
-            T calculatorFlowlet, ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable) throws Exception {\r
-        final FlowletContext mockFlowletContext = getTestFlowletContextWithValidPolicy();\r
-        when(mockFlowletContext.getDataset(anyString())).thenReturn(vesMessageStatusTable);\r
-        when(mockFlowletContext.getInstanceId()).thenReturn(1);\r
-        ApplicationSpecification mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);\r
-        when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));\r
-        when(mockFlowletContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);\r
-        when(mockApplicationSpecification.getName()).thenReturn("TestTCAAppName");\r
-        try {\r
-            calculatorFlowlet.initialize(mockFlowletContext);\r
-            return mockFlowletContext;\r
-        } catch (Exception e) {\r
-            LOG.error("error while flowlet initialization");\r
-            throw new RuntimeException(e);\r
-        }\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.flowlet;
+
+import co.cask.cdap.api.app.ApplicationSpecification;
+import co.cask.cdap.api.dataset.lib.ObjectMappedTable;
+import co.cask.cdap.api.flow.flowlet.FlowletContext;
+import co.cask.cdap.api.flow.flowlet.OutputEmitter;
+import co.cask.cdap.api.metrics.Metrics;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.domain.tca.ThresholdCalculatorOutput;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAMessageStatusEntity;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.utils.CDAPTCAUtils;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/19/2016.
+ */
+@SuppressWarnings("unchecked")
+public class TCAVESThresholdViolationCalculatorFlowletTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private static final String messageStatusTableName = "TEST_MESSAGE_STATUS_TABLE";
+
+    private TCAVESThresholdViolationCalculatorFlowlet violationCalculatorFlowlet;
+    private Metrics metrics;
+    private OutputEmitter outputEmitter;
+    private ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable;
+
+    private static class TCATestVESThresholdViolationCalculatorFlowlet extends
+            TCAVESThresholdViolationCalculatorFlowlet {
+        public TCATestVESThresholdViolationCalculatorFlowlet(
+                final String messageStatusTableName,
+                final OutputEmitter tcaAlertOutputEmitter,
+                ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable,
+                Metrics metrics) {
+            super(messageStatusTableName);
+            this.tcaAlertOutputEmitter = tcaAlertOutputEmitter;
+            this.metrics = metrics;
+        }
+    }
+
+    @Before
+    public void before() {
+        violationCalculatorFlowlet = new TCAVESThresholdViolationCalculatorFlowlet(messageStatusTableName);
+        vesMessageStatusTable = Mockito.mock(ObjectMappedTable.class);
+        outputEmitter = Mockito.mock(OutputEmitter.class);
+        metrics = Mockito.mock(Metrics.class);
+    }
+
+    @Test
+    public void testConfigure() throws Exception {
+        assertFlowletNameAndDescription(
+                CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET,
+                CDAPComponentsConstants.TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET,
+                violationCalculatorFlowlet);
+    }
+
+    @Test
+    public void testInitialize() throws Exception {
+        final FlowletContext mockFlowletContext = initializeFlowlet(violationCalculatorFlowlet, vesMessageStatusTable);
+        verify(mockFlowletContext, times(1)).getDataset(anyString());
+    }
+
+    @Test
+    public void testFilterVESMessagesWhenVESMessageIsInApplicable() throws Exception {
+        final TCATestVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =
+                createTestViolationCalculator(vesMessageStatusTable, outputEmitter, metrics);
+        initializeFlowlet(thresholdViolationCalculatorFlowlet, vesMessageStatusTable);
+        thresholdViolationCalculatorFlowlet.filterVESMessages("inapplicable");
+        verify(vesMessageStatusTable, times(1)).write(anyString(),
+                any(TCAMessageStatusEntity.class));
+    }
+
+    @Test
+    public void testFilterVESMessagesWhenVESMessageIsCompliant() throws Exception {
+        final TCATestVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =
+                createTestViolationCalculator(vesMessageStatusTable, outputEmitter, metrics);
+        initializeFlowlet(thresholdViolationCalculatorFlowlet, vesMessageStatusTable);
+        thresholdViolationCalculatorFlowlet.filterVESMessages(getValidCEFMessage());
+        verify(vesMessageStatusTable, times(1)).write(anyString(),
+                any(TCAMessageStatusEntity.class));
+    }
+
+    @Test
+    public void testFilterVESMessagesWhenVESMessageNonCompliant() throws Exception {
+        final TCATestVESThresholdViolationCalculatorFlowlet thresholdViolationCalculatorFlowlet =
+                createTestViolationCalculator(vesMessageStatusTable, outputEmitter, metrics);
+        final FlowletContext flowletContext =
+                initializeFlowlet(thresholdViolationCalculatorFlowlet, vesMessageStatusTable);
+        final TCAPolicy policy = CDAPTCAUtils.getValidatedTCAPolicyPreferences(flowletContext);
+        final Threshold threshold = policy.getMetricsPerEventName().get(0).getThresholds().get(0);
+        final Long thresholdValue = threshold.getThresholdValue();
+        final EventListener thresholdViolatingMessage = getCEFEventListener();
+        thresholdViolatingMessage.getEvent().getMeasurementsForVfScalingFields().getVNicPerformanceArray().
+                get(0).setReceivedBroadcastPacketsAccumulated(thresholdValue - 1);
+        thresholdViolationCalculatorFlowlet.filterVESMessages(
+                ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(thresholdViolatingMessage));
+        verify(vesMessageStatusTable, times(1)).write(anyString(),
+                any(TCAMessageStatusEntity.class));
+        verify(outputEmitter, times(1)).emit(any(ThresholdCalculatorOutput.class));
+    }
+
+    private static TCATestVESThresholdViolationCalculatorFlowlet createTestViolationCalculator(
+            final ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable,
+            final OutputEmitter outputEmitter, final Metrics metrics) {
+        doNothing().when(outputEmitter).emit(anyString());
+        doNothing().when(metrics).count(anyString(), anyInt());
+        doNothing().when(vesMessageStatusTable).write(anyString(), any(TCAMessageStatusEntity.class));
+        return new TCATestVESThresholdViolationCalculatorFlowlet(messageStatusTableName, outputEmitter,
+                vesMessageStatusTable, metrics);
+    }
+
+    private static <T extends TCAVESThresholdViolationCalculatorFlowlet> FlowletContext initializeFlowlet(
+            T calculatorFlowlet, ObjectMappedTable<TCAMessageStatusEntity> vesMessageStatusTable) throws Exception {
+        final FlowletContext mockFlowletContext = getTestFlowletContextWithValidPolicy();
+        when(mockFlowletContext.getDataset(anyString())).thenReturn(vesMessageStatusTable);
+        when(mockFlowletContext.getInstanceId()).thenReturn(1);
+        ApplicationSpecification mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);
+        when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));
+        when(mockFlowletContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);
+        when(mockApplicationSpecification.getName()).thenReturn("TestTCAAppName");
+        try {
+            calculatorFlowlet.initialize(mockFlowletContext);
+            return mockFlowletContext;
+        } catch (Exception e) {
+            LOG.error("error while flowlet initialization");
+            throw new RuntimeException(e);
+        }
+    }
+
+}
@@ -1,52 +1,52 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.it;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAIT;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfigHolder;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/25/2016.\r
- */\r
-public class TCAnalyticsAppConfigIT extends BaseAnalyticsCDAPTCAIT {\r
-\r
-\r
-    @Test\r
-    public void createTestAppConfigJson() throws Exception {\r
-        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();\r
-        final TCATestAppConfigHolder appConfigHolder = new TCATestAppConfigHolder(tcaTestAppConfig);\r
-        final String appConfigJson = serializeModelToJson(appConfigHolder);\r
-        LOG.info("AppConfigJson: \n{}", appConfigJson);\r
-        writeToOutputTextFile("appSettings/tca_app_config.json", appConfigJson, TCAnalyticsAppConfigIT.class);\r
-    }\r
-\r
-    @Test\r
-    public void createTestAppPreferencesJson() throws Exception {\r
-        final TCATestAppPreferences tcaTestAppPreferences = getTCATestAppPreferences();\r
-        final String appPreferencesJson = serializeModelToJson(tcaTestAppPreferences);\r
-        LOG.info("AppPreferences: \n{}", appPreferencesJson);\r
-        writeToOutputTextFile("appSettings/tca_app_preferences.json",\r
-                appPreferencesJson, TCAnalyticsAppConfigIT.class);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.it;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAIT;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfigHolder;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/25/2016.
+ */
+public class TCAnalyticsAppConfigIT extends BaseAnalyticsCDAPTCAIT {
+
+
+    @Test
+    public void createTestAppConfigJson() throws Exception {
+        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();
+        final TCATestAppConfigHolder appConfigHolder = new TCATestAppConfigHolder(tcaTestAppConfig);
+        final String appConfigJson = serializeModelToJson(appConfigHolder);
+        LOG.info("AppConfigJson: \n{}", appConfigJson);
+        writeToOutputTextFile("appSettings/tca_app_config.json", appConfigJson, TCAnalyticsAppConfigIT.class);
+    }
+
+    @Test
+    public void createTestAppPreferencesJson() throws Exception {
+        final TCATestAppPreferences tcaTestAppPreferences = getTCATestAppPreferences();
+        final String appPreferencesJson = serializeModelToJson(tcaTestAppPreferences);
+        LOG.info("AppPreferences: \n{}", appPreferencesJson);
+        writeToOutputTextFile("appSettings/tca_app_preferences.json",
+                appPreferencesJson, TCAnalyticsAppConfigIT.class);
+    }
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-/**\r
- * TCA Test App Config is used for testing purposes only\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class TCATestAppConfig extends TCAAppConfig {\r
-\r
-    public void setAppName(String appName) {\r
-        this.appName = appName;\r
-    }\r
-\r
-    public void setAppDescription(String appDescription) {\r
-        this.appDescription = appDescription;\r
-    }\r
-\r
-    public void setTcaSubscriberOutputStreamName(String tcaSubscriberOutputStreamName) {\r
-        this.tcaSubscriberOutputStreamName = tcaSubscriberOutputStreamName;\r
-    }\r
-\r
-    public void setThresholdCalculatorFlowletInstances(Integer thresholdCalculatorFlowletInstances) {\r
-        this.thresholdCalculatorFlowletInstances = thresholdCalculatorFlowletInstances;\r
-    }\r
-\r
-    public void setTcaVESMessageStatusTableName(String tcaVESMessageStatusTableName) {\r
-        this.tcaVESMessageStatusTableName = tcaVESMessageStatusTableName;\r
-    }\r
-\r
-    public void setTcaVESMessageStatusTableTTLSeconds(Integer tcaVESMessageStatusTableTTLSeconds) {\r
-        this.tcaVESMessageStatusTableTTLSeconds = tcaVESMessageStatusTableTTLSeconds;\r
-    }\r
-\r
-    public void setTcaVESAlertsTableName(String tcaVESAlertsTableName) {\r
-        this.tcaVESAlertsTableName = tcaVESAlertsTableName;\r
-    }\r
-\r
-    public void setTcaVESAlertsTableTTLSeconds(Integer tcaVESAlertsTableTTLSeconds) {\r
-        this.tcaVESAlertsTableTTLSeconds = tcaVESAlertsTableTTLSeconds;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+/**
+ * TCA Test App Config is used for testing purposes only
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class TCATestAppConfig extends TCAAppConfig {
+
+    public void setAppName(String appName) {
+        this.appName = appName;
+    }
+
+    public void setAppDescription(String appDescription) {
+        this.appDescription = appDescription;
+    }
+
+    public void setTcaSubscriberOutputStreamName(String tcaSubscriberOutputStreamName) {
+        this.tcaSubscriberOutputStreamName = tcaSubscriberOutputStreamName;
+    }
+
+    public void setThresholdCalculatorFlowletInstances(Integer thresholdCalculatorFlowletInstances) {
+        this.thresholdCalculatorFlowletInstances = thresholdCalculatorFlowletInstances;
+    }
+
+    public void setTcaVESMessageStatusTableName(String tcaVESMessageStatusTableName) {
+        this.tcaVESMessageStatusTableName = tcaVESMessageStatusTableName;
+    }
+
+    public void setTcaVESMessageStatusTableTTLSeconds(Integer tcaVESMessageStatusTableTTLSeconds) {
+        this.tcaVESMessageStatusTableTTLSeconds = tcaVESMessageStatusTableTTLSeconds;
+    }
+
+    public void setTcaVESAlertsTableName(String tcaVESAlertsTableName) {
+        this.tcaVESAlertsTableName = tcaVESAlertsTableName;
+    }
+
+    public void setTcaVESAlertsTableTTLSeconds(Integer tcaVESAlertsTableTTLSeconds) {
+        this.tcaVESAlertsTableTTLSeconds = tcaVESAlertsTableTTLSeconds;
+    }
+
+}
@@ -1,40 +1,40 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-/**\r
- * Holder for TCA Test App Config\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class TCATestAppConfigHolder {\r
-\r
-    private final TCATestAppConfig config;\r
-\r
-    public TCATestAppConfigHolder(TCATestAppConfig config) {\r
-        this.config = config;\r
-    }\r
-\r
-    public TCATestAppConfig getConfig() {\r
-        return config;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+/**
+ * Holder for TCA Test App Config
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class TCATestAppConfigHolder {
+
+    private final TCATestAppConfig config;
+
+    public TCATestAppConfigHolder(TCATestAppConfig config) {
+        this.config = config;
+    }
+
+    public TCATestAppConfig getConfig() {
+        return config;
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-\r
-import com.fasterxml.jackson.annotation.JsonAnyGetter;\r
-\r
-import java.util.Map;\r
-\r
-/**\r
- * TCA Test App Preferences are used for testing purposes only\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class TCATestAppPreferences extends TCAAppPreferences {\r
-\r
-    private Map<String, String> policyPreferences;\r
-\r
-    public TCATestAppPreferences() {\r
-    }\r
-\r
-    public TCATestAppPreferences(final Map<String, String> policyPreferences) {\r
-        this.policyPreferences = policyPreferences;\r
-    }\r
-\r
-    @JsonAnyGetter\r
-    public Map<String, String> getPolicyPreferences() {\r
-        return policyPreferences;\r
-    }\r
-\r
-    public void setSubscriberHostName(String subscriberHostName) {\r
-        this.subscriberHostName = subscriberHostName;\r
-    }\r
-\r
-    public void setSubscriberHostPortNumber(Integer subscriberHostPort) {\r
-        this.subscriberHostPort = subscriberHostPort;\r
-    }\r
-\r
-    public void setSubscriberTopicName(String subscriberTopicName) {\r
-        this.subscriberTopicName = subscriberTopicName;\r
-    }\r
-\r
-    public void setSubscriberProtocol(String subscriberProtocol) {\r
-        this.subscriberProtocol = subscriberProtocol;\r
-    }\r
-\r
-    public void setSubscriberUserName(String subscriberUserName) {\r
-        this.subscriberUserName = subscriberUserName;\r
-    }\r
-\r
-    public void setSubscriberUserPassword(String subscriberUserPassword) {\r
-        this.subscriberUserPassword = subscriberUserPassword;\r
-    }\r
-\r
-    public void setSubscriberContentType(String subscriberContentType) {\r
-        this.subscriberContentType = subscriberContentType;\r
-    }\r
-\r
-    public void setSubscriberConsumerId(String subscriberConsumerId) {\r
-        this.subscriberConsumerId = subscriberConsumerId;\r
-    }\r
-\r
-    public void setSubscriberConsumerGroup(String subscriberConsumerGroup) {\r
-        this.subscriberConsumerGroup = subscriberConsumerGroup;\r
-    }\r
-\r
-    public void setSubscriberTimeoutMS(Integer subscriberTimeoutMS) {\r
-        this.subscriberTimeoutMS = subscriberTimeoutMS;\r
-    }\r
-\r
-    public void setSubscriberMessageLimit(Integer subscriberMessageLimit) {\r
-        this.subscriberMessageLimit = subscriberMessageLimit;\r
-    }\r
-\r
-    public void setSubscriberPollingInterval(Integer subscriberPollingInterval) {\r
-        this.subscriberPollingInterval = subscriberPollingInterval;\r
-    }\r
-\r
-    public void setPublisherHostName(String publisherHostName) {\r
-        this.publisherHostName = publisherHostName;\r
-    }\r
-\r
-    public void setPublisherHostPort(Integer publisherHostPort) {\r
-        this.publisherHostPort = publisherHostPort;\r
-    }\r
-\r
-    public void setPublisherTopicName(String publisherTopicName) {\r
-        this.publisherTopicName = publisherTopicName;\r
-    }\r
-\r
-    public void setPublisherProtocol(String publisherProtocol) {\r
-        this.publisherProtocol = publisherProtocol;\r
-    }\r
-\r
-    public void setPublisherUserName(String publisherUserName) {\r
-        this.publisherUserName = publisherUserName;\r
-    }\r
-\r
-    public void setPublisherUserPassword(String publisherUserPassword) {\r
-        this.publisherUserPassword = publisherUserPassword;\r
-    }\r
-\r
-    public void setPublisherContentType(String publisherContentType) {\r
-        this.publisherContentType = publisherContentType;\r
-    }\r
-\r
-    public void setPublisherMaxBatchSize(Integer publisherMaxBatchSize) {\r
-        this.publisherMaxBatchSize = publisherMaxBatchSize;\r
-    }\r
-\r
-    public void setPublisherMaxRecoveryQueueSize(Integer publisherMaxRecoveryQueueSize) {\r
-        this.publisherMaxRecoveryQueueSize = publisherMaxRecoveryQueueSize;\r
-    }\r
-\r
-    public void setPublisherPollingInterval(Integer publisherPollingInterval) {\r
-        this.publisherPollingInterval = publisherPollingInterval;\r
-    }\r
-\r
-    public void setEnableAlertCEFFormat(Boolean enableAlertCEFFormat) {\r
-        this.enableAlertCEFFormat = enableAlertCEFFormat;\r
-    }\r
-\r
-    public void setEnableAAIEnrichment(Boolean enableAAIEnrichment) {\r
-        this.enableAAIEnrichment = enableAAIEnrichment;\r
-    }\r
-\r
-    public void setAaiEnrichmentHost(String aaiEnrichmentHost) {\r
-        this.aaiEnrichmentHost = aaiEnrichmentHost;\r
-    }\r
-\r
-    public void setAaiEnrichmentPortNumber(Integer aaiEnrichmentPortNumber) {\r
-        this.aaiEnrichmentPortNumber = aaiEnrichmentPortNumber;\r
-    }\r
-\r
-    public void setAaiEnrichmentProtocol(String aaiEnrichmentProtocol) {\r
-        this.aaiEnrichmentProtocol = aaiEnrichmentProtocol;\r
-    }\r
-\r
-    public void setAaiEnrichmentUserName(String aaiEnrichmentUserName) {\r
-        this.aaiEnrichmentUserName = aaiEnrichmentUserName;\r
-    }\r
-\r
-    public void setAaiEnrichmentUserPassword(String aaiEnrichmentUserPassword) {\r
-        this.aaiEnrichmentUserPassword = aaiEnrichmentUserPassword;\r
-    }\r
-\r
-    public void setAaiEnrichmentIgnoreSSLCertificateErrors(Boolean aaiEnrichmentIgnoreSSLCertificateErrors) {\r
-        this.aaiEnrichmentIgnoreSSLCertificateErrors = aaiEnrichmentIgnoreSSLCertificateErrors;\r
-    }\r
-\r
-    public void setAaiVNFEnrichmentAPIPath(String aaiVNFEnrichmentAPIPath) {\r
-        this.aaiVNFEnrichmentAPIPath = aaiVNFEnrichmentAPIPath;\r
-    }\r
-\r
-    public void setAaiVMEnrichmentAPIPath(String aaiVMEnrichmentAPIPath) {\r
-        this.aaiVMEnrichmentAPIPath = aaiVMEnrichmentAPIPath;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+
+import java.util.Map;
+
+/**
+ * TCA Test App Preferences are used for testing purposes only
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class TCATestAppPreferences extends TCAAppPreferences {
+
+    private Map<String, String> policyPreferences;
+
+    public TCATestAppPreferences() {
+    }
+
+    public TCATestAppPreferences(final Map<String, String> policyPreferences) {
+        this.policyPreferences = policyPreferences;
+    }
+
+    @JsonAnyGetter
+    public Map<String, String> getPolicyPreferences() {
+        return policyPreferences;
+    }
+
+    public void setSubscriberHostName(String subscriberHostName) {
+        this.subscriberHostName = subscriberHostName;
+    }
+
+    public void setSubscriberHostPortNumber(Integer subscriberHostPort) {
+        this.subscriberHostPort = subscriberHostPort;
+    }
+
+    public void setSubscriberTopicName(String subscriberTopicName) {
+        this.subscriberTopicName = subscriberTopicName;
+    }
+
+    public void setSubscriberProtocol(String subscriberProtocol) {
+        this.subscriberProtocol = subscriberProtocol;
+    }
+
+    public void setSubscriberUserName(String subscriberUserName) {
+        this.subscriberUserName = subscriberUserName;
+    }
+
+    public void setSubscriberUserPassword(String subscriberUserPassword) {
+        this.subscriberUserPassword = subscriberUserPassword;
+    }
+
+    public void setSubscriberContentType(String subscriberContentType) {
+        this.subscriberContentType = subscriberContentType;
+    }
+
+    public void setSubscriberConsumerId(String subscriberConsumerId) {
+        this.subscriberConsumerId = subscriberConsumerId;
+    }
+
+    public void setSubscriberConsumerGroup(String subscriberConsumerGroup) {
+        this.subscriberConsumerGroup = subscriberConsumerGroup;
+    }
+
+    public void setSubscriberTimeoutMS(Integer subscriberTimeoutMS) {
+        this.subscriberTimeoutMS = subscriberTimeoutMS;
+    }
+
+    public void setSubscriberMessageLimit(Integer subscriberMessageLimit) {
+        this.subscriberMessageLimit = subscriberMessageLimit;
+    }
+
+    public void setSubscriberPollingInterval(Integer subscriberPollingInterval) {
+        this.subscriberPollingInterval = subscriberPollingInterval;
+    }
+
+    public void setPublisherHostName(String publisherHostName) {
+        this.publisherHostName = publisherHostName;
+    }
+
+    public void setPublisherHostPort(Integer publisherHostPort) {
+        this.publisherHostPort = publisherHostPort;
+    }
+
+    public void setPublisherTopicName(String publisherTopicName) {
+        this.publisherTopicName = publisherTopicName;
+    }
+
+    public void setPublisherProtocol(String publisherProtocol) {
+        this.publisherProtocol = publisherProtocol;
+    }
+
+    public void setPublisherUserName(String publisherUserName) {
+        this.publisherUserName = publisherUserName;
+    }
+
+    public void setPublisherUserPassword(String publisherUserPassword) {
+        this.publisherUserPassword = publisherUserPassword;
+    }
+
+    public void setPublisherContentType(String publisherContentType) {
+        this.publisherContentType = publisherContentType;
+    }
+
+    public void setPublisherMaxBatchSize(Integer publisherMaxBatchSize) {
+        this.publisherMaxBatchSize = publisherMaxBatchSize;
+    }
+
+    public void setPublisherMaxRecoveryQueueSize(Integer publisherMaxRecoveryQueueSize) {
+        this.publisherMaxRecoveryQueueSize = publisherMaxRecoveryQueueSize;
+    }
+
+    public void setPublisherPollingInterval(Integer publisherPollingInterval) {
+        this.publisherPollingInterval = publisherPollingInterval;
+    }
+
+    public void setEnableAlertCEFFormat(Boolean enableAlertCEFFormat) {
+        this.enableAlertCEFFormat = enableAlertCEFFormat;
+    }
+
+    public void setEnableAAIEnrichment(Boolean enableAAIEnrichment) {
+        this.enableAAIEnrichment = enableAAIEnrichment;
+    }
+
+    public void setAaiEnrichmentHost(String aaiEnrichmentHost) {
+        this.aaiEnrichmentHost = aaiEnrichmentHost;
+    }
+
+    public void setAaiEnrichmentPortNumber(Integer aaiEnrichmentPortNumber) {
+        this.aaiEnrichmentPortNumber = aaiEnrichmentPortNumber;
+    }
+
+    public void setAaiEnrichmentProtocol(String aaiEnrichmentProtocol) {
+        this.aaiEnrichmentProtocol = aaiEnrichmentProtocol;
+    }
+
+    public void setAaiEnrichmentUserName(String aaiEnrichmentUserName) {
+        this.aaiEnrichmentUserName = aaiEnrichmentUserName;
+    }
+
+    public void setAaiEnrichmentUserPassword(String aaiEnrichmentUserPassword) {
+        this.aaiEnrichmentUserPassword = aaiEnrichmentUserPassword;
+    }
+
+    public void setAaiEnrichmentIgnoreSSLCertificateErrors(Boolean aaiEnrichmentIgnoreSSLCertificateErrors) {
+        this.aaiEnrichmentIgnoreSSLCertificateErrors = aaiEnrichmentIgnoreSSLCertificateErrors;
+    }
+
+    public void setAaiVNFEnrichmentAPIPath(String aaiVNFEnrichmentAPIPath) {
+        this.aaiVNFEnrichmentAPIPath = aaiVNFEnrichmentAPIPath;
+    }
+
+    public void setAaiVMEnrichmentAPIPath(String aaiVMEnrichmentAPIPath) {
+        this.aaiVMEnrichmentAPIPath = aaiVMEnrichmentAPIPath;
+    }
+}
@@ -1,41 +1,41 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class TCATestAppPreferencesTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    @Test\r
-    public void testToString() throws Exception {\r
-        final TCATestAppPreferences tcaTestAppPreferences = getTCATestAppPreferences();\r
-        assertTrue(tcaTestAppPreferences.toString().contains("subscriberHostName"));\r
-        assertTrue(tcaTestAppPreferences.toString().contains("subscriberHostPort"));\r
-        assertTrue(tcaTestAppPreferences.toString().contains("publisherHostName"));\r
-        assertTrue(tcaTestAppPreferences.toString().contains("publisherHostPort"));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.settings;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class TCATestAppPreferencesTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    @Test
+    public void testToString() throws Exception {
+        final TCATestAppPreferences tcaTestAppPreferences = getTCATestAppPreferences();
+        assertTrue(tcaTestAppPreferences.toString().contains("subscriberHostName"));
+        assertTrue(tcaTestAppPreferences.toString().contains("subscriberHostPort"));
+        assertTrue(tcaTestAppPreferences.toString().contains("publisherHostName"));
+        assertTrue(tcaTestAppPreferences.toString().contains("publisherHostPort"));
+    }
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.utils;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Manjesh Gowda. Creation Date: 11/21/2016.\r
- */\r
-public class AppPreferencesToPublisherConfigMapperTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-    @Test\r
-    public void testMapTCAConfigToPublisherConfigFunctionGood() {\r
-        DMaaPMRPublisherConfig dMaaPMRPublisherConfig =\r
-                (new AppPreferencesToPublisherConfigMapper()).apply(getTCATestAppPreferences());\r
-        assertEquals(dMaaPMRPublisherConfig.getHostName(), "PUBLISHER_HOST_NAME");\r
-    }\r
-\r
-    @Test\r
-    public void testMapTCAConfigToPublisherConfigFunctionMap() {\r
-        DMaaPMRPublisherConfig dMaaPMRPublisherConfig = AppPreferencesToPublisherConfigMapper.map(\r
-                getTCATestAppPreferences());\r
-        assertEquals(dMaaPMRPublisherConfig.getHostName(), "PUBLISHER_HOST_NAME");\r
-    }\r
-\r
-    @Test\r
-    public void testMapTCAConfigToPublisherConfigFunction() {\r
-        final TCATestAppPreferences tcaAppPreferences = new TCATestAppPreferences();\r
-        final String publisherHostName = "publisherHostName";\r
-        final String publisherTopicName = "publisherTopicName";\r
-        tcaAppPreferences.setPublisherHostName(publisherHostName);\r
-        tcaAppPreferences.setPublisherTopicName(publisherTopicName);\r
-        DMaaPMRPublisherConfig dMaaPMRPublisherConfig =\r
-                (new AppPreferencesToPublisherConfigMapper()).apply(tcaAppPreferences);\r
-        assertTrue(publisherHostName.equals(dMaaPMRPublisherConfig.getHostName()));\r
-        assertTrue(publisherTopicName.equals(dMaaPMRPublisherConfig.getTopicName()));\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.utils;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Manjesh Gowda. Creation Date: 11/21/2016.
+ */
+public class AppPreferencesToPublisherConfigMapperTest extends BaseAnalyticsCDAPTCAUnitTest {
+    @Test
+    public void testMapTCAConfigToPublisherConfigFunctionGood() {
+        DMaaPMRPublisherConfig dMaaPMRPublisherConfig =
+                (new AppPreferencesToPublisherConfigMapper()).apply(getTCATestAppPreferences());
+        assertEquals(dMaaPMRPublisherConfig.getHostName(), "PUBLISHER_HOST_NAME");
+    }
+
+    @Test
+    public void testMapTCAConfigToPublisherConfigFunctionMap() {
+        DMaaPMRPublisherConfig dMaaPMRPublisherConfig = AppPreferencesToPublisherConfigMapper.map(
+                getTCATestAppPreferences());
+        assertEquals(dMaaPMRPublisherConfig.getHostName(), "PUBLISHER_HOST_NAME");
+    }
+
+    @Test
+    public void testMapTCAConfigToPublisherConfigFunction() {
+        final TCATestAppPreferences tcaAppPreferences = new TCATestAppPreferences();
+        final String publisherHostName = "publisherHostName";
+        final String publisherTopicName = "publisherTopicName";
+        tcaAppPreferences.setPublisherHostName(publisherHostName);
+        tcaAppPreferences.setPublisherTopicName(publisherTopicName);
+        DMaaPMRPublisherConfig dMaaPMRPublisherConfig =
+                (new AppPreferencesToPublisherConfigMapper()).apply(tcaAppPreferences);
+        assertTrue(publisherHostName.equals(dMaaPMRPublisherConfig.getHostName()));
+        assertTrue(publisherTopicName.equals(dMaaPMRPublisherConfig.getTopicName()));
+
+    }
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.utils;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Manjesh Gowda. Creation Date: 11/21/2016.\r
- */\r
-public class AppPreferencesToSubscriberConfigMapperTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    @Test\r
-    public void testMapTCAConfigToSubscriberConfigFunctionGood() {\r
-        DMaaPMRSubscriberConfig dMaaPMRSubscriberConfig =\r
-                (new AppPreferencesToSubscriberConfigMapper()).apply(getTCATestAppPreferences());\r
-        assertEquals(dMaaPMRSubscriberConfig.getHostName(), "SUBSCRIBER_HOST_NAME");\r
-    }\r
-\r
-    @Test\r
-    public void testMapTCAConfigToSubscriberConfigFunctionMap() {\r
-        DMaaPMRSubscriberConfig dMaaPMRSubscriberConfig =\r
-                AppPreferencesToSubscriberConfigMapper.map(getTCATestAppPreferences());\r
-        assertEquals(dMaaPMRSubscriberConfig.getHostName(), "SUBSCRIBER_HOST_NAME");\r
-    }\r
-\r
-    @Test\r
-    public void testMapTCAConfigToSubscriberConfigFunction() {\r
-        final TCATestAppPreferences tcaAppPreferences = new TCATestAppPreferences();\r
-        final String subscriberHostname = "subscriberHostname";\r
-        tcaAppPreferences.setSubscriberHostName(subscriberHostname);\r
-        final String subscriberTopicName = "subscriberTopicName";\r
-        tcaAppPreferences.setSubscriberTopicName(subscriberTopicName);\r
-        DMaaPMRSubscriberConfig dMaaPMRSubscriberConfig =\r
-                (new AppPreferencesToSubscriberConfigMapper()).apply(tcaAppPreferences);\r
-        assertTrue(subscriberHostname.equals(dMaaPMRSubscriberConfig.getHostName()));\r
-        assertTrue(subscriberTopicName.equals(dMaaPMRSubscriberConfig.getTopicName()));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.utils;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Manjesh Gowda. Creation Date: 11/21/2016.
+ */
+public class AppPreferencesToSubscriberConfigMapperTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    @Test
+    public void testMapTCAConfigToSubscriberConfigFunctionGood() {
+        DMaaPMRSubscriberConfig dMaaPMRSubscriberConfig =
+                (new AppPreferencesToSubscriberConfigMapper()).apply(getTCATestAppPreferences());
+        assertEquals(dMaaPMRSubscriberConfig.getHostName(), "SUBSCRIBER_HOST_NAME");
+    }
+
+    @Test
+    public void testMapTCAConfigToSubscriberConfigFunctionMap() {
+        DMaaPMRSubscriberConfig dMaaPMRSubscriberConfig =
+                AppPreferencesToSubscriberConfigMapper.map(getTCATestAppPreferences());
+        assertEquals(dMaaPMRSubscriberConfig.getHostName(), "SUBSCRIBER_HOST_NAME");
+    }
+
+    @Test
+    public void testMapTCAConfigToSubscriberConfigFunction() {
+        final TCATestAppPreferences tcaAppPreferences = new TCATestAppPreferences();
+        final String subscriberHostname = "subscriberHostname";
+        tcaAppPreferences.setSubscriberHostName(subscriberHostname);
+        final String subscriberTopicName = "subscriberTopicName";
+        tcaAppPreferences.setSubscriberTopicName(subscriberTopicName);
+        DMaaPMRSubscriberConfig dMaaPMRSubscriberConfig =
+                (new AppPreferencesToSubscriberConfigMapper()).apply(tcaAppPreferences);
+        assertTrue(subscriberHostname.equals(dMaaPMRSubscriberConfig.getHostName()));
+        assertTrue(subscriberTopicName.equals(dMaaPMRSubscriberConfig.getTopicName()));
+    }
+}
@@ -1,80 +1,80 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.utils;\r
-\r
-import co.cask.cdap.api.RuntimeContext;\r
-import co.cask.cdap.api.app.ApplicationSpecification;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-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
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class CDAPTCAUtilsTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    @Test\r
-    public void testGetValidatedTCAAppPreferences() throws Exception {\r
-        RuntimeContext runtimeContext = mock(RuntimeContext.class);\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
-        TCAAppPreferences validatedTCAAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(runtimeContext);\r
-        assertEquals(validatedTCAAppPreferences.getSubscriberHostName(), "HOSTNAME");\r
-    }\r
-\r
-    @Test\r
-    public void testConvertRuntimeContextToTCAPolicy() throws Exception {\r
-\r
-        final TCAPolicy tcaPolicy =\r
-                CDAPTCAUtils.getValidatedTCAPolicyPreferences(getTestFlowletContextWithValidPolicy());\r
-        assertThat("Policy Domain must be measurementsForVfScaling",\r
-                tcaPolicy.getDomain(), is("measurementsForVfScaling"));\r
-        assertThat("Policy must have 2 metrics per functional roles",\r
-                tcaPolicy.getMetricsPerEventName().size(), is(2));\r
-    }\r
-\r
-    @Test\r
-    public void testConvertRuntimeContextToTCAPolicyFromJSON() throws Exception {\r
-\r
-        final TCAPolicy tcaPolicy =\r
-                CDAPTCAUtils.getValidatedTCAPolicyPreferences(getTestFlowletContextWithValidPolicyFromJSON());\r
-        assertThat("Policy Domain must be measurementsForVfScaling",\r
-                tcaPolicy.getDomain(), is("measurementsForVfScaling"));\r
-        assertThat("Policy must have 2 metrics per functional roles",\r
-                tcaPolicy.getMetricsPerEventName().size(), is(2));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.utils;
+
+import co.cask.cdap.api.RuntimeContext;
+import co.cask.cdap.api.app.ApplicationSpecification;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.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;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class CDAPTCAUtilsTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    @Test
+    public void testGetValidatedTCAAppPreferences() throws Exception {
+        RuntimeContext runtimeContext = mock(RuntimeContext.class);
+        final Map<String, String> 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);
+        TCAAppPreferences validatedTCAAppPreferences = CDAPTCAUtils.getValidatedTCAAppPreferences(runtimeContext);
+        assertEquals(validatedTCAAppPreferences.getSubscriberHostName(), "HOSTNAME");
+    }
+
+    @Test
+    public void testConvertRuntimeContextToTCAPolicy() throws Exception {
+
+        final TCAPolicy tcaPolicy =
+                CDAPTCAUtils.getValidatedTCAPolicyPreferences(getTestFlowletContextWithValidPolicy());
+        assertThat("Policy Domain must be measurementsForVfScaling",
+                tcaPolicy.getDomain(), is("measurementsForVfScaling"));
+        assertThat("Policy must have 2 metrics per functional roles",
+                tcaPolicy.getMetricsPerEventName().size(), is(2));
+    }
+
+    @Test
+    public void testConvertRuntimeContextToTCAPolicyFromJSON() throws Exception {
+
+        final TCAPolicy tcaPolicy =
+                CDAPTCAUtils.getValidatedTCAPolicyPreferences(getTestFlowletContextWithValidPolicyFromJSON());
+        assertThat("Policy Domain must be measurementsForVfScaling",
+                tcaPolicy.getDomain(), is("measurementsForVfScaling"));
+        assertThat("Policy must have 2 metrics per functional roles",
+                tcaPolicy.getMetricsPerEventName().size(), is(2));
+    }
+
+}
@@ -1,77 +1,77 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.validator;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class TCAAppConfigValidatorTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-\r
-    @Test\r
-    public void validateAppSettingsWhenAppConfigIsValid() throws Exception {\r
-        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();\r
-        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();\r
-        final GenericValidationResponse<TCAAppConfig> validationResponse =\r
-                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void testWhenSubscriberOutputStreamIsNull() throws Exception {\r
-        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();\r
-        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();\r
-        tcaTestAppConfig.setTcaSubscriberOutputStreamName(null);\r
-        final GenericValidationResponse<TCAAppConfig> validationResponse =\r
-                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void testWhenVESMessageStatusTableNameIsNull() throws Exception {\r
-        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();\r
-        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();\r
-        tcaTestAppConfig.setTcaVESMessageStatusTableName(null);\r
-        final GenericValidationResponse<TCAAppConfig> validationResponse =\r
-                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void testWhenVESAlertsTableNameIsNull() throws Exception {\r
-        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();\r
-        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();\r
-        tcaTestAppConfig.setTcaVESAlertsTableName(null);\r
-        final GenericValidationResponse<TCAAppConfig> validationResponse =\r
-                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);\r
-        assertTrue(validationResponse.hasErrors());\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.validator;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class TCAAppConfigValidatorTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+
+    @Test
+    public void validateAppSettingsWhenAppConfigIsValid() throws Exception {
+        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();
+        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();
+        final GenericValidationResponse<TCAAppConfig> validationResponse =
+                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void testWhenSubscriberOutputStreamIsNull() throws Exception {
+        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();
+        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();
+        tcaTestAppConfig.setTcaSubscriberOutputStreamName(null);
+        final GenericValidationResponse<TCAAppConfig> validationResponse =
+                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);
+        assertTrue(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void testWhenVESMessageStatusTableNameIsNull() throws Exception {
+        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();
+        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();
+        tcaTestAppConfig.setTcaVESMessageStatusTableName(null);
+        final GenericValidationResponse<TCAAppConfig> validationResponse =
+                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);
+        assertTrue(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void testWhenVESAlertsTableNameIsNull() throws Exception {
+        final TCAAppConfigValidator tcaAppConfigValidator = new TCAAppConfigValidator();
+        final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();
+        tcaTestAppConfig.setTcaVESAlertsTableName(null);
+        final GenericValidationResponse<TCAAppConfig> validationResponse =
+                tcaAppConfigValidator.validateAppSettings(tcaTestAppConfig);
+        assertTrue(validationResponse.hasErrors());
+    }
+
+}
@@ -1,85 +1,85 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.validator;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-\r
-import java.util.Collections;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class TCAPolicyPreferencesValidatorTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private TCAPolicyPreferencesValidator tcaPolicyPreferencesValidator;\r
-    private TCAPolicyPreferences tcaPolicyPreferences;\r
-\r
-    @Before\r
-    public void before() {\r
-        tcaPolicyPreferencesValidator = new TCAPolicyPreferencesValidator();\r
-        tcaPolicyPreferences = getSampleTCAPolicyPreferences();\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenSettingsAreValid() throws Exception {\r
-        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =\r
-                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenDomainIsNullAndFunctionRoleIsEmpty() throws Exception {\r
-        tcaPolicyPreferences.setDomain(null);\r
-        tcaPolicyPreferences.setMetricsPerEventName(Collections.<MetricsPerEventName>emptyList());\r
-        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =\r
-                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);\r
-        assertTrue(validationResponse.hasErrors());\r
-        assertTrue(validationResponse.getErrorMessages().size() == 2);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenThresholdIsEmpty() throws Exception {\r
-        tcaPolicyPreferences.getMetricsPerEventName().get(0).setThresholds(Collections.<Threshold>emptyList());\r
-        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =\r
-                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);\r
-        assertTrue(validationResponse.hasErrors());\r
-        assertTrue(validationResponse.getErrorMessages().size() == 1);\r
-    }\r
-\r
-    @Test\r
-    public void testValidateAppSettingsWhenThresholdPathIsMissing() throws Exception {\r
-        tcaPolicyPreferences.getMetricsPerEventName().get(0).getThresholds().get(0).setFieldPath(null);\r
-        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =\r
-                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);\r
-        assertTrue(validationResponse.hasErrors());\r
-        assertTrue(validationResponse.getErrorMessages().size() == 1);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.validator;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAPolicyPreferences;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+
+import java.util.Collections;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class TCAPolicyPreferencesValidatorTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private TCAPolicyPreferencesValidator tcaPolicyPreferencesValidator;
+    private TCAPolicyPreferences tcaPolicyPreferences;
+
+    @Before
+    public void before() {
+        tcaPolicyPreferencesValidator = new TCAPolicyPreferencesValidator();
+        tcaPolicyPreferences = getSampleTCAPolicyPreferences();
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenSettingsAreValid() throws Exception {
+        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =
+                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenDomainIsNullAndFunctionRoleIsEmpty() throws Exception {
+        tcaPolicyPreferences.setDomain(null);
+        tcaPolicyPreferences.setMetricsPerEventName(Collections.<MetricsPerEventName>emptyList());
+        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =
+                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);
+        assertTrue(validationResponse.hasErrors());
+        assertTrue(validationResponse.getErrorMessages().size() == 2);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenThresholdIsEmpty() throws Exception {
+        tcaPolicyPreferences.getMetricsPerEventName().get(0).setThresholds(Collections.<Threshold>emptyList());
+        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =
+                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);
+        assertTrue(validationResponse.hasErrors());
+        assertTrue(validationResponse.getErrorMessages().size() == 1);
+    }
+
+    @Test
+    public void testValidateAppSettingsWhenThresholdPathIsMissing() throws Exception {
+        tcaPolicyPreferences.getMetricsPerEventName().get(0).getThresholds().get(0).setFieldPath(null);
+        final GenericValidationResponse<TCAPolicyPreferences> validationResponse =
+                tcaPolicyPreferencesValidator.validateAppSettings(tcaPolicyPreferences);
+        assertTrue(validationResponse.hasErrors());
+        assertTrue(validationResponse.getErrorMessages().size() == 1);
+    }
+
+}
@@ -1,86 +1,86 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.validator;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;\r
-import org.openecomp.dcae.apod.analytics.common.validation.GenericValidationResponse;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/19/2016.\r
- */\r
-public class TCAPreferencesValidatorTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private TCAPreferencesValidator tcaPreferencesValidator;\r
-    private TCATestAppPreferences tcaTestAppPreferences;\r
-\r
-    @Before\r
-    public void before() {\r
-        tcaPreferencesValidator = new TCAPreferencesValidator();\r
-        tcaTestAppPreferences = getTCATestAppPreferences();\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWithValidParameters() throws Exception {\r
-        final GenericValidationResponse<TCAAppPreferences> validationResponse =\r
-                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);\r
-        assertFalse(validationResponse.hasErrors());\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWhenSubscriberHostOrTopicNameIsNotPresent() throws Exception {\r
-        tcaTestAppPreferences.setSubscriberHostName(null);\r
-        tcaTestAppPreferences.setSubscriberTopicName(null);\r
-        final GenericValidationResponse<TCAAppPreferences> validationResponse =\r
-                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);\r
-        assertTrue(validationResponse.hasErrors());\r
-        assertTrue(validationResponse.getErrorMessages().size() == 2);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWhenPublisherHostOrTopicNameIsNotPresent() throws Exception {\r
-        tcaTestAppPreferences.setPublisherHostName(null);\r
-        tcaTestAppPreferences.setPublisherTopicName(null);\r
-        final GenericValidationResponse<TCAAppPreferences> validationResponse =\r
-                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);\r
-        assertTrue(validationResponse.hasErrors());\r
-        assertTrue(validationResponse.getErrorMessages().size() == 2);\r
-    }\r
-\r
-    @Test\r
-    public void validateAppSettingsWhenAAIEnrichmentIsEnabledAndAAIRequiredFieldsAreNotPresent() throws Exception {\r
-        tcaTestAppPreferences.setEnableAAIEnrichment(true);\r
-        tcaTestAppPreferences.setAaiEnrichmentHost(null);\r
-        tcaTestAppPreferences.setAaiVMEnrichmentAPIPath(null);\r
-        tcaTestAppPreferences.setAaiVNFEnrichmentAPIPath(null);\r
-        final GenericValidationResponse<TCAAppPreferences> validationResponse =\r
-                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);\r
-        assertTrue(validationResponse.hasErrors());\r
-        assertTrue(validationResponse.getErrorMessages().size() == 3);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.validator;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
+import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
+import org.onap.dcae.apod.analytics.common.validation.GenericValidationResponse;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/19/2016.
+ */
+public class TCAPreferencesValidatorTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private TCAPreferencesValidator tcaPreferencesValidator;
+    private TCATestAppPreferences tcaTestAppPreferences;
+
+    @Before
+    public void before() {
+        tcaPreferencesValidator = new TCAPreferencesValidator();
+        tcaTestAppPreferences = getTCATestAppPreferences();
+    }
+
+    @Test
+    public void validateAppSettingsWithValidParameters() throws Exception {
+        final GenericValidationResponse<TCAAppPreferences> validationResponse =
+                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);
+        assertFalse(validationResponse.hasErrors());
+    }
+
+    @Test
+    public void validateAppSettingsWhenSubscriberHostOrTopicNameIsNotPresent() throws Exception {
+        tcaTestAppPreferences.setSubscriberHostName(null);
+        tcaTestAppPreferences.setSubscriberTopicName(null);
+        final GenericValidationResponse<TCAAppPreferences> validationResponse =
+                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);
+        assertTrue(validationResponse.hasErrors());
+        assertTrue(validationResponse.getErrorMessages().size() == 2);
+    }
+
+    @Test
+    public void validateAppSettingsWhenPublisherHostOrTopicNameIsNotPresent() throws Exception {
+        tcaTestAppPreferences.setPublisherHostName(null);
+        tcaTestAppPreferences.setPublisherTopicName(null);
+        final GenericValidationResponse<TCAAppPreferences> validationResponse =
+                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);
+        assertTrue(validationResponse.hasErrors());
+        assertTrue(validationResponse.getErrorMessages().size() == 2);
+    }
+
+    @Test
+    public void validateAppSettingsWhenAAIEnrichmentIsEnabledAndAAIRequiredFieldsAreNotPresent() throws Exception {
+        tcaTestAppPreferences.setEnableAAIEnrichment(true);
+        tcaTestAppPreferences.setAaiEnrichmentHost(null);
+        tcaTestAppPreferences.setAaiVMEnrichmentAPIPath(null);
+        tcaTestAppPreferences.setAaiVNFEnrichmentAPIPath(null);
+        final GenericValidationResponse<TCAAppPreferences> validationResponse =
+                tcaPreferencesValidator.validateAppSettings(tcaTestAppPreferences);
+        assertTrue(validationResponse.hasErrors());
+        assertTrue(validationResponse.getErrorMessages().size() == 3);
+    }
+
+}
@@ -1,99 +1,99 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.quartz.Scheduler;\r
-\r
-import java.util.concurrent.atomic.AtomicBoolean;\r
-\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/19/2016.\r
- */\r
-public class BaseTCADMaaPMRWorkerTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private static final String SCHEDULER_NAME = "testSchedulerName";\r
-\r
-    private Scheduler mockScheduler;\r
-    private AtomicBoolean mockIsSchedulerShutdown;\r
-    private BaseTestTCADMaaPMRWorker baseTestTCADMaaPMRWorker;\r
-\r
-    private static class BaseTestTCADMaaPMRWorker extends BaseTCADMaaPMRWorker {\r
-\r
-        public BaseTestTCADMaaPMRWorker(final Scheduler scheduler, final AtomicBoolean isSchedulerShutdown) {\r
-            this.scheduler = scheduler;\r
-            this.isSchedulerShutdown = isSchedulerShutdown;\r
-        }\r
-\r
-    }\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        mockScheduler = mock(Scheduler.class);\r
-        mockIsSchedulerShutdown = mock(AtomicBoolean.class);\r
-        baseTestTCADMaaPMRWorker = new BaseTestTCADMaaPMRWorker(mockScheduler, mockIsSchedulerShutdown);\r
-        when(mockScheduler.getSchedulerName()).thenReturn(SCHEDULER_NAME);\r
-        doNothing().when(mockScheduler).start();\r
-        doNothing().when(mockScheduler).shutdown();\r
-    }\r
-\r
-    @Test\r
-    public void testRun() throws Exception {\r
-        createShutdownHookThread();\r
-        baseTestTCADMaaPMRWorker.run();\r
-        verify(mockScheduler, times(1)).start();\r
-    }\r
-\r
-    @Test\r
-    public void testStop() throws Exception {\r
-        baseTestTCADMaaPMRWorker.stop();\r
-        verify(mockScheduler, times(1)).shutdown();\r
-    }\r
-\r
-    /**\r
-     * A helper thread which shuts down the scheduler after some time\r
-     */\r
-    public void createShutdownHookThread() {\r
-        new Thread(new Runnable() {\r
-            @Override\r
-            public void run() {\r
-                try {\r
-                    Thread.yield();\r
-                    Thread.sleep(AnalyticsConstants.TCA_DEFAULT_WORKER_SHUTDOWN_CHECK_INTERVAL_MS * 2);\r
-                } catch (InterruptedException e) {\r
-                    LOG.error("Interrupted Exception while running test: {}", e);\r
-                    throw new RuntimeException(e);\r
-                }\r
-                mockIsSchedulerShutdown.getAndSet(true);\r
-            }\r
-        }).start();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.quartz.Scheduler;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/19/2016.
+ */
+public class BaseTCADMaaPMRWorkerTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private static final String SCHEDULER_NAME = "testSchedulerName";
+
+    private Scheduler mockScheduler;
+    private AtomicBoolean mockIsSchedulerShutdown;
+    private BaseTestTCADMaaPMRWorker baseTestTCADMaaPMRWorker;
+
+    private static class BaseTestTCADMaaPMRWorker extends BaseTCADMaaPMRWorker {
+
+        public BaseTestTCADMaaPMRWorker(final Scheduler scheduler, final AtomicBoolean isSchedulerShutdown) {
+            this.scheduler = scheduler;
+            this.isSchedulerShutdown = isSchedulerShutdown;
+        }
+
+    }
+
+    @Before
+    public void before() throws Exception {
+        mockScheduler = mock(Scheduler.class);
+        mockIsSchedulerShutdown = mock(AtomicBoolean.class);
+        baseTestTCADMaaPMRWorker = new BaseTestTCADMaaPMRWorker(mockScheduler, mockIsSchedulerShutdown);
+        when(mockScheduler.getSchedulerName()).thenReturn(SCHEDULER_NAME);
+        doNothing().when(mockScheduler).start();
+        doNothing().when(mockScheduler).shutdown();
+    }
+
+    @Test
+    public void testRun() throws Exception {
+        createShutdownHookThread();
+        baseTestTCADMaaPMRWorker.run();
+        verify(mockScheduler, times(1)).start();
+    }
+
+    @Test
+    public void testStop() throws Exception {
+        baseTestTCADMaaPMRWorker.stop();
+        verify(mockScheduler, times(1)).shutdown();
+    }
+
+    /**
+     * A helper thread which shuts down the scheduler after some time
+     */
+    public void createShutdownHookThread() {
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    Thread.yield();
+                    Thread.sleep(AnalyticsConstants.TCA_DEFAULT_WORKER_SHUTDOWN_CHECK_INTERVAL_MS * 2);
+                } catch (InterruptedException e) {
+                    LOG.error("Interrupted Exception while running test: {}", e);
+                    throw new RuntimeException(e);
+                }
+                mockIsSchedulerShutdown.getAndSet(true);
+            }
+        }).start();
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.TxRunnable;\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.ArgumentMatchers;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.JobExecutionContext;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.ArgumentMatchers.anyInt;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/20/2016.\r
- */\r
-public class TCADMaaPMRPublisherJobTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private JobExecutionContext jobExecutionContext;\r
-    private TCADMaaPMRPublisherJob publisherJob;\r
-    private JobDataMap jobDataMap;\r
-    private WorkerContext workerContext;\r
-    private DMaaPMRPublisher publisher;\r
-    private Metrics metrics;\r
-\r
-    private class TCATestDMaaPMRPublisherJob extends TCADMaaPMRPublisherJob {\r
-\r
-        private Map<String, TCAVESAlertEntity> alertEntityMap;\r
-\r
-        public TCATestDMaaPMRPublisherJob(Map<String, TCAVESAlertEntity> alertEntityMap) {\r
-            this.alertEntityMap = alertEntityMap;\r
-        }\r
-\r
-        @Override\r
-        protected Map<String, TCAVESAlertEntity> getNewAlertsMap(\r
-                String cdapAlertsTableName, WorkerContext workerContext) {\r
-            return alertEntityMap;\r
-        }\r
-\r
-        @Override\r
-        protected void deleteAlertsByKey(String cdapAlertsTableName, WorkerContext workerContext,\r
-                                         Set<String> rowKeys, Metrics metrics) {\r
-            // do nothing\r
-        }\r
-    }\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-\r
-        jobExecutionContext = mock(JobExecutionContext.class);\r
-        workerContext = mock(WorkerContext.class);\r
-\r
-        metrics = mock(Metrics.class);\r
-        doNothing().when(metrics).count(anyString(), anyInt());\r
-        publisher = mock(DMaaPMRPublisher.class);\r
-\r
-        jobDataMap = mock(JobDataMap.class);\r
-        when(jobDataMap.getString(eq(AnalyticsConstants.CDAP_ALERTS_TABLE_VARIABLE_NAME))).thenReturn\r
-                ("testAlertTableName");\r
-        when(jobDataMap.get(eq(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME))).thenReturn(workerContext);\r
-        when(jobDataMap.get(eq(AnalyticsConstants.DMAAP_PUBLISHER_VARIABLE_NAME))).thenReturn(publisher);\r
-        when(jobDataMap.get(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME)).thenReturn(metrics);\r
-        when(jobExecutionContext.getMergedJobDataMap()).thenReturn(jobDataMap);\r
-\r
-\r
-        publisherJob = new TCADMaaPMRPublisherJob();\r
-    }\r
-\r
-    @Test\r
-    public void testExecuteWhenNoAlertsFoundInAlertsTable() throws Exception {\r
-        doNothing().when(workerContext).execute(any(TxRunnable.class));\r
-        publisherJob.execute(jobExecutionContext);\r
-        verify(metrics, times(1))\r
-                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_NO_NEW_ALERTS_LOOKUP_METRIC), eq(1));\r
-    }\r
-\r
-    @Test\r
-    public void testExecuteWhenAlertsWereFoundInAlertsTable() throws Exception {\r
-\r
-        final DMaaPMRPublisherResponse publisherResponse = mock(DMaaPMRPublisherResponse.class);\r
-        when(publisherResponse.getResponseCode()).thenReturn(200);\r
-        when(publisherResponse.getResponseMessage()).thenReturn("success");\r
-        when(publisherResponse.getPendingMessagesCount()).thenReturn(0);\r
-        when(publisher.publish(ArgumentMatchers.<String>anyList())).thenReturn(publisherResponse);\r
-\r
-        final TCAVESAlertEntity tcavesAlertEntity = mock(TCAVESAlertEntity.class);\r
-        when(tcavesAlertEntity.getAlertMessage()).thenReturn("testAlertMessage");\r
-        Map<String, TCAVESAlertEntity> alertEntityMap = new HashMap<>();\r
-        alertEntityMap.put("key1", tcavesAlertEntity);\r
-        final TCATestDMaaPMRPublisherJob testPublisherJob = new TCATestDMaaPMRPublisherJob(alertEntityMap);\r
-        testPublisherJob.execute(jobExecutionContext);\r
-        verify(metrics, times(1))\r
-                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_NEW_ALERTS_METRIC), eq(1));\r
-        verify(metrics, times(1))\r
-                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_SUCCESSFUL_DMAAP_RESPONSE_METRIC), eq(1));\r
-    }\r
-\r
-    @Test\r
-    public void testExecuteWhenAlertsWereFoundButPublisherReturnedNon200ResponseCode() throws Exception {\r
-\r
-        final DMaaPMRPublisherResponse publisherResponse = mock(DMaaPMRPublisherResponse.class);\r
-        when(publisherResponse.getResponseCode()).thenReturn(500);\r
-        when(publisherResponse.getResponseMessage()).thenReturn("failed");\r
-        when(publisherResponse.getPendingMessagesCount()).thenReturn(0);\r
-        when(publisher.publish(ArgumentMatchers.<String>anyList())).thenReturn(publisherResponse);\r
-\r
-        final TCAVESAlertEntity tcavesAlertEntity = mock(TCAVESAlertEntity.class);\r
-        when(tcavesAlertEntity.getAlertMessage()).thenReturn("testAlertMessage");\r
-        Map<String, TCAVESAlertEntity> alertEntityMap = new HashMap<>();\r
-        alertEntityMap.put("key1", tcavesAlertEntity);\r
-        final TCATestDMaaPMRPublisherJob testPublisherJob = new TCATestDMaaPMRPublisherJob(alertEntityMap);\r
-        testPublisherJob.execute(jobExecutionContext);\r
-        verify(metrics, times(1))\r
-                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_NEW_ALERTS_METRIC), eq(1));\r
-        verify(metrics, times(1))\r
-                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_UNSUCCESSFUL_DMAAP_RESPONSE_METRIC), eq(1));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.TxRunnable;
+import co.cask.cdap.api.metrics.Metrics;
+import co.cask.cdap.api.worker.WorkerContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentMatchers;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertEntity;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionContext;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/20/2016.
+ */
+public class TCADMaaPMRPublisherJobTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private JobExecutionContext jobExecutionContext;
+    private TCADMaaPMRPublisherJob publisherJob;
+    private JobDataMap jobDataMap;
+    private WorkerContext workerContext;
+    private DMaaPMRPublisher publisher;
+    private Metrics metrics;
+
+    private class TCATestDMaaPMRPublisherJob extends TCADMaaPMRPublisherJob {
+
+        private Map<String, TCAVESAlertEntity> alertEntityMap;
+
+        public TCATestDMaaPMRPublisherJob(Map<String, TCAVESAlertEntity> alertEntityMap) {
+            this.alertEntityMap = alertEntityMap;
+        }
+
+        @Override
+        protected Map<String, TCAVESAlertEntity> getNewAlertsMap(
+                String cdapAlertsTableName, WorkerContext workerContext) {
+            return alertEntityMap;
+        }
+
+        @Override
+        protected void deleteAlertsByKey(String cdapAlertsTableName, WorkerContext workerContext,
+                                         Set<String> rowKeys, Metrics metrics) {
+            // do nothing
+        }
+    }
+
+    @Before
+    public void before() throws Exception {
+
+        jobExecutionContext = mock(JobExecutionContext.class);
+        workerContext = mock(WorkerContext.class);
+
+        metrics = mock(Metrics.class);
+        doNothing().when(metrics).count(anyString(), anyInt());
+        publisher = mock(DMaaPMRPublisher.class);
+
+        jobDataMap = mock(JobDataMap.class);
+        when(jobDataMap.getString(eq(AnalyticsConstants.CDAP_ALERTS_TABLE_VARIABLE_NAME))).thenReturn
+                ("testAlertTableName");
+        when(jobDataMap.get(eq(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME))).thenReturn(workerContext);
+        when(jobDataMap.get(eq(AnalyticsConstants.DMAAP_PUBLISHER_VARIABLE_NAME))).thenReturn(publisher);
+        when(jobDataMap.get(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME)).thenReturn(metrics);
+        when(jobExecutionContext.getMergedJobDataMap()).thenReturn(jobDataMap);
+
+
+        publisherJob = new TCADMaaPMRPublisherJob();
+    }
+
+    @Test
+    public void testExecuteWhenNoAlertsFoundInAlertsTable() throws Exception {
+        doNothing().when(workerContext).execute(any(TxRunnable.class));
+        publisherJob.execute(jobExecutionContext);
+        verify(metrics, times(1))
+                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_NO_NEW_ALERTS_LOOKUP_METRIC), eq(1));
+    }
+
+    @Test
+    public void testExecuteWhenAlertsWereFoundInAlertsTable() throws Exception {
+
+        final DMaaPMRPublisherResponse publisherResponse = mock(DMaaPMRPublisherResponse.class);
+        when(publisherResponse.getResponseCode()).thenReturn(200);
+        when(publisherResponse.getResponseMessage()).thenReturn("success");
+        when(publisherResponse.getPendingMessagesCount()).thenReturn(0);
+        when(publisher.publish(ArgumentMatchers.<String>anyList())).thenReturn(publisherResponse);
+
+        final TCAVESAlertEntity tcavesAlertEntity = mock(TCAVESAlertEntity.class);
+        when(tcavesAlertEntity.getAlertMessage()).thenReturn("testAlertMessage");
+        Map<String, TCAVESAlertEntity> alertEntityMap = new HashMap<>();
+        alertEntityMap.put("key1", tcavesAlertEntity);
+        final TCATestDMaaPMRPublisherJob testPublisherJob = new TCATestDMaaPMRPublisherJob(alertEntityMap);
+        testPublisherJob.execute(jobExecutionContext);
+        verify(metrics, times(1))
+                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_NEW_ALERTS_METRIC), eq(1));
+        verify(metrics, times(1))
+                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_SUCCESSFUL_DMAAP_RESPONSE_METRIC), eq(1));
+    }
+
+    @Test
+    public void testExecuteWhenAlertsWereFoundButPublisherReturnedNon200ResponseCode() throws Exception {
+
+        final DMaaPMRPublisherResponse publisherResponse = mock(DMaaPMRPublisherResponse.class);
+        when(publisherResponse.getResponseCode()).thenReturn(500);
+        when(publisherResponse.getResponseMessage()).thenReturn("failed");
+        when(publisherResponse.getPendingMessagesCount()).thenReturn(0);
+        when(publisher.publish(ArgumentMatchers.<String>anyList())).thenReturn(publisherResponse);
+
+        final TCAVESAlertEntity tcavesAlertEntity = mock(TCAVESAlertEntity.class);
+        when(tcavesAlertEntity.getAlertMessage()).thenReturn("testAlertMessage");
+        Map<String, TCAVESAlertEntity> alertEntityMap = new HashMap<>();
+        alertEntityMap.put("key1", tcavesAlertEntity);
+        final TCATestDMaaPMRPublisherJob testPublisherJob = new TCATestDMaaPMRPublisherJob(alertEntityMap);
+        testPublisherJob.execute(jobExecutionContext);
+        verify(metrics, times(1))
+                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_NEW_ALERTS_METRIC), eq(1));
+        verify(metrics, times(1))
+                .count(eq(CDAPMetricsConstants.TCA_PUBLISHER_UNSUCCESSFUL_DMAAP_RESPONSE_METRIC), eq(1));
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.metrics.Metrics;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.JobExecutionContext;\r
-\r
-import java.io.IOException;\r
-import java.util.Arrays;\r
-import java.util.Collections;\r
-\r
-import static org.mockito.ArgumentMatchers.anyInt;\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.doThrow;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/20/2016.\r
- */\r
-public class TCADMaaPMRSubscriberJobTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private JobExecutionContext jobExecutionContext;\r
-    private TCADMaaPMRSubscriberJob subscriberJob;\r
-    private JobDataMap jobDataMap;\r
-    private WorkerContext workerContext;\r
-    private DMaaPMRSubscriber subscriber;\r
-    private Metrics metrics;\r
-\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-\r
-        jobExecutionContext = mock(JobExecutionContext.class);\r
-        workerContext = mock(WorkerContext.class);\r
-\r
-        metrics = mock(Metrics.class);\r
-        doNothing().when(metrics).count(anyString(), anyInt());\r
-        subscriber = mock(DMaaPMRSubscriber.class);\r
-\r
-        jobDataMap = mock(JobDataMap.class);\r
-        when(jobDataMap.getString(eq(AnalyticsConstants.CDAP_STREAM_VARIABLE_NAME))).thenReturn\r
-                (CDAPComponentsConstants.TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM);\r
-        when(jobDataMap.get(eq(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME))).thenReturn(workerContext);\r
-        when(jobDataMap.get(eq(AnalyticsConstants.DMAAP_SUBSCRIBER_VARIABLE_NAME))).thenReturn(subscriber);\r
-        when(jobDataMap.get(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME)).thenReturn(metrics);\r
-        when(jobExecutionContext.getMergedJobDataMap()).thenReturn(jobDataMap);\r
-\r
-        doNothing().when(workerContext).write(anyString(), anyString());\r
-\r
-        subscriberJob = new TCADMaaPMRSubscriberJob();\r
-    }\r
-\r
-    @Test\r
-    public void testExecuteWhenMessagesAreFound() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(200);\r
-        when(subscriberResponse.getResponseMessage()).thenReturn("testMessage");\r
-        when(subscriberResponse.getFetchedMessages()).thenReturn(ImmutableList.of("testMessage1", "testMessage1"));\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        subscriberJob.execute(jobExecutionContext);\r
-        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants\r
-                .DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC), eq(2));\r
-    }\r
-\r
-    @Test\r
-    public void testExecuteWhenNoMessagesFound() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(200);\r
-        when(subscriberResponse.getResponseMessage()).thenReturn("no messages");\r
-        when(subscriberResponse.getFetchedMessages()).thenReturn(Collections.<String>emptyList());\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        subscriberJob.execute(jobExecutionContext);\r
-        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants\r
-                .DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC), eq(1));\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testExecuteWhenSubscriberReturnNonSuccessfulReturnCode() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(500);\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        subscriberJob.execute(jobExecutionContext);\r
-        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants\r
-                .DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC), eq(1));\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testExecuteWhenWritingToCDAPStreamThrowsException() throws Exception {\r
-        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);\r
-        when(subscriberResponse.getResponseCode()).thenReturn(200);\r
-        when(subscriberResponse.getFetchedMessages()).thenReturn(Arrays.asList("TestMessage"));\r
-        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);\r
-        doThrow(new IOException()).when(workerContext).write(anyString(), anyString());\r
-        subscriberJob.execute(jobExecutionContext);\r
-    }\r
-\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.metrics.Metrics;
+import co.cask.cdap.api.worker.WorkerContext;
+import com.google.common.collect.ImmutableList;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPMetricsConstants;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionContext;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/20/2016.
+ */
+public class TCADMaaPMRSubscriberJobTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private JobExecutionContext jobExecutionContext;
+    private TCADMaaPMRSubscriberJob subscriberJob;
+    private JobDataMap jobDataMap;
+    private WorkerContext workerContext;
+    private DMaaPMRSubscriber subscriber;
+    private Metrics metrics;
+
+
+    @Before
+    public void before() throws Exception {
+
+        jobExecutionContext = mock(JobExecutionContext.class);
+        workerContext = mock(WorkerContext.class);
+
+        metrics = mock(Metrics.class);
+        doNothing().when(metrics).count(anyString(), anyInt());
+        subscriber = mock(DMaaPMRSubscriber.class);
+
+        jobDataMap = mock(JobDataMap.class);
+        when(jobDataMap.getString(eq(AnalyticsConstants.CDAP_STREAM_VARIABLE_NAME))).thenReturn
+                (CDAPComponentsConstants.TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM);
+        when(jobDataMap.get(eq(AnalyticsConstants.WORKER_CONTEXT_VARIABLE_NAME))).thenReturn(workerContext);
+        when(jobDataMap.get(eq(AnalyticsConstants.DMAAP_SUBSCRIBER_VARIABLE_NAME))).thenReturn(subscriber);
+        when(jobDataMap.get(AnalyticsConstants.DMAAP_METRICS_VARIABLE_NAME)).thenReturn(metrics);
+        when(jobExecutionContext.getMergedJobDataMap()).thenReturn(jobDataMap);
+
+        doNothing().when(workerContext).write(anyString(), anyString());
+
+        subscriberJob = new TCADMaaPMRSubscriberJob();
+    }
+
+    @Test
+    public void testExecuteWhenMessagesAreFound() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(200);
+        when(subscriberResponse.getResponseMessage()).thenReturn("testMessage");
+        when(subscriberResponse.getFetchedMessages()).thenReturn(ImmutableList.of("testMessage1", "testMessage1"));
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        subscriberJob.execute(jobExecutionContext);
+        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants
+                .DMAAP_MR_SUBSCRIBER_TOTAL_MESSAGES_PROCESSED_METRIC), eq(2));
+    }
+
+    @Test
+    public void testExecuteWhenNoMessagesFound() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(200);
+        when(subscriberResponse.getResponseMessage()).thenReturn("no messages");
+        when(subscriberResponse.getFetchedMessages()).thenReturn(Collections.<String>emptyList());
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        subscriberJob.execute(jobExecutionContext);
+        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants
+                .DMAAP_MR_SUBSCRIBER_RESPONSES_WITH_NO_MESSAGES_METRIC), eq(1));
+    }
+
+
+    @Test
+    public void testExecuteWhenSubscriberReturnNonSuccessfulReturnCode() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(500);
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        subscriberJob.execute(jobExecutionContext);
+        verify(metrics, Mockito.times(1)).count(eq(CDAPMetricsConstants
+                .DMAAP_MR_SUBSCRIBER_UNSUCCESSFUL_RESPONSES_METRIC), eq(1));
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testExecuteWhenWritingToCDAPStreamThrowsException() throws Exception {
+        final DMaaPMRSubscriberResponse subscriberResponse = mock(DMaaPMRSubscriberResponse.class);
+        when(subscriberResponse.getResponseCode()).thenReturn(200);
+        when(subscriberResponse.getFetchedMessages()).thenReturn(Arrays.asList("TestMessage"));
+        when(subscriber.fetchMessages()).thenReturn(subscriberResponse);
+        doThrow(new IOException()).when(workerContext).write(anyString(), anyString());
+        subscriberJob.execute(jobExecutionContext);
+    }
+
+
+
+}
@@ -1,87 +1,87 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.app.ApplicationSpecification;\r
-import co.cask.cdap.api.worker.WorkerConfigurer;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/20/2016.\r
- */\r
-public class TCADMaaPPublisherWorkerTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private static final String VES_ALERTS_TABLE_NAME = "vesAlertsTable";\r
-\r
-    private WorkerConfigurer workerConfigurer;\r
-    private WorkerContext workerContext;\r
-    private TCADMaaPPublisherWorker publisherWorker;\r
-    private ApplicationSpecification mockApplicationSpecification;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        workerConfigurer = mock(WorkerConfigurer.class);\r
-        workerContext = mock(WorkerContext.class);\r
-        doNothing().when(workerConfigurer).setName(anyString());\r
-        doNothing().when(workerConfigurer).setDescription(anyString());\r
-        mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);\r
-        when(workerContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);\r
-        publisherWorker = new TCADMaaPPublisherWorker(VES_ALERTS_TABLE_NAME);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        publisherWorker.configure(workerConfigurer);\r
-        verify(workerConfigurer, times(1))\r
-                .setName(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_WORKER));\r
-        verify(workerConfigurer, times(1))\r
-                .setDescription(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER));\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testInitializeWhenSettingsHaveErrors() throws Exception {\r
-        when(mockApplicationSpecification.getConfiguration()).thenReturn("{}");\r
-        publisherWorker.initialize(workerContext);\r
-    }\r
-\r
-    @Test\r
-    public void testInitializeWhenSettingsAreValid() throws Exception {\r
-        when(workerContext.getRuntimeArguments()).thenReturn(getPreferenceMap());\r
-        when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));\r
-        publisherWorker.initialize(workerContext);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.app.ApplicationSpecification;
+import co.cask.cdap.api.worker.WorkerConfigurer;
+import co.cask.cdap.api.worker.WorkerContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/20/2016.
+ */
+public class TCADMaaPPublisherWorkerTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private static final String VES_ALERTS_TABLE_NAME = "vesAlertsTable";
+
+    private WorkerConfigurer workerConfigurer;
+    private WorkerContext workerContext;
+    private TCADMaaPPublisherWorker publisherWorker;
+    private ApplicationSpecification mockApplicationSpecification;
+
+    @Before
+    public void before() throws Exception {
+        workerConfigurer = mock(WorkerConfigurer.class);
+        workerContext = mock(WorkerContext.class);
+        doNothing().when(workerConfigurer).setName(anyString());
+        doNothing().when(workerConfigurer).setDescription(anyString());
+        mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);
+        when(workerContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);
+        publisherWorker = new TCADMaaPPublisherWorker(VES_ALERTS_TABLE_NAME);
+
+    }
+
+    @Test
+    public void testConfigure() throws Exception {
+        publisherWorker.configure(workerConfigurer);
+        verify(workerConfigurer, times(1))
+                .setName(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_WORKER));
+        verify(workerConfigurer, times(1))
+                .setDescription(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER));
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testInitializeWhenSettingsHaveErrors() throws Exception {
+        when(mockApplicationSpecification.getConfiguration()).thenReturn("{}");
+        publisherWorker.initialize(workerContext);
+    }
+
+    @Test
+    public void testInitializeWhenSettingsAreValid() throws Exception {
+        when(workerContext.getRuntimeArguments()).thenReturn(getPreferenceMap());
+        when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));
+        publisherWorker.initialize(workerContext);
+    }
+
+}
@@ -1,88 +1,88 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.tca.worker;\r
-\r
-import co.cask.cdap.api.app.ApplicationSpecification;\r
-import co.cask.cdap.api.worker.WorkerConfigurer;\r
-import co.cask.cdap.api.worker.WorkerContext;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;\r
-import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;\r
-\r
-import static org.mockito.ArgumentMatchers.anyString;\r
-import static org.mockito.ArgumentMatchers.eq;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/20/2016.\r
- */\r
-public class TCADMaaPSubscriberWorkerTest extends BaseAnalyticsCDAPTCAUnitTest {\r
-\r
-    private static final String TEST_SUBSCRIBER_OUTPUT_STREAM_NAME = "testSubscriberOutputStream";\r
-\r
-    private WorkerConfigurer workerConfigurer;\r
-    private WorkerContext workerContext;\r
-    private TCADMaaPSubscriberWorker subscriberWorker;\r
-    private ApplicationSpecification mockApplicationSpecification;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        workerConfigurer = mock(WorkerConfigurer.class);\r
-        workerContext = mock(WorkerContext.class);\r
-        mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);\r
-        when(workerContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);\r
-        doNothing().when(workerConfigurer).setName(anyString());\r
-        doNothing().when(workerConfigurer).setDescription(anyString());\r
-        subscriberWorker =\r
-                new TCADMaaPSubscriberWorker(TEST_SUBSCRIBER_OUTPUT_STREAM_NAME);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testConfigure() throws Exception {\r
-        subscriberWorker.configure(workerConfigurer);\r
-        verify(workerConfigurer, times(1))\r
-                .setName(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_WORKER));\r
-        verify(workerConfigurer, times(1))\r
-                .setDescription(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER));\r
-    }\r
-\r
-    @Test(expected = CDAPSettingsException.class)\r
-    public void testInitializeWhenSettingsHaveErrors() throws Exception {\r
-        when(mockApplicationSpecification.getConfiguration()).thenReturn("{}");\r
-        subscriberWorker.initialize(workerContext);\r
-    }\r
-\r
-    @Test\r
-    public void testInitializeWhenSettingsAreValid() throws Exception {\r
-        when(workerContext.getRuntimeArguments()).thenReturn(getPreferenceMap());\r
-        when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));\r
-        subscriberWorker.initialize(workerContext);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.tca.worker;
+
+import co.cask.cdap.api.app.ApplicationSpecification;
+import co.cask.cdap.api.worker.WorkerConfigurer;
+import co.cask.cdap.api.worker.WorkerContext;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
+import org.onap.dcae.apod.analytics.cdap.common.exception.CDAPSettingsException;
+import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
+
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/20/2016.
+ */
+public class TCADMaaPSubscriberWorkerTest extends BaseAnalyticsCDAPTCAUnitTest {
+
+    private static final String TEST_SUBSCRIBER_OUTPUT_STREAM_NAME = "testSubscriberOutputStream";
+
+    private WorkerConfigurer workerConfigurer;
+    private WorkerContext workerContext;
+    private TCADMaaPSubscriberWorker subscriberWorker;
+    private ApplicationSpecification mockApplicationSpecification;
+
+    @Before
+    public void before() throws Exception {
+        workerConfigurer = mock(WorkerConfigurer.class);
+        workerContext = mock(WorkerContext.class);
+        mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);
+        when(workerContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);
+        doNothing().when(workerConfigurer).setName(anyString());
+        doNothing().when(workerConfigurer).setDescription(anyString());
+        subscriberWorker =
+                new TCADMaaPSubscriberWorker(TEST_SUBSCRIBER_OUTPUT_STREAM_NAME);
+
+    }
+
+    @Test
+    public void testConfigure() throws Exception {
+        subscriberWorker.configure(workerConfigurer);
+        verify(workerConfigurer, times(1))
+                .setName(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_WORKER));
+        verify(workerConfigurer, times(1))
+                .setDescription(eq(CDAPComponentsConstants.TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER));
+    }
+
+    @Test(expected = CDAPSettingsException.class)
+    public void testInitializeWhenSettingsHaveErrors() throws Exception {
+        when(mockApplicationSpecification.getConfiguration()).thenReturn("{}");
+        subscriberWorker.initialize(workerContext);
+    }
+
+    @Test
+    public void testInitializeWhenSettingsAreValid() throws Exception {
+        when(workerContext.getRuntimeArguments()).thenReturn(getPreferenceMap());
+        when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));
+        subscriberWorker.initialize(workerContext);
+    }
+
+}
index dc51dfd..54c8fef 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration debug="false">\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="WARN"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration debug="false">
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="WARN"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index ed7e778..af37fbc 100644 (file)
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-common</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS CODE COMMON FOR ALL DCAE ANALYTICS MODULES -->\r
-    <name>DCAE Analytics Common</name>\r
-    <description>Contains Components common to all DCAE Analytics Modules</description>\r
-\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- DCAE PROJECT DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-model</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <!-- UTILITIES -->\r
-        <dependency>\r
-            <groupId>com.google.guava</groupId>\r
-            <artifactId>guava</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.apache.commons</groupId>\r
-            <artifactId>commons-lang3</artifactId>\r
-        </dependency>\r
-\r
-\r
-        <!-- DEPENDENCY INJECTION -->\r
-        <dependency>\r
-            <groupId>com.google.inject</groupId>\r
-            <artifactId>guice</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.inject.extensions</groupId>\r
-            <artifactId>guice-assistedinject</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.inject.extensions</groupId>\r
-            <artifactId>guice-multibindings</artifactId>\r
-        </dependency>\r
-\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-\r
-    </dependencies>\r
-\r
-</project>\r
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <artifactId>dcae-analytics</artifactId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-common</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS CODE COMMON FOR ALL DCAE ANALYTICS MODULES -->
+    <name>DCAE Analytics Common</name>
+    <description>Contains Components common to all DCAE Analytics Modules</description>
+
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+    </properties>
+
+    <dependencies>
+
+        <!-- DCAE PROJECT DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-model</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- UTILITIES -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+
+        <!-- DEPENDENCY INJECTION -->
+        <dependency>
+            <groupId>com.google.inject</groupId>
+            <artifactId>guice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject.extensions</groupId>
+            <artifactId>guice-assistedinject</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject.extensions</groupId>
+            <artifactId>guice-multibindings</artifactId>
+        </dependency>
+
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+
+    </dependencies>
+
+</project>
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common;\r
-\r
-/**\r
- * Contains static variable for all DCAE Components.\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/21/2016.\r
- */\r
-public abstract class AnalyticsConstants {\r
-\r
-    // ===============  Common Constants for all DCAE Analytics Modules ==================== //\r
-\r
-\r
-    // ===============  DMaaP Constants for all DCAE Analytics Modules ==================== //\r
-\r
-    // DMaaP Config Constants\r
-    public static final Integer DEFAULT_PORT_NUMBER = 80; // default port number\r
-    public static final String DEFAULT_USER_NAME = null; // default to no username\r
-    public static final String DEFAULT_USER_PASSWORD = null; // defaults to no userPassword\r
-    public static final String DEFAULT_PROTOCOL = "https"; // defaults to using https protocol\r
-    public static final String DEFAULT_CONTENT_TYPE = "application/json";  // defaults to json content type\r
-\r
-    public static final String DMAAP_URI_PATH_PREFIX = "/events/";\r
-    public static final String DMAAP_GROUP_PREFIX = "OpenDCAE-";\r
-\r
-    // ================== DMaaP MR Constants ============================== //\r
-    // Publisher Constants\r
-    public static final int DEFAULT_PUBLISHER_MAX_BATCH_SIZE = 1; // disable batching by default\r
-    public static final int DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 100000; // default recovery messages size\r
-    public static final int PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE = 5; // number of retries when flushing messages\r
-    public static final int PUBLISHER_DELAY_MS_ON_RETRIES_ON_CLOSE = 5000; // delay in retrying for flushing messages\r
-    // Subscriber Constants\r
-    public static final int DEFAULT_SUBSCRIBER_TIMEOUT_MS = -1;\r
-    public static final int DEFAULT_SUBSCRIBER_MESSAGE_LIMIT = -1;\r
-    public static final String DEFAULT_SUBSCRIBER_GROUP_PREFIX = DMAAP_GROUP_PREFIX + "DMaaPSub-";\r
-    public static final String SUBSCRIBER_TIMEOUT_QUERY_PARAM_NAME = "timeout";\r
-    public static final String SUBSCRIBER_MSG_LIMIT_QUERY_PARAM_NAME = "limit";\r
-\r
-\r
-    // ================== TCA Constants ============================== //\r
-\r
-    // Default subscriber polling interval\r
-    public static final Integer TCA_DEFAULT_SUBSCRIBER_POLLING_INTERVAL_MS = 30000;\r
-\r
-    // Default publisher polling interval\r
-    public static final Integer TCA_DEFAULT_PUBLISHER_POLLING_INTERVAL_MS = 30000;\r
-\r
-    // Default publisher max batch queue size determines the minimum number of messages that need to be published in\r
-    // batch mode\r
-    public static final Integer TCA_DEFAULT_PUBLISHER_MAX_BATCH_QUEUE_SIZE = 10;\r
-\r
-    // Default publisher max recovery queue size determines max number of messages can be cached in memory\r
-    // in case publisher is not responding\r
-    public static final Integer TCA_DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 100000;\r
-\r
-    // Default interval during which TCA DMaaP Worker checks if scheduler is shut down\r
-    public static final Integer TCA_DEFAULT_WORKER_SHUTDOWN_CHECK_INTERVAL_MS = 5000;\r
-\r
-    // ***** TCA Quartz Scheduler Settings ******//\r
-\r
-    public static final String TCA_QUARTZ_SUBSCRIBER_PROPERTIES_FILE_NAME = "quartz-subscriber.properties";\r
-\r
-    public static final String TCA_QUARTZ_PUBLISHER_PROPERTIES_FILE_NAME = "quartz-publisher.properties";\r
-\r
-    // TCA Quartz Group Settings\r
-    public static final String TCA_QUARTZ_GROUP_NAME = "TCAQuartzGroup";\r
-    // TCA Quartz Trigger Settings\r
-    public static final String TCA_DMAAP_SUBSCRIBER_QUARTZ_TRIGGER_NAME = "TCADMaaPSubscriberTrigger";\r
-    public static final String TCA_DMAAP_PUBLISHER_QUARTZ_TRIGGER_NAME = "TCADMaaPPublisherTrigger";\r
-\r
-    // TCA Quartz DMaaP Subscriber Job Settings\r
-    public static final String TCA_DMAAP_SUBSCRIBER_QUARTZ_JOB_NAME = "TCADMaaPSubscriberJob";\r
-    public static final String TCA_DMAAP_PUBLISHER_QUARTZ_JOB_NAME = "TCADMaaPPublisherJob";\r
-\r
-    // TCA Quartz Publisher and Subscriber Job Parameters\r
-    // Common Job parameters for both Publisher and Subscriber\r
-    public static final String WORKER_CONTEXT_VARIABLE_NAME = "WORKER_CONTEXT";\r
-    public static final String DMAAP_METRICS_VARIABLE_NAME = "DMAAP_METRICS";\r
-    // TCA Quartz DMaaP Subscriber Job Parameter Settings\r
-    public static final String CDAP_STREAM_VARIABLE_NAME = "CDAP_STREAM_NAME";\r
-    public static final String DMAAP_SUBSCRIBER_VARIABLE_NAME = "DMAAP_SUBSCRIBER";\r
-    // TCA Quartz DMaaP Publisher Job Parameter Settings\r
-    public static final String CDAP_ALERTS_TABLE_VARIABLE_NAME = "CDAP_TCA_ALERTS_TABLE_NAME";\r
-    public static final String DMAAP_PUBLISHER_VARIABLE_NAME = "DMAAP_PUBLISHER";\r
-\r
-    // TCA VES Response Constants\r
-    // VNF Constants\r
-    public static final String TCA_VES_RESPONSE_VNF_TARGET_TYPE = "VNF";\r
-    public static final String AAI_VNF_KEY_PREFIX = "generic-vnf.";\r
-    public static final String TCA_VES_RESPONSE_VNF_TARGET = AAI_VNF_KEY_PREFIX + "vnf-name";\r
-    // VM Constants\r
-    public static final String TCA_VES_RESPONSE_VM_TARGET_TYPE = "VM";\r
-    public static final String AAI_VSERVER_KEY_PREFIX = "vserver.";\r
-    public static final String TCA_VES_RESPONSE_VM_TARGET =  AAI_VSERVER_KEY_PREFIX + "vserver-name";\r
-    // VNF & VM - Common Constants\r
-    public static final String TCA_VES_RESPONSE_FROM = "DCAE";\r
-\r
-    // TCA VES Message Router Partition Key\r
-    public static final String TCA_VES_MESSAGE_ROUTER_PARTITION_KEY = "VESMessageHash";\r
-\r
-    /**\r
-     * Default Number of instances for Threshold violation calculator flowlet\r
-     */\r
-    public static final Integer TCA_DEFAULT_THRESHOLD_CALCULATOR_FLOWLET_INSTANCES = 2;\r
-\r
-    /**\r
-     * Default TTL for TCA VES Message status table which contain status of all messages processed by TCA\r
-     */\r
-    public static final Integer TCA_DEFAULT_VES_MESSAGE_STATUS_TTL_TABLE = 60 * 60 * 24 * 10; // 10 Days\r
-\r
-    /**\r
-     * Default TTL for TCA VES Alerts table which contains alerts that can be send to downstream systems\r
-     */\r
-    public static final Integer TCA_DEFAULT_VES_ALERTS_TTL_TABLE = 60 * 60 * 24 * 30; // 30 Days\r
-\r
-\r
-    /**\r
-     * Default TTL for TCA Alerts abatement table which contains information to send out abated alerts\r
-     */\r
-    public static final Integer TCA_DEFAULT_ALERTS_ABATEMENT_TTL_TABLE = 60 * 60 * 24 * 30; // 30 Days\r
-\r
-\r
-    // TCA Policy Runtime Argument Paths\r
-    public static final String TCA_POLICY_DELIMITER = ".";\r
-    public static final String TCA_POLICY_DOMAIN_PATH = "domain";\r
-    public static final String TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH = "configuration.metricsPerEventName";\r
-    public static final String TCA_POLICY_THRESHOLDS_PATH_POSTFIX = "thresholds";\r
-\r
-    public static final String TCA_POLICY_JSON_KEY = "tca_policy";\r
-    public static final String TCA_POLICY_STRING_DELIMITER = "\"";\r
-\r
-    // TCA Alert output format by default is not CEF\r
-    public static final Boolean TCA_DEFAULT_ENABLE_CEF_FORMATTED_ALERT = false;\r
-\r
-    // TCA A&AI Enrichment is disabled by default\r
-    public static final Boolean TCA_DEFAULT_ENABLE_AAI_ENRICHMENT = false;\r
-    // TCA A&AI SSL Certificate errors by default are *NOT* ignored\r
-    public static final Boolean TCA_DEFAULT_AAI_ENRICHMENT_IGNORE_SSL_CERTIFICATE_ERRORS = false;\r
-    // TCA A&AI proxy is disabled by default\r
-    public static final String TCA_DEFAULT_AAI_ENRICHMENT_PROXY_URL = null;\r
-\r
-\r
-\r
-    private AnalyticsConstants() {\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common;
+
+/**
+ * Contains static variable for all DCAE Components.
+ *
+ * @author Rajiv Singla . Creation Date: 10/21/2016.
+ */
+public abstract class AnalyticsConstants {
+
+    // ===============  Common Constants for all DCAE Analytics Modules ==================== //
+
+
+    // ===============  DMaaP Constants for all DCAE Analytics Modules ==================== //
+
+    // DMaaP Config Constants
+    public static final Integer DEFAULT_PORT_NUMBER = 80; // default port number
+    public static final String DEFAULT_USER_NAME = null; // default to no username
+    public static final String DEFAULT_USER_PASSWORD = null; // defaults to no userPassword
+    public static final String DEFAULT_PROTOCOL = "https"; // defaults to using https protocol
+    public static final String DEFAULT_CONTENT_TYPE = "application/json";  // defaults to json content type
+
+    public static final String DMAAP_URI_PATH_PREFIX = "/events/";
+    public static final String DMAAP_GROUP_PREFIX = "OpenDCAE-";
+
+    // ================== DMaaP MR Constants ============================== //
+    // Publisher Constants
+    public static final int DEFAULT_PUBLISHER_MAX_BATCH_SIZE = 1; // disable batching by default
+    public static final int DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 100000; // default recovery messages size
+    public static final int PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE = 5; // number of retries when flushing messages
+    public static final int PUBLISHER_DELAY_MS_ON_RETRIES_ON_CLOSE = 5000; // delay in retrying for flushing messages
+    // Subscriber Constants
+    public static final int DEFAULT_SUBSCRIBER_TIMEOUT_MS = -1;
+    public static final int DEFAULT_SUBSCRIBER_MESSAGE_LIMIT = -1;
+    public static final String DEFAULT_SUBSCRIBER_GROUP_PREFIX = DMAAP_GROUP_PREFIX + "DMaaPSub-";
+    public static final String SUBSCRIBER_TIMEOUT_QUERY_PARAM_NAME = "timeout";
+    public static final String SUBSCRIBER_MSG_LIMIT_QUERY_PARAM_NAME = "limit";
+
+
+    // ================== TCA Constants ============================== //
+
+    // Default subscriber polling interval
+    public static final Integer TCA_DEFAULT_SUBSCRIBER_POLLING_INTERVAL_MS = 30000;
+
+    // Default publisher polling interval
+    public static final Integer TCA_DEFAULT_PUBLISHER_POLLING_INTERVAL_MS = 30000;
+
+    // Default publisher max batch queue size determines the minimum number of messages that need to be published in
+    // batch mode
+    public static final Integer TCA_DEFAULT_PUBLISHER_MAX_BATCH_QUEUE_SIZE = 10;
+
+    // Default publisher max recovery queue size determines max number of messages can be cached in memory
+    // in case publisher is not responding
+    public static final Integer TCA_DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 100000;
+
+    // Default interval during which TCA DMaaP Worker checks if scheduler is shut down
+    public static final Integer TCA_DEFAULT_WORKER_SHUTDOWN_CHECK_INTERVAL_MS = 5000;
+
+    // ***** TCA Quartz Scheduler Settings ******//
+
+    public static final String TCA_QUARTZ_SUBSCRIBER_PROPERTIES_FILE_NAME = "quartz-subscriber.properties";
+
+    public static final String TCA_QUARTZ_PUBLISHER_PROPERTIES_FILE_NAME = "quartz-publisher.properties";
+
+    // TCA Quartz Group Settings
+    public static final String TCA_QUARTZ_GROUP_NAME = "TCAQuartzGroup";
+    // TCA Quartz Trigger Settings
+    public static final String TCA_DMAAP_SUBSCRIBER_QUARTZ_TRIGGER_NAME = "TCADMaaPSubscriberTrigger";
+    public static final String TCA_DMAAP_PUBLISHER_QUARTZ_TRIGGER_NAME = "TCADMaaPPublisherTrigger";
+
+    // TCA Quartz DMaaP Subscriber Job Settings
+    public static final String TCA_DMAAP_SUBSCRIBER_QUARTZ_JOB_NAME = "TCADMaaPSubscriberJob";
+    public static final String TCA_DMAAP_PUBLISHER_QUARTZ_JOB_NAME = "TCADMaaPPublisherJob";
+
+    // TCA Quartz Publisher and Subscriber Job Parameters
+    // Common Job parameters for both Publisher and Subscriber
+    public static final String WORKER_CONTEXT_VARIABLE_NAME = "WORKER_CONTEXT";
+    public static final String DMAAP_METRICS_VARIABLE_NAME = "DMAAP_METRICS";
+    // TCA Quartz DMaaP Subscriber Job Parameter Settings
+    public static final String CDAP_STREAM_VARIABLE_NAME = "CDAP_STREAM_NAME";
+    public static final String DMAAP_SUBSCRIBER_VARIABLE_NAME = "DMAAP_SUBSCRIBER";
+    // TCA Quartz DMaaP Publisher Job Parameter Settings
+    public static final String CDAP_ALERTS_TABLE_VARIABLE_NAME = "CDAP_TCA_ALERTS_TABLE_NAME";
+    public static final String DMAAP_PUBLISHER_VARIABLE_NAME = "DMAAP_PUBLISHER";
+
+    // TCA VES Response Constants
+    // VNF Constants
+    public static final String TCA_VES_RESPONSE_VNF_TARGET_TYPE = "VNF";
+    public static final String AAI_VNF_KEY_PREFIX = "generic-vnf.";
+    public static final String TCA_VES_RESPONSE_VNF_TARGET = AAI_VNF_KEY_PREFIX + "vnf-name";
+    // VM Constants
+    public static final String TCA_VES_RESPONSE_VM_TARGET_TYPE = "VM";
+    public static final String AAI_VSERVER_KEY_PREFIX = "vserver.";
+    public static final String TCA_VES_RESPONSE_VM_TARGET =  AAI_VSERVER_KEY_PREFIX + "vserver-name";
+    // VNF & VM - Common Constants
+    public static final String TCA_VES_RESPONSE_FROM = "DCAE";
+
+    // TCA VES Message Router Partition Key
+    public static final String TCA_VES_MESSAGE_ROUTER_PARTITION_KEY = "VESMessageHash";
+
+    /**
+     * Default Number of instances for Threshold violation calculator flowlet
+     */
+    public static final Integer TCA_DEFAULT_THRESHOLD_CALCULATOR_FLOWLET_INSTANCES = 2;
+
+    /**
+     * Default TTL for TCA VES Message status table which contain status of all messages processed by TCA
+     */
+    public static final Integer TCA_DEFAULT_VES_MESSAGE_STATUS_TTL_TABLE = 60 * 60 * 24 * 10; // 10 Days
+
+    /**
+     * Default TTL for TCA VES Alerts table which contains alerts that can be send to downstream systems
+     */
+    public static final Integer TCA_DEFAULT_VES_ALERTS_TTL_TABLE = 60 * 60 * 24 * 30; // 30 Days
+
+
+    /**
+     * Default TTL for TCA Alerts abatement table which contains information to send out abated alerts
+     */
+    public static final Integer TCA_DEFAULT_ALERTS_ABATEMENT_TTL_TABLE = 60 * 60 * 24 * 30; // 30 Days
+
+
+    // TCA Policy Runtime Argument Paths
+    public static final String TCA_POLICY_DELIMITER = ".";
+    public static final String TCA_POLICY_DOMAIN_PATH = "domain";
+    public static final String TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH = "configuration.metricsPerEventName";
+    public static final String TCA_POLICY_THRESHOLDS_PATH_POSTFIX = "thresholds";
+
+    public static final String TCA_POLICY_JSON_KEY = "tca_policy";
+    public static final String TCA_POLICY_STRING_DELIMITER = "\"";
+
+    // TCA Alert output format by default is not CEF
+    public static final Boolean TCA_DEFAULT_ENABLE_CEF_FORMATTED_ALERT = false;
+
+    // TCA A&AI Enrichment is disabled by default
+    public static final Boolean TCA_DEFAULT_ENABLE_AAI_ENRICHMENT = false;
+    // TCA A&AI SSL Certificate errors by default are *NOT* ignored
+    public static final Boolean TCA_DEFAULT_AAI_ENRICHMENT_IGNORE_SSL_CERTIFICATE_ERRORS = false;
+    // TCA A&AI proxy is disabled by default
+    public static final String TCA_DEFAULT_AAI_ENRICHMENT_PROXY_URL = null;
+
+
+
+    private AnalyticsConstants() {
+
+    }
+
+}
@@ -1,54 +1,54 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.exception;\r
-\r
-import org.slf4j.Logger;\r
-\r
-/**\r
- * Runtime Exception for DCAE Analytics Exceptions. All DCAE Analytics\r
- * runtime Exceptions must be wrapped inside this exception\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/5/2016.\r
- */\r
-public class DCAEAnalyticsRuntimeException extends RuntimeException {\r
-\r
-\r
-    /**\r
-     * @param message - Error Message for Exception\r
-     * @param cause   - Actual Exception which caused {@link DCAEAnalyticsRuntimeException}\r
-     */\r
-    public DCAEAnalyticsRuntimeException(String message, Throwable cause) {\r
-        super(message, cause);\r
-    }\r
-\r
-    /**\r
-     * Creates and logs the DCAE Runtime Exception to given logger\r
-     *\r
-     * @param message - Error Message for Exception and logging\r
-     * @param logger  - Logger used for logging exception\r
-     * @param cause   - Actual exception which caused {@link DCAEAnalyticsRuntimeException}\r
-     */\r
-    public DCAEAnalyticsRuntimeException(String message, Logger logger, Throwable cause) {\r
-        super(message, cause);\r
-        logger.error(message);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.exception;
+
+import org.slf4j.Logger;
+
+/**
+ * Runtime Exception for DCAE Analytics Exceptions. All DCAE Analytics
+ * runtime Exceptions must be wrapped inside this exception
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/5/2016.
+ */
+public class DCAEAnalyticsRuntimeException extends RuntimeException {
+
+
+    /**
+     * @param message - Error Message for Exception
+     * @param cause   - Actual Exception which caused {@link DCAEAnalyticsRuntimeException}
+     */
+    public DCAEAnalyticsRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Creates and logs the DCAE Runtime Exception to given logger
+     *
+     * @param message - Error Message for Exception and logging
+     * @param logger  - Logger used for logging exception
+     * @param cause   - Actual exception which caused {@link DCAEAnalyticsRuntimeException}
+     */
+    public DCAEAnalyticsRuntimeException(String message, Logger logger, Throwable cause) {
+        super(message, cause);
+        logger.error(message);
+    }
+
+}
@@ -1,51 +1,51 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.exception;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.MessageProcessor;\r
-import org.slf4j.Logger;\r
-\r
-/**\r
- * Runtime Exception caused due to {@link MessageProcessor} failure while processing a message.\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public class MessageProcessingException extends DCAEAnalyticsRuntimeException {\r
-\r
-    /**\r
-     * @param message - Error Message for Exception\r
-     * @param cause   - Actual Exception which caused {@link DCAEAnalyticsRuntimeException}\r
-     */\r
-    public MessageProcessingException(String message, Throwable cause) {\r
-        super(message, cause);\r
-    }\r
-\r
-    /**\r
-     * Creates and logs the DCAE Runtime Exception to given logger\r
-     *\r
-     * @param message - Error Message for Exception and logging\r
-     * @param logger  - Logger used for logging exception\r
-     * @param cause   - Actual exception which caused {@link DCAEAnalyticsRuntimeException}\r
-     */\r
-    public MessageProcessingException(String message, Logger logger, Throwable cause) {\r
-        super(message, logger, cause);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.exception;
+
+import org.onap.dcae.apod.analytics.common.service.processor.MessageProcessor;
+import org.slf4j.Logger;
+
+/**
+ * Runtime Exception caused due to {@link MessageProcessor} failure while processing a message.
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public class MessageProcessingException extends DCAEAnalyticsRuntimeException {
+
+    /**
+     * @param message - Error Message for Exception
+     * @param cause   - Actual Exception which caused {@link DCAEAnalyticsRuntimeException}
+     */
+    public MessageProcessingException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Creates and logs the DCAE Runtime Exception to given logger
+     *
+     * @param message - Error Message for Exception and logging
+     * @param logger  - Logger used for logging exception
+     * @param cause   - Actual exception which caused {@link DCAEAnalyticsRuntimeException}
+     */
+    public MessageProcessingException(String message, Logger logger, Throwable cause) {
+        super(message, logger, cause);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.filter;\r
-\r
-import com.google.common.collect.ImmutableSet;\r
-import com.jayway.jsonpath.DocumentContext;\r
-import com.jayway.jsonpath.JsonPath;\r
-import com.jayway.jsonpath.PathNotFoundException;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-/**\r
- * A Generic Json Message Filter which filter the json message based on given json Path and list of expected values\r
- * for that json path. The {@link JsonMessageFilterProcessorContext#isMatched} flag will be changed as per table below:\r
- * <pre>\r
- *      Incoming message is blank or invalid Json                               =  null\r
- *      Incoming message path is matches expected values                        = true\r
- *      Incoming message does not match expected values or path does not exist  = false\r
- * </pre>\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 2/10/2017.\r
- */\r
-public class GenericJsonMessageFilter extends AbstractMessageProcessor<JsonMessageFilterProcessorContext> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(GenericJsonMessageFilter.class);\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final String filterName;\r
-    private final String jsonPath;\r
-    private final Set<String> expectedValues;\r
-\r
-    public GenericJsonMessageFilter(final String filterName, final String jsonPath, final Set<String> expectedValues) {\r
-        this.filterName = filterName;\r
-        this.jsonPath = jsonPath;\r
-        this.expectedValues = expectedValues;\r
-    }\r
-\r
-    public GenericJsonMessageFilter(final String filterName, final String jsonPath, final String expectedValue) {\r
-        this(filterName, jsonPath, ImmutableSet.of(expectedValue));\r
-    }\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return filterName;\r
-    }\r
-\r
-    @Override\r
-    public JsonMessageFilterProcessorContext processMessage(final JsonMessageFilterProcessorContext processorContext) {\r
-\r
-        final String jsonMessage = processorContext.getMessage().trim();\r
-\r
-        if (StringUtils.isNotBlank(jsonMessage) && jsonMessage.startsWith("{") && jsonMessage.endsWith("}")) {\r
-\r
-            // locate json path value\r
-            final DocumentContext documentContext = JsonPath.parse(jsonMessage);\r
-            String jsonPathValue = null;\r
-            try {\r
-                final List jsonPathValues = documentContext.read(jsonPath);\r
-                final Object pathValue = jsonPathValues.isEmpty() ? null :  jsonPathValues.get(0);\r
-                jsonPathValue = pathValue instanceof Number ? pathValue.toString() : (String) pathValue;\r
-            } catch (PathNotFoundException ex) {\r
-                LOG.info("Unable to find json Path: {}. Exception: {}, Json Message: {}", jsonPath, ex, jsonMessage);\r
-            }\r
-\r
-            LOG.debug("Value for jsonPath: {}, jsonPathValue: {}, expected Values: {}",\r
-                    jsonPath, jsonPathValue, expectedValues);\r
-\r
-            // if json path value is null or we json value is not present in expect values then terminate early\r
-            if (jsonPathValue == null || !expectedValues.contains(jsonPathValue)) {\r
-                final String terminatingMessage = String.format("Filter match unsuccessful. " +\r
-                                "JsonPath: %s, Actual JsonPathValue: %s, Excepted Json Path Values: %s",\r
-                        jsonPath, jsonPathValue, expectedValues);\r
-                processorContext.setMatched(false);\r
-                setTerminatingProcessingMessage(terminatingMessage, processorContext);\r
-            } else {\r
-                final String finishProcessingMessage = String.format("Filter match successful. " +\r
-                                "JsonPath: %s, Actual JsonPathValue: %s, Excepted Json Path Values: %s",\r
-                        jsonPath, jsonPathValue, expectedValues);\r
-                processorContext.setMatched(true);\r
-                setFinishedProcessingMessage(finishProcessingMessage, processorContext);\r
-            }\r
-        } else {\r
-            // if incoming message is blank of valid Json then matched flag will be null\r
-            final String terminatingMessage = "Incoming json message is blank or not json. " +\r
-                    "Json filter cannot be applied";\r
-            processorContext.setMatched(null);\r
-            setTerminatingProcessingMessage(terminatingMessage, processorContext);\r
-        }\r
-\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.filter;
+
+import com.google.common.collect.ImmutableSet;
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.PathNotFoundException;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * A Generic Json Message Filter which filter the json message based on given json Path and list of expected values
+ * for that json path. The {@link JsonMessageFilterProcessorContext#isMatched} flag will be changed as per table below:
+ * <pre>
+ *      Incoming message is blank or invalid Json                               =  null
+ *      Incoming message path is matches expected values                        = true
+ *      Incoming message does not match expected values or path does not exist  = false
+ * </pre>
+ * <p>
+ * @author Rajiv Singla . Creation Date: 2/10/2017.
+ */
+public class GenericJsonMessageFilter extends AbstractMessageProcessor<JsonMessageFilterProcessorContext> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(GenericJsonMessageFilter.class);
+    private static final long serialVersionUID = 1L;
+
+    private final String filterName;
+    private final String jsonPath;
+    private final Set<String> expectedValues;
+
+    public GenericJsonMessageFilter(final String filterName, final String jsonPath, final Set<String> expectedValues) {
+        this.filterName = filterName;
+        this.jsonPath = jsonPath;
+        this.expectedValues = expectedValues;
+    }
+
+    public GenericJsonMessageFilter(final String filterName, final String jsonPath, final String expectedValue) {
+        this(filterName, jsonPath, ImmutableSet.of(expectedValue));
+    }
+
+    @Override
+    public String getProcessorDescription() {
+        return filterName;
+    }
+
+    @Override
+    public JsonMessageFilterProcessorContext processMessage(final JsonMessageFilterProcessorContext processorContext) {
+
+        final String jsonMessage = processorContext.getMessage().trim();
+
+        if (StringUtils.isNotBlank(jsonMessage) && jsonMessage.startsWith("{") && jsonMessage.endsWith("}")) {
+
+            // locate json path value
+            final DocumentContext documentContext = JsonPath.parse(jsonMessage);
+            String jsonPathValue = null;
+            try {
+                final List jsonPathValues = documentContext.read(jsonPath);
+                final Object pathValue = jsonPathValues.isEmpty() ? null :  jsonPathValues.get(0);
+                jsonPathValue = pathValue instanceof Number ? pathValue.toString() : (String) pathValue;
+            } catch (PathNotFoundException ex) {
+                LOG.info("Unable to find json Path: {}. Exception: {}, Json Message: {}", jsonPath, ex, jsonMessage);
+            }
+
+            LOG.debug("Value for jsonPath: {}, jsonPathValue: {}, expected Values: {}",
+                    jsonPath, jsonPathValue, expectedValues);
+
+            // if json path value is null or we json value is not present in expect values then terminate early
+            if (jsonPathValue == null || !expectedValues.contains(jsonPathValue)) {
+                final String terminatingMessage = String.format("Filter match unsuccessful. " +
+                                "JsonPath: %s, Actual JsonPathValue: %s, Excepted Json Path Values: %s",
+                        jsonPath, jsonPathValue, expectedValues);
+                processorContext.setMatched(false);
+                setTerminatingProcessingMessage(terminatingMessage, processorContext);
+            } else {
+                final String finishProcessingMessage = String.format("Filter match successful. " +
+                                "JsonPath: %s, Actual JsonPathValue: %s, Excepted Json Path Values: %s",
+                        jsonPath, jsonPathValue, expectedValues);
+                processorContext.setMatched(true);
+                setFinishedProcessingMessage(finishProcessingMessage, processorContext);
+            }
+        } else {
+            // if incoming message is blank of valid Json then matched flag will be null
+            final String terminatingMessage = "Incoming json message is blank or not json. " +
+                    "Json filter cannot be applied";
+            processorContext.setMatched(null);
+            setTerminatingProcessingMessage(terminatingMessage, processorContext);
+        }
+
+        return processorContext;
+    }
+}
@@ -1,57 +1,57 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.filter;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.AbstractProcessorContext;\r
-\r
-/**\r
- * A processor context for Json Message Filter Processor\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 2/10/2017.\r
- */\r
-public class JsonMessageFilterProcessorContext extends AbstractProcessorContext {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private Boolean isMatched;\r
-\r
-    public JsonMessageFilterProcessorContext(final String jsonMessageString) {\r
-        super(jsonMessageString, true);\r
-    }\r
-\r
-    /**\r
-     * Returns true if Json Message Filter match was successful\r
-     *\r
-     * @return true if Json Message Filter match was successful, false if filter was match was unsuccessful\r
-     */\r
-    public Boolean getMatched() {\r
-        return isMatched;\r
-    }\r
-\r
-    /**\r
-     * Sets the value for Json Message Filter match\r
-     *\r
-     * @param matched new value for json message filter match\r
-     */\r
-    public void setMatched(final Boolean matched) {\r
-        isMatched = matched;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.filter;
+
+import org.onap.dcae.apod.analytics.common.service.processor.AbstractProcessorContext;
+
+/**
+ * A processor context for Json Message Filter Processor
+ * <p>
+ * @author Rajiv Singla . Creation Date: 2/10/2017.
+ */
+public class JsonMessageFilterProcessorContext extends AbstractProcessorContext {
+
+    private static final long serialVersionUID = 1L;
+
+    private Boolean isMatched;
+
+    public JsonMessageFilterProcessorContext(final String jsonMessageString) {
+        super(jsonMessageString, true);
+    }
+
+    /**
+     * Returns true if Json Message Filter match was successful
+     *
+     * @return true if Json Message Filter match was successful, false if filter was match was unsuccessful
+     */
+    public Boolean getMatched() {
+        return isMatched;
+    }
+
+    /**
+     * Sets the value for Json Message Filter match
+     *
+     * @param matched new value for json message filter match
+     */
+    public void setMatched(final Boolean matched) {
+        isMatched = matched;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import com.google.common.base.Optional;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * An abstract Message Processor which can be extended by {@link MessageProcessor} implementations\r
- * to get default behavior for Message Processors\r
- *\r
- * @param <P> Processor Context sub classes\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public abstract class AbstractMessageProcessor<P extends ProcessorContext> implements MessageProcessor<P> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractMessageProcessor.class);\r
-\r
-    /**\r
-     * By Default there is no processing message\r
-     */\r
-    private String processingMessage = null;\r
-\r
-    /**\r
-     * By Default Processing State is set to not required - subclasses must\r
-     * set processing state to {@link ProcessingState#PROCESSING_FINISHED_SUCCESSFULLY} on successful processing\r
-     * or {@link ProcessingState#PROCESSING_TERMINATED_EARLY} if processing fails\r
-     */\r
-    protected ProcessingState processingState = ProcessingState.PROCESSING_NOT_REQUIRED;\r
-\r
-    /**\r
-     * Sub classes must provide a description of a processor\r
-     *\r
-     * @return description of processor\r
-     *\r
-     */\r
-    public abstract String getProcessorDescription();\r
-\r
-\r
-    /**\r
-     * Sub classes must provide implementation to process Message\r
-     *\r
-     * @param processorContext incoming {@link ProcessorContext}\r
-     * @return outgoing {@link ProcessorContext}\r
-     */\r
-    public abstract P processMessage(P processorContext);\r
-\r
-    @Override\r
-    public ProcessorInfo getProcessorInfo() {\r
-        // by default the class of the Processor is assigned as Processor Name\r
-        final String processorClassName = getClass().getSimpleName();\r
-        return new GenericProcessorInfo(processorClassName, getProcessorDescription());\r
-    }\r
-\r
-    @Override\r
-    public P preProcessor(P processorContext) {\r
-        LOG.debug("Processing Started for Processor: {}", getProcessorInfo().getProcessorName());\r
-        // by default check to see if continue processing Flag is not false\r
-        final boolean okToContinue = processorContext.canProcessingContinue();\r
-        if (!okToContinue) {\r
-            final String errorMessage =\r
-                    format("Processor: %s. Processing Context flag okToContinue is false. Unable to proceed...",\r
-                            getProcessorInfo().getProcessorName());\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalStateException(errorMessage));\r
-        }\r
-        processingState = ProcessingState.PROCESSING_STARTED;\r
-        return processorContext;\r
-    }\r
-\r
-    @Override\r
-    public ProcessingState getProcessingState() {\r
-        return processingState;\r
-    }\r
-\r
-    @Override\r
-    public Optional<String> getProcessingMessage() {\r
-        return Optional.fromNullable(processingMessage);\r
-    }\r
-\r
-    @Override\r
-    public P postProcessor(P processorContext) {\r
-        // Default implementation updates the post processing flag if processing did not\r
-        // completed successfully\r
-        if (processingState != ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY) {\r
-            LOG.debug("Processor: {}, Update Process Context State to stop Processing.",\r
-                    getProcessorInfo().getProcessorName());\r
-            processorContext.setProcessingContinueFlag(false);\r
-        }\r
-        // attaches itself to message processor context\r
-        processorContext.getMessageProcessors().add(this);\r
-        LOG.debug("Processing Completed for Processor: {}", getProcessorInfo());\r
-        return processorContext;\r
-    }\r
-\r
-\r
-    @Override\r
-    public final P apply(@Nonnull P processorContext) {\r
-        final P preProcessedProcessorContext = preProcessor(processorContext);\r
-        final P processedProcessorContext = processMessage(preProcessedProcessorContext);\r
-        return postProcessor(processedProcessorContext);\r
-    }\r
-\r
-\r
-    /**\r
-     * Helper method that updates processing state in case of early termination, logs the processing\r
-     * termination reason, updates Processor processing state as Terminated and sets it processing message\r
-     *\r
-     * @param terminatingMessage error Message\r
-     * @param processorContext message processor context\r
-     */\r
-    protected void setTerminatingProcessingMessage(final String terminatingMessage,\r
-                                                   final P processorContext) {\r
-\r
-        final String message = processorContext.getMessage();\r
-        this.processingState = ProcessingState.PROCESSING_TERMINATED_EARLY;\r
-        this.processingMessage = terminatingMessage;\r
-        LOG.debug("Processor: {}, Early Terminating Message: {}, Incoming Message: {}",\r
-                getProcessorInfo().getProcessorName(), terminatingMessage, message);\r
-    }\r
-\r
-    /**\r
-     * Helper method that updates Processing state and logs completion message\r
-     * passed\r
-     *\r
-     * @param processorPassingMessage Processor passing message\r
-     * @param processorContext message processor context\r
-     */\r
-    protected void setFinishedProcessingMessage(final String processorPassingMessage, P processorContext) {\r
-        final String message = processorContext.getMessage();\r
-        processingState = ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY;\r
-        this.processingMessage = processorPassingMessage;\r
-        LOG.debug("Processor: {}, Successful Completion Message: {}, Incoming Message: {}",\r
-                getProcessorInfo().getProcessorName(), processorPassingMessage, message);\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import com.google.common.base.Optional;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import static java.lang.String.format;
+
+/**
+ * An abstract Message Processor which can be extended by {@link MessageProcessor} implementations
+ * to get default behavior for Message Processors
+ *
+ * @param <P> Processor Context sub classes
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public abstract class AbstractMessageProcessor<P extends ProcessorContext> implements MessageProcessor<P> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractMessageProcessor.class);
+
+    /**
+     * By Default there is no processing message
+     */
+    private String processingMessage = null;
+
+    /**
+     * By Default Processing State is set to not required - subclasses must
+     * set processing state to {@link ProcessingState#PROCESSING_FINISHED_SUCCESSFULLY} on successful processing
+     * or {@link ProcessingState#PROCESSING_TERMINATED_EARLY} if processing fails
+     */
+    protected ProcessingState processingState = ProcessingState.PROCESSING_NOT_REQUIRED;
+
+    /**
+     * Sub classes must provide a description of a processor
+     *
+     * @return description of processor
+     *
+     */
+    public abstract String getProcessorDescription();
+
+
+    /**
+     * Sub classes must provide implementation to process Message
+     *
+     * @param processorContext incoming {@link ProcessorContext}
+     * @return outgoing {@link ProcessorContext}
+     */
+    public abstract P processMessage(P processorContext);
+
+    @Override
+    public ProcessorInfo getProcessorInfo() {
+        // by default the class of the Processor is assigned as Processor Name
+        final String processorClassName = getClass().getSimpleName();
+        return new GenericProcessorInfo(processorClassName, getProcessorDescription());
+    }
+
+    @Override
+    public P preProcessor(P processorContext) {
+        LOG.debug("Processing Started for Processor: {}", getProcessorInfo().getProcessorName());
+        // by default check to see if continue processing Flag is not false
+        final boolean okToContinue = processorContext.canProcessingContinue();
+        if (!okToContinue) {
+            final String errorMessage =
+                    format("Processor: %s. Processing Context flag okToContinue is false. Unable to proceed...",
+                            getProcessorInfo().getProcessorName());
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalStateException(errorMessage));
+        }
+        processingState = ProcessingState.PROCESSING_STARTED;
+        return processorContext;
+    }
+
+    @Override
+    public ProcessingState getProcessingState() {
+        return processingState;
+    }
+
+    @Override
+    public Optional<String> getProcessingMessage() {
+        return Optional.fromNullable(processingMessage);
+    }
+
+    @Override
+    public P postProcessor(P processorContext) {
+        // Default implementation updates the post processing flag if processing did not
+        // completed successfully
+        if (processingState != ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY) {
+            LOG.debug("Processor: {}, Update Process Context State to stop Processing.",
+                    getProcessorInfo().getProcessorName());
+            processorContext.setProcessingContinueFlag(false);
+        }
+        // attaches itself to message processor context
+        processorContext.getMessageProcessors().add(this);
+        LOG.debug("Processing Completed for Processor: {}", getProcessorInfo());
+        return processorContext;
+    }
+
+
+    @Override
+    public final P apply(@Nonnull P processorContext) {
+        final P preProcessedProcessorContext = preProcessor(processorContext);
+        final P processedProcessorContext = processMessage(preProcessedProcessorContext);
+        return postProcessor(processedProcessorContext);
+    }
+
+
+    /**
+     * Helper method that updates processing state in case of early termination, logs the processing
+     * termination reason, updates Processor processing state as Terminated and sets it processing message
+     *
+     * @param terminatingMessage error Message
+     * @param processorContext message processor context
+     */
+    protected void setTerminatingProcessingMessage(final String terminatingMessage,
+                                                   final P processorContext) {
+
+        final String message = processorContext.getMessage();
+        this.processingState = ProcessingState.PROCESSING_TERMINATED_EARLY;
+        this.processingMessage = terminatingMessage;
+        LOG.debug("Processor: {}, Early Terminating Message: {}, Incoming Message: {}",
+                getProcessorInfo().getProcessorName(), terminatingMessage, message);
+    }
+
+    /**
+     * Helper method that updates Processing state and logs completion message
+     * passed
+     *
+     * @param processorPassingMessage Processor passing message
+     * @param processorContext message processor context
+     */
+    protected void setFinishedProcessingMessage(final String processorPassingMessage, P processorContext) {
+        final String message = processorContext.getMessage();
+        processingState = ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY;
+        this.processingMessage = processorPassingMessage;
+        LOG.debug("Processor: {}, Successful Completion Message: {}, Incoming Message: {}",
+                getProcessorInfo().getProcessorName(), processorPassingMessage, message);
+    }
+
+
+}
@@ -1,96 +1,96 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import com.google.common.base.Objects;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-/**\r
- * <p>\r
- *      An abstract implementation for {@link ProcessorContext} which other DCAE Analytics Modules\r
- *      can extend to add module specific functionality\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public abstract class AbstractProcessorContext implements ProcessorContext {\r
-\r
-    private final String message;\r
-    private List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors;\r
-    private boolean canProcessingContinue;\r
-\r
-    public AbstractProcessorContext(final String message,\r
-                                    boolean canProcessingContinue) {\r
-        this.message = message;\r
-        this.canProcessingContinue = canProcessingContinue;\r
-        this.messageProcessors = new LinkedList<>();\r
-    }\r
-\r
-    /**\r
-     * Returns JSON String of incoming CEF Message that needs to be processed\r
-     *\r
-     * @return incoming CEF message that needs to be processed\r
-     */\r
-    @Override\r
-    public String getMessage() {\r
-        return message;\r
-    }\r
-\r
-    /**\r
-     * Sets if it is ok to continue processing normally\r
-     *\r
-     * @return boolean which determines if it is ok to continue processing normally\r
-     */\r
-    @Override\r
-    public boolean canProcessingContinue() {\r
-        return canProcessingContinue;\r
-    }\r
-\r
-\r
-    /**\r
-     * Set if it is ok to continue processing normally\r
-     *\r
-     * @param canProcessingContinue sets boolean which determines if it is ok to continue processing normally\r
-     */\r
-    @Override\r
-    public void setProcessingContinueFlag(boolean canProcessingContinue) {\r
-        this.canProcessingContinue = canProcessingContinue;\r
-    }\r
-\r
-    /**\r
-     * Provides List of message processors which were used in processing CEF message\r
-     *\r
-     * @return List of message processors which were used in processing CEF message\r
-     */\r
-    @Override\r
-    public List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors() {\r
-        return messageProcessors;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("canProcessingContinue", canProcessingContinue)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import com.google.common.base.Objects;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * <p>
+ *      An abstract implementation for {@link ProcessorContext} which other DCAE Analytics Modules
+ *      can extend to add module specific functionality
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public abstract class AbstractProcessorContext implements ProcessorContext {
+
+    private final String message;
+    private List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors;
+    private boolean canProcessingContinue;
+
+    public AbstractProcessorContext(final String message,
+                                    boolean canProcessingContinue) {
+        this.message = message;
+        this.canProcessingContinue = canProcessingContinue;
+        this.messageProcessors = new LinkedList<>();
+    }
+
+    /**
+     * Returns JSON String of incoming CEF Message that needs to be processed
+     *
+     * @return incoming CEF message that needs to be processed
+     */
+    @Override
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * Sets if it is ok to continue processing normally
+     *
+     * @return boolean which determines if it is ok to continue processing normally
+     */
+    @Override
+    public boolean canProcessingContinue() {
+        return canProcessingContinue;
+    }
+
+
+    /**
+     * Set if it is ok to continue processing normally
+     *
+     * @param canProcessingContinue sets boolean which determines if it is ok to continue processing normally
+     */
+    @Override
+    public void setProcessingContinueFlag(boolean canProcessingContinue) {
+        this.canProcessingContinue = canProcessingContinue;
+    }
+
+    /**
+     * Provides List of message processors which were used in processing CEF message
+     *
+     * @return List of message processors which were used in processing CEF message
+     */
+    @Override
+    public List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors() {
+        return messageProcessors;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("canProcessingContinue", canProcessingContinue)
+                .toString();
+    }
+}
@@ -1,70 +1,70 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.utils.MessageProcessorUtils.MessageProcessorFunction;\r
-\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.MessageProcessorUtils.computeMessageProcessorChain;\r
-\r
-/**\r
- * <p>\r
- *     A Generic Message Processor which passes the {@link ProcessorContext} from first to second\r
- *     {@link MessageProcessor}\r
- * </p>\r
- *\r
- * @param <P> Processor Context sub classes\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public class GenericMessageChainProcessor<P extends ProcessorContext> {\r
-\r
-    private final List<? extends MessageProcessor<P>> messageProcessors;\r
-    private final P initialProcessorContext;\r
-\r
-    public GenericMessageChainProcessor(List<? extends MessageProcessor<P>> messageProcessors,\r
-                                        P initialProcessorContext) {\r
-        this.messageProcessors = messageProcessors;\r
-        this.initialProcessorContext = initialProcessorContext;\r
-    }\r
-\r
-    /**\r
-     * Process a processor chain\r
-     *\r
-     * @return Processor Context after processing the processor chain\r
-     */\r
-    public P processChain() {\r
-\r
-        final MessageProcessorFunction<P> messageProcessorFunction =\r
-                new MessageProcessorFunction<P>() {\r
-                    @Override\r
-                    public <M extends MessageProcessor<P>> P apply(P context, M processor) {\r
-                        return processor.apply(context);\r
-                    }\r
-                };\r
-\r
-        return computeMessageProcessorChain(messageProcessors, initialProcessorContext,\r
-                messageProcessorFunction);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import org.onap.dcae.apod.analytics.common.utils.MessageProcessorUtils.MessageProcessorFunction;
+
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.common.utils.MessageProcessorUtils.computeMessageProcessorChain;
+
+/**
+ * <p>
+ *     A Generic Message Processor which passes the {@link ProcessorContext} from first to second
+ *     {@link MessageProcessor}
+ * </p>
+ *
+ * @param <P> Processor Context sub classes
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public class GenericMessageChainProcessor<P extends ProcessorContext> {
+
+    private final List<? extends MessageProcessor<P>> messageProcessors;
+    private final P initialProcessorContext;
+
+    public GenericMessageChainProcessor(List<? extends MessageProcessor<P>> messageProcessors,
+                                        P initialProcessorContext) {
+        this.messageProcessors = messageProcessors;
+        this.initialProcessorContext = initialProcessorContext;
+    }
+
+    /**
+     * Process a processor chain
+     *
+     * @return Processor Context after processing the processor chain
+     */
+    public P processChain() {
+
+        final MessageProcessorFunction<P> messageProcessorFunction =
+                new MessageProcessorFunction<P>() {
+                    @Override
+                    public <M extends MessageProcessor<P>> P apply(P context, M processor) {
+                        return processor.apply(context);
+                    }
+                };
+
+        return computeMessageProcessorChain(messageProcessors, initialProcessorContext,
+                messageProcessorFunction);
+
+    }
+
+}
@@ -1,57 +1,57 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * A Generic Implementation of {@link ProcessorInfo}\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public class GenericProcessorInfo implements ProcessorInfo {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final String processorName;\r
-    private final String processorDescription;\r
-\r
-    public GenericProcessorInfo(@Nonnull String processorName, @Nonnull String processorDescription) {\r
-        this.processorName = processorName;\r
-        this.processorDescription = processorDescription;\r
-    }\r
-\r
-    @Override\r
-    public String getProcessorName() {\r
-        return processorName;\r
-    }\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return processorDescription;\r
-    }\r
-\r
-\r
-    @Override\r
-    public String toString() {\r
-        return processorName;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import javax.annotation.Nonnull;
+
+/**
+ * A Generic Implementation of {@link ProcessorInfo}
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public class GenericProcessorInfo implements ProcessorInfo {
+
+    private static final long serialVersionUID = 1L;
+
+    private final String processorName;
+    private final String processorDescription;
+
+    public GenericProcessorInfo(@Nonnull String processorName, @Nonnull String processorDescription) {
+        this.processorName = processorName;
+        this.processorDescription = processorDescription;
+    }
+
+    @Override
+    public String getProcessorName() {
+        return processorName;
+    }
+
+    @Override
+    public String getProcessorDescription() {
+        return processorDescription;
+    }
+
+
+    @Override
+    public String toString() {
+        return processorName;
+    }
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import com.google.common.base.Function;\r
-import com.google.common.base.Optional;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * <p>\r
- *     A message processor can be used to process incoming messages.\r
- *     It uses implementations of {@link ProcessorContext} as input and output\r
- * </p>\r
- *\r
- * @param <P> Message Processor Context implementations\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public interface MessageProcessor<P extends ProcessorContext> extends Function<P, P>, Serializable {\r
-\r
-    /**\r
-     * Returns processor information\r
-     *\r
-     * @return processor Information\r
-     */\r
-    ProcessorInfo getProcessorInfo();\r
-\r
-\r
-    /**\r
-     * Does pre-processing of {@link ProcessorContext} e.g. validate input conditions and return\r
-     * pre processed context\r
-     *\r
-     * @param processorContext incoming Processor Context\r
-     * @return Pre processed Processor Context\r
-     */\r
-    P preProcessor(P processorContext);\r
-\r
-\r
-    /**\r
-     * Return processing state of a processor\r
-     *\r
-     * @return Processing State\r
-     */\r
-    ProcessingState getProcessingState();\r
-\r
-\r
-    /**\r
-     * May return a message from a processor which indicates the reason for {@link ProcessingState} especially if\r
-     * there was some failure in processing\r
-     *\r
-     * @return processing Message\r
-     */\r
-    Optional<String> getProcessingMessage();\r
-\r
-\r
-    /**\r
-     * Does post-processing of {@link ProcessorContext}\r
-     *\r
-     * @param processorContext incoming Processor Context\r
-     * @return processor Context after post processing is finished\r
-     */\r
-    P postProcessor(P processorContext);\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *     A message processor can be used to process incoming messages.
+ *     It uses implementations of {@link ProcessorContext} as input and output
+ * </p>
+ *
+ * @param <P> Message Processor Context implementations
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public interface MessageProcessor<P extends ProcessorContext> extends Function<P, P>, Serializable {
+
+    /**
+     * Returns processor information
+     *
+     * @return processor Information
+     */
+    ProcessorInfo getProcessorInfo();
+
+
+    /**
+     * Does pre-processing of {@link ProcessorContext} e.g. validate input conditions and return
+     * pre processed context
+     *
+     * @param processorContext incoming Processor Context
+     * @return Pre processed Processor Context
+     */
+    P preProcessor(P processorContext);
+
+
+    /**
+     * Return processing state of a processor
+     *
+     * @return Processing State
+     */
+    ProcessingState getProcessingState();
+
+
+    /**
+     * May return a message from a processor which indicates the reason for {@link ProcessingState} especially if
+     * there was some failure in processing
+     *
+     * @return processing Message
+     */
+    Optional<String> getProcessingMessage();
+
+
+    /**
+     * Does post-processing of {@link ProcessorContext}
+     *
+     * @param processorContext incoming Processor Context
+     * @return processor Context after post processing is finished
+     */
+    P postProcessor(P processorContext);
+
+
+}
@@ -1,36 +1,36 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-/**\r
- * <p>\r
- *     Processing state of a {@link MessageProcessor}\r
- * </p>\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public enum ProcessingState {\r
-\r
-    PROCESSING_STARTED,\r
-    PROCESSING_FINISHED_SUCCESSFULLY,\r
-    PROCESSING_TERMINATED_EARLY,\r
-    PROCESSING_NOT_REQUIRED;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+/**
+ * <p>
+ *     Processing state of a {@link MessageProcessor}
+ * </p>
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public enum ProcessingState {
+
+    PROCESSING_STARTED,
+    PROCESSING_FINISHED_SUCCESSFULLY,
+    PROCESSING_TERMINATED_EARLY,
+    PROCESSING_NOT_REQUIRED;
+
+}
@@ -1,70 +1,70 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import java.io.Serializable;\r
-import java.util.List;\r
-\r
-/**\r
- * <p>\r
- *     A Processor Context is used a an input and output to a {@link MessageProcessor}\r
- *     <br>\r
- *     DCAE Analytics sub projects should extend this interface and add specific fields\r
- *     required for input and output\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public interface ProcessorContext extends Serializable {\r
-\r
-    /**\r
-     * Returns Processor Context message that will be processed by Chain of Processors\r
-     *\r
-     * @return message that need to be processed by processors\r
-     */\r
-    String getMessage();\r
-\r
-    /**\r
-     * Processing Context flag which determines if Processing can continue in a processing\r
-     * chain\r
-     *\r
-     * @return true if ok to continue processing normally\r
-     */\r
-    boolean canProcessingContinue();\r
-\r
-\r
-    /**\r
-     * Sets new value for ProcessingContinue flag which will cause early termination of processing in chain if\r
-     * set to false\r
-     *\r
-     * @param canProcessingContinue set new value for canProcessing Continue flag\r
-     */\r
-    void setProcessingContinueFlag(boolean canProcessingContinue);\r
-\r
-\r
-    /**\r
-     * Provides a List of previous processors which have completed processing\r
-     *\r
-     * @return list of previous processors\r
-     */\r
-    List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ *     A Processor Context is used a an input and output to a {@link MessageProcessor}
+ *     <br>
+ *     DCAE Analytics sub projects should extend this interface and add specific fields
+ *     required for input and output
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public interface ProcessorContext extends Serializable {
+
+    /**
+     * Returns Processor Context message that will be processed by Chain of Processors
+     *
+     * @return message that need to be processed by processors
+     */
+    String getMessage();
+
+    /**
+     * Processing Context flag which determines if Processing can continue in a processing
+     * chain
+     *
+     * @return true if ok to continue processing normally
+     */
+    boolean canProcessingContinue();
+
+
+    /**
+     * Sets new value for ProcessingContinue flag which will cause early termination of processing in chain if
+     * set to false
+     *
+     * @param canProcessingContinue set new value for canProcessing Continue flag
+     */
+    void setProcessingContinueFlag(boolean canProcessingContinue);
+
+
+    /**
+     * Provides a List of previous processors which have completed processing
+     *
+     * @return list of previous processors
+     */
+    List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors();
+
+}
@@ -1,49 +1,49 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * <p>\r
- *     Contains Information about a processor. For e.g. Processor name, processor description etc\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public interface ProcessorInfo extends Serializable {\r
-\r
-    /**\r
-     * Returns a name which should uniquely identify a particular {@link MessageProcessor}\r
-     *\r
-     * @return processor name\r
-     */\r
-    String getProcessorName();\r
-\r
-\r
-    /**\r
-     * Returns description of a {@link MessageProcessor}\r
-     *\r
-     * @return processor description\r
-     */\r
-    String getProcessorDescription();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *     Contains Information about a processor. For e.g. Processor name, processor description etc
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public interface ProcessorInfo extends Serializable {
+
+    /**
+     * Returns a name which should uniquely identify a particular {@link MessageProcessor}
+     *
+     * @return processor name
+     */
+    String getProcessorName();
+
+
+    /**
+     * Returns description of a {@link MessageProcessor}
+     *
+     * @return processor description
+     */
+    String getProcessorDescription();
+
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.utils;\r
-\r
-/**\r
- * Contains common utils to check HTTP Related Utils\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public abstract class HTTPUtils {\r
-\r
-    /**\r
-     * HTTP Status code for successful HTTP call\r
-     */\r
-    public static final Integer HTTP_SUCCESS_STATUS_CODE = 200;\r
-\r
-    /**\r
-     * HTTP Response code when request has been accepted for processing, but the processing has not been completed\r
-     */\r
-    public static final Integer HTTP_ACCEPTED_RESPONSE_CODE = 202;\r
-\r
-    /**\r
-     * HTTP Response code when there is no content\r
-     */\r
-    public static final Integer HTTP_NO_CONTENT_RESPONSE_CODE = 204;\r
-\r
-\r
-    public static final String JSON_APPLICATION_TYPE = "application/json";\r
-\r
-\r
-    private HTTPUtils() {\r
-\r
-    }\r
-\r
-    /**\r
-     *  Checks if HTTP Status code is less than or equal to 200 but less then 300\r
-     *\r
-     * @param statusCode http status code\r
-     * @return true if response code between 200 and 300\r
-     */\r
-    public static boolean isSuccessfulResponseCode(Integer statusCode) {\r
-        return statusCode >= 200 && statusCode < 300;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.utils;
+
+/**
+ * Contains common utils to check HTTP Related Utils
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public abstract class HTTPUtils {
+
+    /**
+     * HTTP Status code for successful HTTP call
+     */
+    public static final Integer HTTP_SUCCESS_STATUS_CODE = 200;
+
+    /**
+     * HTTP Response code when request has been accepted for processing, but the processing has not been completed
+     */
+    public static final Integer HTTP_ACCEPTED_RESPONSE_CODE = 202;
+
+    /**
+     * HTTP Response code when there is no content
+     */
+    public static final Integer HTTP_NO_CONTENT_RESPONSE_CODE = 204;
+
+
+    public static final String JSON_APPLICATION_TYPE = "application/json";
+
+
+    private HTTPUtils() {
+
+    }
+
+    /**
+     *  Checks if HTTP Status code is less than or equal to 200 but less then 300
+     *
+     * @param statusCode http status code
+     * @return true if response code between 200 and 300
+     */
+    public static boolean isSuccessfulResponseCode(Integer statusCode) {
+        return statusCode >= 200 && statusCode < 300;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.utils;\r
-\r
-import com.google.common.base.Preconditions;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.common.service.filter.GenericJsonMessageFilter;\r
-import org.openecomp.dcae.apod.analytics.common.service.filter.JsonMessageFilterProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.GenericMessageChainProcessor;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.MessageProcessor;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.ProcessorContext;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Iterator;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public abstract class MessageProcessorUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(MessageProcessorUtils.class);\r
-\r
-    /**\r
-     * Provides an abstraction how to apply {@link ProcessorContext} to next {@link MessageProcessor}\r
-     * in the message processor chain\r
-     *\r
-     * @param <P> Sub classes of Processor Context\r
-     */\r
-    public interface MessageProcessorFunction<P extends ProcessorContext> {\r
-\r
-        /**\r
-         * Method which provides accumulated {@link ProcessorContext} from previous processors and a reference\r
-         * to next processor in the chain\r
-         *\r
-         * @param p accumulated {@link ProcessorContext} from previous processors\r
-         * @param m current {@link MessageProcessor} in the chain\r
-         * @param <M> Message processor sub classes\r
-         *\r
-         * @return processing context after computing the current Message Processor\r
-         */\r
-        <M extends MessageProcessor<P>> P apply(P p, M m);\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides an abstraction to compute a chain of {@link MessageProcessor}\r
-     *\r
-     * @param messageProcessors An iterable containing one or more {@link MessageProcessor}s\r
-     * @param initialProcessorContext An initial processing Context\r
-     * @param messageProcessorFunction messageProcessor Function\r
-     * @param <P> Sub classes for Processor Context\r
-     *\r
-     * @return processing context which results after computing the whole chain\r
-     */\r
-    public static <P extends ProcessorContext> P computeMessageProcessorChain(\r
-            final Iterable<? extends MessageProcessor<P>> messageProcessors,\r
-            final P initialProcessorContext,\r
-            final MessageProcessorFunction<P> messageProcessorFunction) {\r
-\r
-        // Get message processor iterator\r
-        final Iterator<? extends MessageProcessor<P>> processorIterator = messageProcessors.iterator();\r
-\r
-        // If no next message processor - return initial processor context\r
-        if (!processorIterator.hasNext()) {\r
-            return initialProcessorContext;\r
-        }\r
-\r
-        // An accumulator for processor Context\r
-        P processorContextAccumulator = initialProcessorContext;\r
-\r
-        while (processorIterator.hasNext()) {\r
-\r
-            final MessageProcessor<P> nextProcessor = processorIterator.next();\r
-\r
-            // If Initial Processor Context is null\r
-            if (processorContextAccumulator == null) {\r
-                final String errorMessage =\r
-                        String.format("Processor Context must not be null for Message Process: %s",\r
-                                nextProcessor.getProcessorInfo().getProcessorName());\r
-                throw new MessageProcessingException(errorMessage, LOG, new IllegalStateException(errorMessage));\r
-            }\r
-\r
-\r
-            if (!processorContextAccumulator.canProcessingContinue()) {\r
-                LOG.debug("Triggering Early Termination, before Message Processor: {}, Incoming Message: {}",\r
-                        nextProcessor.getProcessorInfo().getProcessorName(), processorContextAccumulator.getMessage());\r
-                break;\r
-            }\r
-            processorContextAccumulator = messageProcessorFunction.apply(processorContextAccumulator, nextProcessor);\r
-        }\r
-\r
-        return processorContextAccumulator;\r
-    }\r
-\r
-\r
-    /**\r
-     * Utility method to process Json Filter Mappings. Processes incoming json message and applies a list of json\r
-     * filter mappings and returns the resulting {@link JsonMessageFilterProcessorContext}\r
-     *\r
-     * @param jsonMessage json message to which filter mappings will be applies\r
-     * @param jsonFilterMappings Filter mappings contains a Map containing keys as filter json path\r
-     * and values as set of expected value corresponding to filter path\r
-     *\r
-     * @return json message processor context which contains the {@link JsonMessageFilterProcessorContext#isMatched}\r
-     * status after applying all filter mappings\r
-     */\r
-    public static JsonMessageFilterProcessorContext processJsonFilterMappings(\r
-            final String jsonMessage, @Nonnull final Map<String, Set<String>> jsonFilterMappings) {\r
-\r
-        Preconditions.checkState(jsonFilterMappings.size() > 0, "Json Filter Mappings must not be empty");\r
-\r
-        // create initial processor context containing the json message that need to be processed\r
-        final JsonMessageFilterProcessorContext initialProcessorContext =\r
-                new JsonMessageFilterProcessorContext(jsonMessage);\r
-\r
-        // Create Json Message Filters\r
-        final List<GenericJsonMessageFilter> jsonMessageFilters = new LinkedList<>();\r
-\r
-        int i = 0;\r
-        for (Map.Entry<String, Set<String>> jsonFilterMapping : jsonFilterMappings.entrySet()) {\r
-            jsonMessageFilters.add(new GenericJsonMessageFilter("Filter-" + i, jsonFilterMapping.getKey(),\r
-                    jsonFilterMapping.getValue()));\r
-            i++;\r
-        }\r
-\r
-        // Create Generic Message Chain Processor\r
-        final GenericMessageChainProcessor<JsonMessageFilterProcessorContext> messageChainProcessor =\r
-                new GenericMessageChainProcessor<>(jsonMessageFilters, initialProcessorContext);\r
-\r
-        // Process chain and return resulting json Message Filter Processor Context\r
-        return messageChainProcessor.processChain();\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.utils;
+
+import com.google.common.base.Preconditions;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.common.service.filter.GenericJsonMessageFilter;
+import org.onap.dcae.apod.analytics.common.service.filter.JsonMessageFilterProcessorContext;
+import org.onap.dcae.apod.analytics.common.service.processor.GenericMessageChainProcessor;
+import org.onap.dcae.apod.analytics.common.service.processor.MessageProcessor;
+import org.onap.dcae.apod.analytics.common.service.processor.ProcessorContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Nonnull;
+
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public abstract class MessageProcessorUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MessageProcessorUtils.class);
+
+    /**
+     * Provides an abstraction how to apply {@link ProcessorContext} to next {@link MessageProcessor}
+     * in the message processor chain
+     *
+     * @param <P> Sub classes of Processor Context
+     */
+    public interface MessageProcessorFunction<P extends ProcessorContext> {
+
+        /**
+         * Method which provides accumulated {@link ProcessorContext} from previous processors and a reference
+         * to next processor in the chain
+         *
+         * @param p accumulated {@link ProcessorContext} from previous processors
+         * @param m current {@link MessageProcessor} in the chain
+         * @param <M> Message processor sub classes
+         *
+         * @return processing context after computing the current Message Processor
+         */
+        <M extends MessageProcessor<P>> P apply(P p, M m);
+    }
+
+
+    /**
+     * Provides an abstraction to compute a chain of {@link MessageProcessor}
+     *
+     * @param messageProcessors An iterable containing one or more {@link MessageProcessor}s
+     * @param initialProcessorContext An initial processing Context
+     * @param messageProcessorFunction messageProcessor Function
+     * @param <P> Sub classes for Processor Context
+     *
+     * @return processing context which results after computing the whole chain
+     */
+    public static <P extends ProcessorContext> P computeMessageProcessorChain(
+            final Iterable<? extends MessageProcessor<P>> messageProcessors,
+            final P initialProcessorContext,
+            final MessageProcessorFunction<P> messageProcessorFunction) {
+
+        // Get message processor iterator
+        final Iterator<? extends MessageProcessor<P>> processorIterator = messageProcessors.iterator();
+
+        // If no next message processor - return initial processor context
+        if (!processorIterator.hasNext()) {
+            return initialProcessorContext;
+        }
+
+        // An accumulator for processor Context
+        P processorContextAccumulator = initialProcessorContext;
+
+        while (processorIterator.hasNext()) {
+
+            final MessageProcessor<P> nextProcessor = processorIterator.next();
+
+            // If Initial Processor Context is null
+            if (processorContextAccumulator == null) {
+                final String errorMessage =
+                        String.format("Processor Context must not be null for Message Process: %s",
+                                nextProcessor.getProcessorInfo().getProcessorName());
+                throw new MessageProcessingException(errorMessage, LOG, new IllegalStateException(errorMessage));
+            }
+
+
+            if (!processorContextAccumulator.canProcessingContinue()) {
+                LOG.debug("Triggering Early Termination, before Message Processor: {}, Incoming Message: {}",
+                        nextProcessor.getProcessorInfo().getProcessorName(), processorContextAccumulator.getMessage());
+                break;
+            }
+            processorContextAccumulator = messageProcessorFunction.apply(processorContextAccumulator, nextProcessor);
+        }
+
+        return processorContextAccumulator;
+    }
+
+
+    /**
+     * Utility method to process Json Filter Mappings. Processes incoming json message and applies a list of json
+     * filter mappings and returns the resulting {@link JsonMessageFilterProcessorContext}
+     *
+     * @param jsonMessage json message to which filter mappings will be applies
+     * @param jsonFilterMappings Filter mappings contains a Map containing keys as filter json path
+     * and values as set of expected value corresponding to filter path
+     *
+     * @return json message processor context which contains the {@link JsonMessageFilterProcessorContext#isMatched}
+     * status after applying all filter mappings
+     */
+    public static JsonMessageFilterProcessorContext processJsonFilterMappings(
+            final String jsonMessage, @Nonnull final Map<String, Set<String>> jsonFilterMappings) {
+
+        Preconditions.checkState(jsonFilterMappings.size() > 0, "Json Filter Mappings must not be empty");
+
+        // create initial processor context containing the json message that need to be processed
+        final JsonMessageFilterProcessorContext initialProcessorContext =
+                new JsonMessageFilterProcessorContext(jsonMessage);
+
+        // Create Json Message Filters
+        final List<GenericJsonMessageFilter> jsonMessageFilters = new LinkedList<>();
+
+        int i = 0;
+        for (Map.Entry<String, Set<String>> jsonFilterMapping : jsonFilterMappings.entrySet()) {
+            jsonMessageFilters.add(new GenericJsonMessageFilter("Filter-" + i, jsonFilterMapping.getKey(),
+                    jsonFilterMapping.getValue()));
+            i++;
+        }
+
+        // Create Generic Message Chain Processor
+        final GenericMessageChainProcessor<JsonMessageFilterProcessorContext> messageChainProcessor =
+                new GenericMessageChainProcessor<>(jsonMessageFilters, initialProcessorContext);
+
+        // Process chain and return resulting json Message Filter Processor Context
+        return messageChainProcessor.processChain();
+    }
+
+
+}
@@ -1,59 +1,59 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.utils;\r
-\r
-import java.util.Date;\r
-\r
-/**\r
- * Contains Utility methods for creating persistence row keys etc.\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/16/2016.\r
- */\r
-public abstract class PersistenceUtils {\r
-\r
-\r
-    /**\r
-     * Name of the column which will contain Table Key\r
-     */\r
-    public static final String TABLE_ROW_KEY_COLUMN_NAME = "key";\r
-\r
-    /**\r
-     * Delimited to be used when creating a row key with multiple fields\r
-     */\r
-    public static final String ROW_KEY_DELIMITER = "-";\r
-\r
-\r
-    private PersistenceUtils() {\r
-\r
-    }\r
-\r
-    /**\r
-     * Creates a decreasing number using current timestamp. Handy when you want to keep records most recent records\r
-     * close to the top of column table like HBase\r
-     *\r
-     * @return decreasing number\r
-     */\r
-    public static String getCurrentTimeReverseSubKey() {\r
-        final long timeReverseLong = Long.MAX_VALUE - new Date().getTime();\r
-        return String.format("%025d", timeReverseLong);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.utils;
+
+import java.util.Date;
+
+/**
+ * Contains Utility methods for creating persistence row keys etc.
+ *
+ * @author Rajiv Singla . Creation Date: 11/16/2016.
+ */
+public abstract class PersistenceUtils {
+
+
+    /**
+     * Name of the column which will contain Table Key
+     */
+    public static final String TABLE_ROW_KEY_COLUMN_NAME = "key";
+
+    /**
+     * Delimited to be used when creating a row key with multiple fields
+     */
+    public static final String ROW_KEY_DELIMITER = "-";
+
+
+    private PersistenceUtils() {
+
+    }
+
+    /**
+     * Creates a decreasing number using current timestamp. Handy when you want to keep records most recent records
+     * close to the top of column table like HBase
+     *
+     * @return decreasing number
+     */
+    public static String getCurrentTimeReverseSubKey() {
+        final long timeReverseLong = Long.MAX_VALUE - new Date().getTime();
+        return String.format("%025d", timeReverseLong);
+    }
+
+}
@@ -1,31 +1,31 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.validation;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * Marker interface for all DCAE Validators\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public interface DCAEValidator extends Serializable {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.validation;
+
+import java.io.Serializable;
+
+/**
+ * Marker interface for all DCAE Validators
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public interface DCAEValidator extends Serializable {
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.validation;\r
-\r
-import com.google.common.base.Joiner;\r
-import com.google.common.base.Objects;\r
-\r
-import java.util.Collection;\r
-import java.util.LinkedHashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-/**\r
- * A generic implementation of Validation Response\r
- *\r
- * @param <T> Validation Entity Type\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public class GenericValidationResponse<T> implements ValidationResponse<T> {\r
-\r
-    private LinkedHashMap<String, String> errorMessageMap = new LinkedHashMap<>();\r
-\r
-    @Override\r
-    public boolean hasErrors() {\r
-        return errorMessageMap.size() != 0;\r
-    }\r
-\r
-    @Override\r
-    public Set<String> getFieldNamesWithError() {\r
-        return errorMessageMap.keySet();\r
-    }\r
-\r
-    @Override\r
-    public Collection<String> getErrorMessages() {\r
-        return errorMessageMap.values();\r
-    }\r
-\r
-    @Override\r
-    public Map<String, String> getValidationResultsAsMap() {\r
-        return errorMessageMap;\r
-    }\r
-\r
-    @Override\r
-    public String getAllErrorMessage() {\r
-        return getAllErrorMessage(",");\r
-    }\r
-\r
-    @Override\r
-    public String getAllErrorMessage(String delimiter) {\r
-        return Joiner.on(delimiter).join(errorMessageMap.values());\r
-    }\r
-\r
-    @Override\r
-    public void addErrorMessage(String fieldName, String filedErrorMessage) {\r
-        errorMessageMap.put(fieldName, filedErrorMessage);\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("hasErrors", hasErrors())\r
-                .add("errorMessageMap", errorMessageMap)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.validation;
+
+import com.google.common.base.Joiner;
+import com.google.common.base.Objects;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * A generic implementation of Validation Response
+ *
+ * @param <T> Validation Entity Type
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public class GenericValidationResponse<T> implements ValidationResponse<T> {
+
+    private LinkedHashMap<String, String> errorMessageMap = new LinkedHashMap<>();
+
+    @Override
+    public boolean hasErrors() {
+        return errorMessageMap.size() != 0;
+    }
+
+    @Override
+    public Set<String> getFieldNamesWithError() {
+        return errorMessageMap.keySet();
+    }
+
+    @Override
+    public Collection<String> getErrorMessages() {
+        return errorMessageMap.values();
+    }
+
+    @Override
+    public Map<String, String> getValidationResultsAsMap() {
+        return errorMessageMap;
+    }
+
+    @Override
+    public String getAllErrorMessage() {
+        return getAllErrorMessage(",");
+    }
+
+    @Override
+    public String getAllErrorMessage(String delimiter) {
+        return Joiner.on(delimiter).join(errorMessageMap.values());
+    }
+
+    @Override
+    public void addErrorMessage(String fieldName, String filedErrorMessage) {
+        errorMessageMap.put(fieldName, filedErrorMessage);
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("hasErrors", hasErrors())
+                .add("errorMessageMap", errorMessageMap)
+                .toString();
+    }
+}
@@ -1,90 +1,90 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.validation;\r
-\r
-import java.util.Collection;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-/**\r
- * Validation Response contract\r
- *\r
- * @param <T> Entity class type which is being validated\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public interface ValidationResponse<T> {\r
-\r
-    /**\r
-     * Returns true if validation resulted in one or more errors\r
-     *\r
-     * @return true if validation has errors\r
-     */\r
-    boolean hasErrors();\r
-\r
-    /**\r
-     * Returns all field names which have error\r
-     *\r
-     * @return names of fields which have error\r
-     */\r
-    Set<String> getFieldNamesWithError();\r
-\r
-    /**\r
-     * Returns list of all error messages\r
-     *\r
-     * @return list of error messages\r
-     */\r
-    Collection<String> getErrorMessages();\r
-\r
-\r
-    /**\r
-     * Returns all error messages as string delimited by comma\r
-     *\r
-     * @return all error messages delimited by given delimiter\r
-     */\r
-    String getAllErrorMessage();\r
-\r
-    /**\r
-     * Returns all error messages as string delimited by given delimited\r
-     *\r
-     * @param delimiter delimited to be used for error message\r
-     * @return all error messages delimited by given delimiter\r
-     */\r
-    String getAllErrorMessage(String delimiter);\r
-\r
-    /**\r
-     * Adds field name and error message to the validation response\r
-     *\r
-     * @param fieldName field name which has validation error\r
-     * @param filedErrorMessage validation error message\r
-     */\r
-    void addErrorMessage(String fieldName, String filedErrorMessage);\r
-\r
-\r
-    /**\r
-     * Returns validation results as map containing values as keys and values\r
-     * as error Message\r
-     *\r
-     * @return Map containing field names and error message associated with those fields\r
-     */\r
-    Map<String, String> getValidationResultsAsMap();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.validation;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Validation Response contract
+ *
+ * @param <T> Entity class type which is being validated
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public interface ValidationResponse<T> {
+
+    /**
+     * Returns true if validation resulted in one or more errors
+     *
+     * @return true if validation has errors
+     */
+    boolean hasErrors();
+
+    /**
+     * Returns all field names which have error
+     *
+     * @return names of fields which have error
+     */
+    Set<String> getFieldNamesWithError();
+
+    /**
+     * Returns list of all error messages
+     *
+     * @return list of error messages
+     */
+    Collection<String> getErrorMessages();
+
+
+    /**
+     * Returns all error messages as string delimited by comma
+     *
+     * @return all error messages delimited by given delimiter
+     */
+    String getAllErrorMessage();
+
+    /**
+     * Returns all error messages as string delimited by given delimited
+     *
+     * @param delimiter delimited to be used for error message
+     * @return all error messages delimited by given delimiter
+     */
+    String getAllErrorMessage(String delimiter);
+
+    /**
+     * Adds field name and error message to the validation response
+     *
+     * @param fieldName field name which has validation error
+     * @param filedErrorMessage validation error message
+     */
+    void addErrorMessage(String fieldName, String filedErrorMessage);
+
+
+    /**
+     * Returns validation results as map containing values as keys and values
+     * as error Message
+     *
+     * @return Map containing field names and error message associated with those fields
+     */
+    Map<String, String> getValidationResultsAsMap();
+
+}
@@ -1,81 +1,81 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common;\r
-\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.junit.BeforeClass;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.TestEarlyTerminatingProcessor;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.TestMessageProcessor1;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.TestMessageProcessor2;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-/**\r
- * Base class from all DCEA Analytics Common Module Unit Tests\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/6/2016.\r
- */\r
-public abstract class BaseAnalyticsCommonUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-\r
-    protected static final String TEST_MESSAGE_PROCESSOR_MESSAGE = "Test Processor Message";\r
-\r
-    protected static final String CEF_MESSAGE_FILE_PATH = "data/json/cef/cef_message.json";\r
-\r
-    protected static ObjectMapper objectMapper;\r
-\r
-    /**\r
-     * Before running test cases need to assign object mapper.\r
-     */\r
-    @BeforeClass\r
-    public static void beforeClass() {\r
-        final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =\r
-                new AnalyticsModelObjectMapperSupplier();\r
-        objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();\r
-    }\r
-\r
-    /*\r
-     * Test implementation for {@link CDAPAppSettings}\r
-     */\r
-    protected class CDAPTestAppSettings {\r
-\r
-        private String settingsField;\r
-\r
-        public String getSettingsField() {\r
-            return settingsField;\r
-        }\r
-\r
-        public void setSettingsField(String settingsField) {\r
-            this.settingsField = settingsField;\r
-        }\r
-    }\r
-\r
-    protected TestMessageProcessor1 getTestMessageProcessor1() {\r
-         return new TestMessageProcessor1();\r
-    }\r
-    protected TestMessageProcessor2 getTestMessageProcessor2() {\r
-        return new TestMessageProcessor2();\r
-    }\r
-    protected TestEarlyTerminatingProcessor getTestEarlyTerminationProcessor() {\r
-        return new TestEarlyTerminatingProcessor();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.junit.BeforeClass;
+import org.onap.dcae.apod.analytics.common.service.processor.TestEarlyTerminatingProcessor;
+import org.onap.dcae.apod.analytics.common.service.processor.TestMessageProcessor1;
+import org.onap.dcae.apod.analytics.common.service.processor.TestMessageProcessor2;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+/**
+ * Base class from all DCEA Analytics Common Module Unit Tests
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/6/2016.
+ */
+public abstract class BaseAnalyticsCommonUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+
+    protected static final String TEST_MESSAGE_PROCESSOR_MESSAGE = "Test Processor Message";
+
+    protected static final String CEF_MESSAGE_FILE_PATH = "data/json/cef/cef_message.json";
+
+    protected static ObjectMapper objectMapper;
+
+    /**
+     * Before running test cases need to assign object mapper.
+     */
+    @BeforeClass
+    public static void beforeClass() {
+        final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =
+                new AnalyticsModelObjectMapperSupplier();
+        objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();
+    }
+
+    /*
+     * Test implementation for {@link CDAPAppSettings}
+     */
+    protected class CDAPTestAppSettings {
+
+        private String settingsField;
+
+        public String getSettingsField() {
+            return settingsField;
+        }
+
+        public void setSettingsField(String settingsField) {
+            this.settingsField = settingsField;
+        }
+    }
+
+    protected TestMessageProcessor1 getTestMessageProcessor1() {
+         return new TestMessageProcessor1();
+    }
+    protected TestMessageProcessor2 getTestMessageProcessor2() {
+        return new TestMessageProcessor2();
+    }
+    protected TestEarlyTerminatingProcessor getTestEarlyTerminationProcessor() {
+        return new TestEarlyTerminatingProcessor();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.filter;\r
-\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.GenericMessageChainProcessor;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 2/10/2017.\r
- */\r
-public class GenericJsonMessageFilterTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-    private String jsonMessage;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        jsonMessage = fromStream(CEF_MESSAGE_FILE_PATH);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testJsonMessageFilterWhenAllFiltersPassed() throws Exception {\r
-\r
-        final JsonMessageFilterProcessorContext finalMessageProcessorContext =\r
-                processJsonMessageFilterChain(jsonMessage,\r
-                        "domainFilter", "$.event.commonEventHeader.domain", "measurementsForVfScaling",\r
-                        "eventNameFilter", "$.event.commonEventHeader.eventName", "Mfvs_eNodeB_RANKPI");\r
-\r
-        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, true, true, 2);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testJsonMessageFilterWhenJsonPathValueIsANumber() throws Exception {\r
-\r
-        final JsonMessageFilterProcessorContext finalMessageProcessorContext =\r
-                processJsonMessageFilterChain(jsonMessage,\r
-                        "domainFilter", "$.event.commonEventHeader.sequence", "0",\r
-                        "eventNameFilter", "$.event.commonEventHeader.eventName", "Mfvs_eNodeB_RANKPI");\r
-\r
-        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, true, true, 2);\r
-    }\r
-\r
-    @Test\r
-    public void testJsonMessageFilterWhenOneFilterDoesNotMatch() throws Exception {\r
-\r
-        final JsonMessageFilterProcessorContext finalMessageProcessorContext =\r
-                processJsonMessageFilterChain(jsonMessage,\r
-                        "domainFilter", "$.event.commonEventHeader.domain", "xxxxxxxxxxx",\r
-                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");\r
-\r
-        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, false, false, 1);\r
-    }\r
-\r
-    @Test\r
-    public void testJsonMessageFilterWhenJsonPathDoesNotExist() throws Exception {\r
-\r
-        final JsonMessageFilterProcessorContext finalMessageProcessorContext =\r
-                processJsonMessageFilterChain(jsonMessage,\r
-                        "domainFilter", "$.event.commonEventHeader.xxxxxxx", "measurementsForVfScaling",\r
-                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");\r
-\r
-        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, false, false, 1);\r
-    }\r
-\r
-    @Test\r
-    public void testJsonMessageFilterWhenIncomingMessageIsBlank() throws Exception {\r
-\r
-        final JsonMessageFilterProcessorContext finalMessageProcessorContext =\r
-                processJsonMessageFilterChain("",\r
-                        "domainFilter", "$.event.commonEventHeader.domain", "measurementsForVfScaling",\r
-                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");\r
-\r
-        assertJsonMessageAssertions("", finalMessageProcessorContext, false, null, 1);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testJsonMessageFilterWhenIncomingMessageIsNotValidJson() throws Exception {\r
-\r
-        final JsonMessageFilterProcessorContext finalMessageProcessorContext =\r
-                processJsonMessageFilterChain("invalidJson",\r
-                        "domainFilter", "$.event.commonEventHeader.domain", "measurementsForVfScaling",\r
-                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");\r
-\r
-        assertJsonMessageAssertions("invalidJson", finalMessageProcessorContext, false, null, 1);\r
-\r
-    }\r
-\r
-\r
-    private static void assertJsonMessageAssertions(\r
-            final String jsonMessage, final JsonMessageFilterProcessorContext finalMessageProcessorContext,\r
-            final Boolean canProcessingContinueFlag, final Boolean matchedFlag,\r
-            final int messageProcessorCount) throws Exception {\r
-\r
-        assertJson(jsonMessage, finalMessageProcessorContext.getMessage());\r
-        Assert.assertEquals(canProcessingContinueFlag, finalMessageProcessorContext.canProcessingContinue());\r
-        assertEquals(matchedFlag, finalMessageProcessorContext.getMatched());\r
-        Assert.assertEquals(finalMessageProcessorContext.getMessageProcessors().size(), messageProcessorCount);\r
-\r
-    }\r
-\r
-\r
-    private static JsonMessageFilterProcessorContext processJsonMessageFilterChain(\r
-            final String jsonMessage,\r
-            final String firstFilterName, final String firstFilterPath, final String firstFilterValue,\r
-            final String secondFilterName, final String secondFilterPath, final String secondFilterValue) {\r
-\r
-        // create processors\r
-        final GenericJsonMessageFilter firstFilter = new GenericJsonMessageFilter(firstFilterName, firstFilterPath,\r
-                firstFilterValue);\r
-        final GenericJsonMessageFilter secondFilter = new GenericJsonMessageFilter(secondFilterName,\r
-                secondFilterPath, secondFilterValue);\r
-\r
-        // create initial processor context containing the json message that need to be processed\r
-        final JsonMessageFilterProcessorContext initialProcessorContext =\r
-                new JsonMessageFilterProcessorContext(jsonMessage);\r
-\r
-        // create a generic message chain processor and feed it list of processors and initialProcessor context\r
-        final GenericMessageChainProcessor<JsonMessageFilterProcessorContext> messageChainProcessor =\r
-                new GenericMessageChainProcessor<>(ImmutableList.of(firstFilter, secondFilter),\r
-                        initialProcessorContext);\r
-\r
-        // process the generic message chain\r
-        return messageChainProcessor.processChain();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.filter;
+
+import com.google.common.collect.ImmutableList;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+import org.onap.dcae.apod.analytics.common.service.processor.GenericMessageChainProcessor;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author Rajiv Singla . Creation Date: 2/10/2017.
+ */
+public class GenericJsonMessageFilterTest extends BaseAnalyticsCommonUnitTest {
+
+    private String jsonMessage;
+
+    @Before
+    public void before() throws Exception {
+        jsonMessage = fromStream(CEF_MESSAGE_FILE_PATH);
+
+    }
+
+    @Test
+    public void testJsonMessageFilterWhenAllFiltersPassed() throws Exception {
+
+        final JsonMessageFilterProcessorContext finalMessageProcessorContext =
+                processJsonMessageFilterChain(jsonMessage,
+                        "domainFilter", "$.event.commonEventHeader.domain", "measurementsForVfScaling",
+                        "eventNameFilter", "$.event.commonEventHeader.eventName", "Mfvs_eNodeB_RANKPI");
+
+        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, true, true, 2);
+
+    }
+
+    @Test
+    public void testJsonMessageFilterWhenJsonPathValueIsANumber() throws Exception {
+
+        final JsonMessageFilterProcessorContext finalMessageProcessorContext =
+                processJsonMessageFilterChain(jsonMessage,
+                        "domainFilter", "$.event.commonEventHeader.sequence", "0",
+                        "eventNameFilter", "$.event.commonEventHeader.eventName", "Mfvs_eNodeB_RANKPI");
+
+        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, true, true, 2);
+    }
+
+    @Test
+    public void testJsonMessageFilterWhenOneFilterDoesNotMatch() throws Exception {
+
+        final JsonMessageFilterProcessorContext finalMessageProcessorContext =
+                processJsonMessageFilterChain(jsonMessage,
+                        "domainFilter", "$.event.commonEventHeader.domain", "xxxxxxxxxxx",
+                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");
+
+        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, false, false, 1);
+    }
+
+    @Test
+    public void testJsonMessageFilterWhenJsonPathDoesNotExist() throws Exception {
+
+        final JsonMessageFilterProcessorContext finalMessageProcessorContext =
+                processJsonMessageFilterChain(jsonMessage,
+                        "domainFilter", "$.event.commonEventHeader.xxxxxxx", "measurementsForVfScaling",
+                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");
+
+        assertJsonMessageAssertions(jsonMessage, finalMessageProcessorContext, false, false, 1);
+    }
+
+    @Test
+    public void testJsonMessageFilterWhenIncomingMessageIsBlank() throws Exception {
+
+        final JsonMessageFilterProcessorContext finalMessageProcessorContext =
+                processJsonMessageFilterChain("",
+                        "domainFilter", "$.event.commonEventHeader.domain", "measurementsForVfScaling",
+                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");
+
+        assertJsonMessageAssertions("", finalMessageProcessorContext, false, null, 1);
+
+    }
+
+    @Test
+    public void testJsonMessageFilterWhenIncomingMessageIsNotValidJson() throws Exception {
+
+        final JsonMessageFilterProcessorContext finalMessageProcessorContext =
+                processJsonMessageFilterChain("invalidJson",
+                        "domainFilter", "$.event.commonEventHeader.domain", "measurementsForVfScaling",
+                        "functionalRoleFilter", "$.event.commonEventHeader.eventName", "vFirewall");
+
+        assertJsonMessageAssertions("invalidJson", finalMessageProcessorContext, false, null, 1);
+
+    }
+
+
+    private static void assertJsonMessageAssertions(
+            final String jsonMessage, final JsonMessageFilterProcessorContext finalMessageProcessorContext,
+            final Boolean canProcessingContinueFlag, final Boolean matchedFlag,
+            final int messageProcessorCount) throws Exception {
+
+        assertJson(jsonMessage, finalMessageProcessorContext.getMessage());
+        Assert.assertEquals(canProcessingContinueFlag, finalMessageProcessorContext.canProcessingContinue());
+        assertEquals(matchedFlag, finalMessageProcessorContext.getMatched());
+        Assert.assertEquals(finalMessageProcessorContext.getMessageProcessors().size(), messageProcessorCount);
+
+    }
+
+
+    private static JsonMessageFilterProcessorContext processJsonMessageFilterChain(
+            final String jsonMessage,
+            final String firstFilterName, final String firstFilterPath, final String firstFilterValue,
+            final String secondFilterName, final String secondFilterPath, final String secondFilterValue) {
+
+        // create processors
+        final GenericJsonMessageFilter firstFilter = new GenericJsonMessageFilter(firstFilterName, firstFilterPath,
+                firstFilterValue);
+        final GenericJsonMessageFilter secondFilter = new GenericJsonMessageFilter(secondFilterName,
+                secondFilterPath, secondFilterValue);
+
+        // create initial processor context containing the json message that need to be processed
+        final JsonMessageFilterProcessorContext initialProcessorContext =
+                new JsonMessageFilterProcessorContext(jsonMessage);
+
+        // create a generic message chain processor and feed it list of processors and initialProcessor context
+        final GenericMessageChainProcessor<JsonMessageFilterProcessorContext> messageChainProcessor =
+                new GenericMessageChainProcessor<>(ImmutableList.of(firstFilter, secondFilter),
+                        initialProcessorContext);
+
+        // process the generic message chain
+        return messageChainProcessor.processChain();
+    }
+}
@@ -1,68 +1,68 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class AbstractMessageProcessorTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testPreProcessorWhenProcessingContextFlagIsTrue() throws Exception {\r
-        TestMessageProcessor1 messageProcessor1 = new TestMessageProcessor1();\r
-        final TestProcessorContext processorContext =\r
-                new TestProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);\r
-        final TestProcessorContext testProcessorContext = messageProcessor1.preProcessor(processorContext);\r
-        assertThat("Processing flag must be true",\r
-                testProcessorContext.canProcessingContinue(), is(true));\r
-    }\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void testPreProcessorWhenProcessingContextFlagIsFalse() throws Exception {\r
-        TestMessageProcessor1 messageProcessor1 = new TestMessageProcessor1();\r
-        final TestProcessorContext testProcessorContext =\r
-                new TestProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, false);\r
-        messageProcessor1.preProcessor(testProcessorContext);\r
-    }\r
-\r
-    @Test\r
-    public void testPostProcessorWhenProcessingStateIsNotFinishedSuccessfully() throws Exception {\r
-        TestMessageProcessor1 messageProcessor1 = new TestMessageProcessor1();\r
-        final ProcessingState processingState = messageProcessor1.getProcessingState();\r
-        assertTrue("Processing state is not processing finished successfully",\r
-                processingState != ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY);\r
-        final TestProcessorContext processorContext =\r
-                new TestProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);\r
-        final TestProcessorContext testProcessorContext = messageProcessor1.postProcessor(processorContext);\r
-        assertThat("Processing flag must be false",\r
-                testProcessorContext.canProcessingContinue(), is(false));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class AbstractMessageProcessorTest extends BaseAnalyticsCommonUnitTest {
+
+
+    @Test
+    public void testPreProcessorWhenProcessingContextFlagIsTrue() throws Exception {
+        TestMessageProcessor1 messageProcessor1 = new TestMessageProcessor1();
+        final TestProcessorContext processorContext =
+                new TestProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);
+        final TestProcessorContext testProcessorContext = messageProcessor1.preProcessor(processorContext);
+        assertThat("Processing flag must be true",
+                testProcessorContext.canProcessingContinue(), is(true));
+    }
+
+    @Test(expected = MessageProcessingException.class)
+    public void testPreProcessorWhenProcessingContextFlagIsFalse() throws Exception {
+        TestMessageProcessor1 messageProcessor1 = new TestMessageProcessor1();
+        final TestProcessorContext testProcessorContext =
+                new TestProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, false);
+        messageProcessor1.preProcessor(testProcessorContext);
+    }
+
+    @Test
+    public void testPostProcessorWhenProcessingStateIsNotFinishedSuccessfully() throws Exception {
+        TestMessageProcessor1 messageProcessor1 = new TestMessageProcessor1();
+        final ProcessingState processingState = messageProcessor1.getProcessingState();
+        assertTrue("Processing state is not processing finished successfully",
+                processingState != ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY);
+        final TestProcessorContext processorContext =
+                new TestProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);
+        final TestProcessorContext testProcessorContext = messageProcessor1.postProcessor(processorContext);
+        assertThat("Processing flag must be false",
+                testProcessorContext.canProcessingContinue(), is(false));
+    }
+
+}
@@ -1,79 +1,79 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class AbstractProcessorContextTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-    class TestAbstractMessageProcessorContext extends AbstractProcessorContext {\r
-\r
-        public TestAbstractMessageProcessorContext(String message, boolean canProcessingContinue) {\r
-            super(message, canProcessingContinue);\r
-        }\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testGetMessage() throws Exception {\r
-        TestAbstractMessageProcessorContext testProcessorContext =\r
-                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);\r
-        final String message = testProcessorContext.getMessage();\r
-        assertThat("Message Processor message must match", message, is(TEST_MESSAGE_PROCESSOR_MESSAGE));\r
-    }\r
-\r
-    @Test\r
-    public void testCanProcessingContinue() throws Exception {\r
-        TestAbstractMessageProcessorContext testProcessorContext =\r
-                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);\r
-        final boolean canProcessingContinue = testProcessorContext.canProcessingContinue();\r
-        assertThat("Message Can Processing flag must be true", canProcessingContinue, is(true));\r
-    }\r
-\r
-    @Test\r
-    public void testSetProcessingContinueFlag() throws Exception {\r
-        TestAbstractMessageProcessorContext testProcessorContext =\r
-                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);\r
-        testProcessorContext.setProcessingContinueFlag(false);\r
-        assertThat("Message Can processing flag must be false",\r
-                testProcessorContext.canProcessingContinue(), is(false));\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testGetMessageProcessors() throws Exception {\r
-        TestAbstractMessageProcessorContext testProcessorContext =\r
-                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);\r
-        final List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors =\r
-                testProcessorContext.getMessageProcessors();\r
-        assertThat("Message processor processing message must match", messageProcessors.size(), is(0));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class AbstractProcessorContextTest extends BaseAnalyticsCommonUnitTest {
+
+    class TestAbstractMessageProcessorContext extends AbstractProcessorContext {
+
+        public TestAbstractMessageProcessorContext(String message, boolean canProcessingContinue) {
+            super(message, canProcessingContinue);
+        }
+    }
+
+
+    @Test
+    public void testGetMessage() throws Exception {
+        TestAbstractMessageProcessorContext testProcessorContext =
+                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);
+        final String message = testProcessorContext.getMessage();
+        assertThat("Message Processor message must match", message, is(TEST_MESSAGE_PROCESSOR_MESSAGE));
+    }
+
+    @Test
+    public void testCanProcessingContinue() throws Exception {
+        TestAbstractMessageProcessorContext testProcessorContext =
+                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);
+        final boolean canProcessingContinue = testProcessorContext.canProcessingContinue();
+        assertThat("Message Can Processing flag must be true", canProcessingContinue, is(true));
+    }
+
+    @Test
+    public void testSetProcessingContinueFlag() throws Exception {
+        TestAbstractMessageProcessorContext testProcessorContext =
+                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);
+        testProcessorContext.setProcessingContinueFlag(false);
+        assertThat("Message Can processing flag must be false",
+                testProcessorContext.canProcessingContinue(), is(false));
+
+    }
+
+    @Test
+    public void testGetMessageProcessors() throws Exception {
+        TestAbstractMessageProcessorContext testProcessorContext =
+                new TestAbstractMessageProcessorContext(TEST_MESSAGE_PROCESSOR_MESSAGE, true);
+        final List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors =
+                testProcessorContext.getMessageProcessors();
+        assertThat("Message processor processing message must match", messageProcessors.size(), is(0));
+    }
+
+}
@@ -1,96 +1,96 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import com.google.common.collect.ImmutableList;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNull;\r
-import static org.junit.Assert.assertThat;\r
-\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public class GenericMessageChainProcessorTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testProcessChainWhenProcessChainHasNoEarlyTermination() throws Exception {\r
-\r
-        final TestMessageProcessor1 testMessageProcessor1 = getTestMessageProcessor1();\r
-        final TestMessageProcessor2 testMessageProcessor2 = getTestMessageProcessor2();\r
-        final ImmutableList<? extends MessageProcessor<TestProcessorContext>> testMessageChain =\r
-                ImmutableList.of(testMessageProcessor1, testMessageProcessor2);\r
-\r
-        final TestProcessorContext testProcessorContext = new TestProcessorContext("Hello", true);\r
-\r
-        final GenericMessageChainProcessor<TestProcessorContext> genericMessageChainProcessor =\r
-                new GenericMessageChainProcessor<>(testMessageChain, testProcessorContext);\r
-\r
-        final TestProcessorContext finalProcessorContext = genericMessageChainProcessor.processChain();\r
-\r
-        final String result = finalProcessorContext.getResult();\r
-        assertThat("Final Result must be Hello World! Again", result, is("Hello World! Again"));\r
-        assertThat("TestProcessor1 state is correct", testMessageProcessor1.getProcessingState(),\r
-                is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));\r
-        assertThat("TestProcessor2 state is correct", testMessageProcessor2.getProcessingState(),\r
-                is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testProcessChainWhenProcessChainEarlyTermination() throws Exception {\r
-\r
-        final TestEarlyTerminatingProcessor testEarlyTerminatingProcessor = getTestEarlyTerminationProcessor();\r
-        final ImmutableList<? extends MessageProcessor<TestProcessorContext>> testMessageChain =\r
-                ImmutableList.of(testEarlyTerminatingProcessor, getTestMessageProcessor2());\r
-        final TestProcessorContext testProcessorContext = new TestProcessorContext("Hello", true);\r
-\r
-        final GenericMessageChainProcessor<TestProcessorContext> genericMessageChainProcessor =\r
-                new GenericMessageChainProcessor<>(testMessageChain, testProcessorContext);\r
-\r
-        final TestProcessorContext finalProcessorContext = genericMessageChainProcessor.processChain();\r
-        final String result = finalProcessorContext.getResult();\r
-        assertNull("Final Result must be null", result);\r
-        assertThat("TestEarlyTerminatingProcessor state is correct",\r
-                testEarlyTerminatingProcessor.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));\r
-    }\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void testProcessChainWhenIncomingMessageContextIsNull() throws Exception {\r
-\r
-        final TestEarlyTerminatingProcessor testEarlyTerminatingProcessor = getTestEarlyTerminationProcessor();\r
-        final ImmutableList<? extends MessageProcessor<TestProcessorContext>> testMessageChain =\r
-                ImmutableList.of(testEarlyTerminatingProcessor, getTestMessageProcessor2());\r
-        final TestProcessorContext testProcessorContext = null;\r
-\r
-        final GenericMessageChainProcessor<TestProcessorContext> genericMessageChainProcessor =\r
-                new GenericMessageChainProcessor<>(testMessageChain, testProcessorContext);\r
-\r
-       genericMessageChainProcessor.processChain();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import com.google.common.collect.ImmutableList;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public class GenericMessageChainProcessorTest extends BaseAnalyticsCommonUnitTest {
+
+
+    @Test
+    public void testProcessChainWhenProcessChainHasNoEarlyTermination() throws Exception {
+
+        final TestMessageProcessor1 testMessageProcessor1 = getTestMessageProcessor1();
+        final TestMessageProcessor2 testMessageProcessor2 = getTestMessageProcessor2();
+        final ImmutableList<? extends MessageProcessor<TestProcessorContext>> testMessageChain =
+                ImmutableList.of(testMessageProcessor1, testMessageProcessor2);
+
+        final TestProcessorContext testProcessorContext = new TestProcessorContext("Hello", true);
+
+        final GenericMessageChainProcessor<TestProcessorContext> genericMessageChainProcessor =
+                new GenericMessageChainProcessor<>(testMessageChain, testProcessorContext);
+
+        final TestProcessorContext finalProcessorContext = genericMessageChainProcessor.processChain();
+
+        final String result = finalProcessorContext.getResult();
+        assertThat("Final Result must be Hello World! Again", result, is("Hello World! Again"));
+        assertThat("TestProcessor1 state is correct", testMessageProcessor1.getProcessingState(),
+                is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));
+        assertThat("TestProcessor2 state is correct", testMessageProcessor2.getProcessingState(),
+                is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));
+    }
+
+
+    @Test
+    public void testProcessChainWhenProcessChainEarlyTermination() throws Exception {
+
+        final TestEarlyTerminatingProcessor testEarlyTerminatingProcessor = getTestEarlyTerminationProcessor();
+        final ImmutableList<? extends MessageProcessor<TestProcessorContext>> testMessageChain =
+                ImmutableList.of(testEarlyTerminatingProcessor, getTestMessageProcessor2());
+        final TestProcessorContext testProcessorContext = new TestProcessorContext("Hello", true);
+
+        final GenericMessageChainProcessor<TestProcessorContext> genericMessageChainProcessor =
+                new GenericMessageChainProcessor<>(testMessageChain, testProcessorContext);
+
+        final TestProcessorContext finalProcessorContext = genericMessageChainProcessor.processChain();
+        final String result = finalProcessorContext.getResult();
+        assertNull("Final Result must be null", result);
+        assertThat("TestEarlyTerminatingProcessor state is correct",
+                testEarlyTerminatingProcessor.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));
+    }
+
+    @Test(expected = MessageProcessingException.class)
+    public void testProcessChainWhenIncomingMessageContextIsNull() throws Exception {
+
+        final TestEarlyTerminatingProcessor testEarlyTerminatingProcessor = getTestEarlyTerminationProcessor();
+        final ImmutableList<? extends MessageProcessor<TestProcessorContext>> testMessageChain =
+                ImmutableList.of(testEarlyTerminatingProcessor, getTestMessageProcessor2());
+        final TestProcessorContext testProcessorContext = null;
+
+        final GenericMessageChainProcessor<TestProcessorContext> genericMessageChainProcessor =
+                new GenericMessageChainProcessor<>(testMessageChain, testProcessorContext);
+
+       genericMessageChainProcessor.processChain();
+    }
+
+}
@@ -1,53 +1,53 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class GenericProcessorInfoTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-\r
-    @Test\r
-    public void getProcessorName() throws Exception {\r
-        final String processorName = "testProcessorName";\r
-        final String processorDescription = "testProcessorDescription";\r
-        GenericProcessorInfo genericProcessorInfo = new GenericProcessorInfo(processorName, processorDescription);\r
-        assertThat("Processor Name must match", genericProcessorInfo.getProcessorName(), is(processorName));\r
-\r
-    }\r
-\r
-    @Test\r
-    public void getProcessorDescription() throws Exception {\r
-        final String processorName = "testProcessorName";\r
-        final String processorDescription = "testProcessorDescription";\r
-        GenericProcessorInfo genericProcessorInfo = new GenericProcessorInfo(processorName, processorDescription);\r
-        assertThat("Processor Description must match", genericProcessorInfo.getProcessorDescription(),\r
-                is(processorDescription));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class GenericProcessorInfoTest extends BaseAnalyticsCommonUnitTest {
+
+
+    @Test
+    public void getProcessorName() throws Exception {
+        final String processorName = "testProcessorName";
+        final String processorDescription = "testProcessorDescription";
+        GenericProcessorInfo genericProcessorInfo = new GenericProcessorInfo(processorName, processorDescription);
+        assertThat("Processor Name must match", genericProcessorInfo.getProcessorName(), is(processorName));
+
+    }
+
+    @Test
+    public void getProcessorDescription() throws Exception {
+        final String processorName = "testProcessorName";
+        final String processorDescription = "testProcessorDescription";
+        GenericProcessorInfo genericProcessorInfo = new GenericProcessorInfo(processorName, processorDescription);
+        assertThat("Processor Description must match", genericProcessorInfo.getProcessorDescription(),
+                is(processorDescription));
+    }
+
+}
@@ -1,39 +1,39 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public class TestEarlyTerminatingProcessor extends  AbstractMessageProcessor<TestProcessorContext> {\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Terminates the chain early";\r
-    }\r
-\r
-    @Override\r
-    public TestProcessorContext processMessage(TestProcessorContext processorContext) {\r
-        setTerminatingProcessingMessage("Terminating early", processorContext);\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public class TestEarlyTerminatingProcessor extends  AbstractMessageProcessor<TestProcessorContext> {
+
+    @Override
+    public String getProcessorDescription() {
+        return "Terminates the chain early";
+    }
+
+    @Override
+    public TestProcessorContext processMessage(TestProcessorContext processorContext) {
+        setTerminatingProcessingMessage("Terminating early", processorContext);
+        return processorContext;
+    }
+}
@@ -1,41 +1,41 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public class TestMessageProcessor1 extends  AbstractMessageProcessor<TestProcessorContext> {\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Appends \" World!\" to the message string and set it to result string";\r
-    }\r
-\r
-    @Override\r
-    public TestProcessorContext processMessage(TestProcessorContext processorContext) {\r
-        final String message = processorContext.getMessage();\r
-        processorContext.setResult(message + " World!");\r
-        setFinishedProcessingMessage("Finished Appending world", processorContext);\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public class TestMessageProcessor1 extends  AbstractMessageProcessor<TestProcessorContext> {
+
+    @Override
+    public String getProcessorDescription() {
+        return "Appends \" World!\" to the message string and set it to result string";
+    }
+
+    @Override
+    public TestProcessorContext processMessage(TestProcessorContext processorContext) {
+        final String message = processorContext.getMessage();
+        processorContext.setResult(message + " World!");
+        setFinishedProcessingMessage("Finished Appending world", processorContext);
+        return processorContext;
+    }
+}
@@ -1,41 +1,41 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public class TestMessageProcessor2 extends AbstractMessageProcessor<TestProcessorContext> {\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Appends \" Again\" to the result string";\r
-    }\r
-\r
-    @Override\r
-    public TestProcessorContext processMessage(TestProcessorContext processorContext) {\r
-        final String result = processorContext.getResult();\r
-        processorContext.setResult(result + " Again");\r
-        setFinishedProcessingMessage("Finished Appending again to result", processorContext);\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public class TestMessageProcessor2 extends AbstractMessageProcessor<TestProcessorContext> {
+
+    @Override
+    public String getProcessorDescription() {
+        return "Appends \" Again\" to the result string";
+    }
+
+    @Override
+    public TestProcessorContext processMessage(TestProcessorContext processorContext) {
+        final String result = processorContext.getResult();
+        processorContext.setResult(result + " Again");
+        setFinishedProcessingMessage("Finished Appending again to result", processorContext);
+        return processorContext;
+    }
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.service.processor;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/8/2016.\r
- */\r
-public class TestProcessorContext implements ProcessorContext {\r
-\r
-    private String message;\r
-    private boolean continueProcessingFlag;\r
-    private String result;\r
-    private List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors;\r
-\r
-    public TestProcessorContext(String message, boolean continueProcessingFlag) {\r
-        this.message = message;\r
-        this.continueProcessingFlag = continueProcessingFlag;\r
-        this.messageProcessors = new LinkedList<>();\r
-    }\r
-\r
-    @Override\r
-    public String getMessage() {\r
-        return message;\r
-    }\r
-\r
-    @Override\r
-    public boolean canProcessingContinue() {\r
-        return continueProcessingFlag;\r
-    }\r
-\r
-    @Override\r
-    public void setProcessingContinueFlag(boolean canProcessingContinue) {\r
-        this.continueProcessingFlag = canProcessingContinue;\r
-    }\r
-\r
-    @Override\r
-    public List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors() {\r
-        return messageProcessors;\r
-    }\r
-\r
-\r
-    public void setMessage(String message) {\r
-        this.message = message;\r
-    }\r
-\r
-    public boolean isContinueProcessingFlag() {\r
-        return continueProcessingFlag;\r
-    }\r
-\r
-    public void setContinueProcessingFlag(boolean continueProcessingFlag) {\r
-        this.continueProcessingFlag = continueProcessingFlag;\r
-    }\r
-\r
-    public String getResult() {\r
-        return result;\r
-    }\r
-\r
-    public void setResult(String result) {\r
-        this.result = result;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.service.processor;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/8/2016.
+ */
+public class TestProcessorContext implements ProcessorContext {
+
+    private String message;
+    private boolean continueProcessingFlag;
+    private String result;
+    private List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors;
+
+    public TestProcessorContext(String message, boolean continueProcessingFlag) {
+        this.message = message;
+        this.continueProcessingFlag = continueProcessingFlag;
+        this.messageProcessors = new LinkedList<>();
+    }
+
+    @Override
+    public String getMessage() {
+        return message;
+    }
+
+    @Override
+    public boolean canProcessingContinue() {
+        return continueProcessingFlag;
+    }
+
+    @Override
+    public void setProcessingContinueFlag(boolean canProcessingContinue) {
+        this.continueProcessingFlag = canProcessingContinue;
+    }
+
+    @Override
+    public List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors() {
+        return messageProcessors;
+    }
+
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public boolean isContinueProcessingFlag() {
+        return continueProcessingFlag;
+    }
+
+    public void setContinueProcessingFlag(boolean continueProcessingFlag) {
+        this.continueProcessingFlag = continueProcessingFlag;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+}
@@ -1,48 +1,48 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.utils;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class HTTPUtilsTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testIsSuccessfulResponseCodeWhenResponseCodeIsSuccessful() throws Exception {\r
-        final boolean successfulResponseCode = HTTPUtils.isSuccessfulResponseCode(200);\r
-        Assert.assertThat("200 Response code must return true", successfulResponseCode, is(true));\r
-    }\r
-\r
-    @Test\r
-    public void testIsSuccessfulResponseCodeWhenResponseCodeIsNotSuccessful() throws Exception {\r
-        final boolean successfulResponseCode = HTTPUtils.isSuccessfulResponseCode(301);\r
-        Assert.assertThat("301 Response code must return false", successfulResponseCode, is(false));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.utils;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class HTTPUtilsTest extends BaseAnalyticsCommonUnitTest {
+
+
+    @Test
+    public void testIsSuccessfulResponseCodeWhenResponseCodeIsSuccessful() throws Exception {
+        final boolean successfulResponseCode = HTTPUtils.isSuccessfulResponseCode(200);
+        Assert.assertThat("200 Response code must return true", successfulResponseCode, is(true));
+    }
+
+    @Test
+    public void testIsSuccessfulResponseCodeWhenResponseCodeIsNotSuccessful() throws Exception {
+        final boolean successfulResponseCode = HTTPUtils.isSuccessfulResponseCode(301);
+        Assert.assertThat("301 Response code must return false", successfulResponseCode, is(false));
+    }
+
+
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.utils;\r
-\r
-import com.google.common.collect.ImmutableSet;\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-import org.openecomp.dcae.apod.analytics.common.service.filter.JsonMessageFilterProcessorContext;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 3/3/2017.\r
- */\r
-public class MessageProcessorUtilsTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testProcessJsonFilterMappings() throws Exception {\r
-        final String jsonMessage = fromStream(CEF_MESSAGE_FILE_PATH);\r
-\r
-        final Map<String, Set<String>> jsonFilterMappings = new HashMap<>();\r
-        jsonFilterMappings.put("$.event.commonEventHeader.domain", ImmutableSet.of("measurementsForVfScaling"));\r
-        jsonFilterMappings.put("$.event.commonEventHeader.eventName",\r
-                ImmutableSet.of("vFirewall", "vLoadBalancer", "Mfvs_eNodeB_RANKPI"));\r
-\r
-        final JsonMessageFilterProcessorContext jsonMessageFilterProcessorContext =\r
-                MessageProcessorUtils.processJsonFilterMappings(jsonMessage, jsonFilterMappings);\r
-        final Boolean matched = jsonMessageFilterProcessorContext.getMatched();\r
-        Assert.assertNotNull(matched);\r
-        Assert.assertTrue(matched);\r
-    }\r
-\r
-    @Test(expected = IllegalStateException.class)\r
-    public void testProcessJsonFilterMappingsWhenMappingsAreEmpty() throws Exception {\r
-        final String jsonMessage = fromStream(CEF_MESSAGE_FILE_PATH);\r
-        final Map<String, Set<String>> jsonFilterMappings = new HashMap<>();\r
-        MessageProcessorUtils.processJsonFilterMappings(jsonMessage, jsonFilterMappings);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.utils;
+
+import com.google.common.collect.ImmutableSet;
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+import org.onap.dcae.apod.analytics.common.service.filter.JsonMessageFilterProcessorContext;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Rajiv Singla . Creation Date: 3/3/2017.
+ */
+public class MessageProcessorUtilsTest extends BaseAnalyticsCommonUnitTest {
+
+
+    @Test
+    public void testProcessJsonFilterMappings() throws Exception {
+        final String jsonMessage = fromStream(CEF_MESSAGE_FILE_PATH);
+
+        final Map<String, Set<String>> jsonFilterMappings = new HashMap<>();
+        jsonFilterMappings.put("$.event.commonEventHeader.domain", ImmutableSet.of("measurementsForVfScaling"));
+        jsonFilterMappings.put("$.event.commonEventHeader.eventName",
+                ImmutableSet.of("vFirewall", "vLoadBalancer", "Mfvs_eNodeB_RANKPI"));
+
+        final JsonMessageFilterProcessorContext jsonMessageFilterProcessorContext =
+                MessageProcessorUtils.processJsonFilterMappings(jsonMessage, jsonFilterMappings);
+        final Boolean matched = jsonMessageFilterProcessorContext.getMatched();
+        Assert.assertNotNull(matched);
+        Assert.assertTrue(matched);
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testProcessJsonFilterMappingsWhenMappingsAreEmpty() throws Exception {
+        final String jsonMessage = fromStream(CEF_MESSAGE_FILE_PATH);
+        final Map<String, Set<String>> jsonFilterMappings = new HashMap<>();
+        MessageProcessorUtils.processJsonFilterMappings(jsonMessage, jsonFilterMappings);
+    }
+
+}
@@ -1,40 +1,40 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.utils;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class PersistenceUtilsTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-    @Test\r
-    public void testGetCurrentTimeReverseSubKey() throws Exception {\r
-\r
-        final String currentTimeReverseSubKey = PersistenceUtils.getCurrentTimeReverseSubKey();\r
-        Assert.assertNotNull("Sub Key must not be null", currentTimeReverseSubKey);\r
-        Assert.assertTrue("Sub Key Length must be 25", currentTimeReverseSubKey.length() == 25);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.utils;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class PersistenceUtilsTest extends BaseAnalyticsCommonUnitTest {
+
+    @Test
+    public void testGetCurrentTimeReverseSubKey() throws Exception {
+
+        final String currentTimeReverseSubKey = PersistenceUtils.getCurrentTimeReverseSubKey();
+        Assert.assertNotNull("Sub Key must not be null", currentTimeReverseSubKey);
+        Assert.assertTrue("Sub Key Length must be 25", currentTimeReverseSubKey.length() == 25);
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.common.validation;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/12/2016.\r
- */\r
-public class GenericValidationResponseTest extends BaseAnalyticsCommonUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testHasErrorsWhenResponseHasErrors() throws Exception {\r
-\r
-        final String fieldName = "testField";\r
-        final String errorMessage = "Some error message";\r
-        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =\r
-                createTestValidationResponse(fieldName, errorMessage);\r
-\r
-        validationResponse.addErrorMessage("testField", "Some error message");\r
-        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));\r
-    }\r
-\r
-    @Test\r
-    public void testHasErrorsWhenResponseDoesNotHaveErrors() throws Exception {\r
-        GenericValidationResponse<CDAPTestAppSettings> validationResponse = new\r
-                GenericValidationResponse<>();\r
-        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(false));\r
-    }\r
-\r
-    @Test\r
-    public void testGetFieldNamesWithError() throws Exception {\r
-\r
-        final String fieldName = "testField";\r
-        final String errorMessage = "Some error message";\r
-        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =\r
-                createTestValidationResponse(fieldName, errorMessage);\r
-\r
-        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));\r
-        assertThat("Validation Field Name must match",\r
-                validationResponse.getFieldNamesWithError().iterator().next(), is(fieldName));\r
-    }\r
-\r
-    @Test\r
-    public void testGetErrorMessages() throws Exception {\r
-\r
-        final String fieldName = "testField";\r
-        final String errorMessage = "Some error message";\r
-        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =\r
-                createTestValidationResponse(fieldName, errorMessage);\r
-\r
-        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));\r
-        assertThat("Validation Error Message must match",\r
-                validationResponse.getErrorMessages().iterator().next(), is(errorMessage));\r
-    }\r
-\r
-    @Test\r
-    public void getValidationResultsAsMap() throws Exception {\r
-        final String fieldName = "testField";\r
-        final String errorMessage = "Some error message";\r
-        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =\r
-                createTestValidationResponse(fieldName, errorMessage);\r
-        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));\r
-        assertThat("Validation Field Name must match",\r
-                validationResponse.getValidationResultsAsMap().keySet().iterator().next(), is(fieldName));\r
-        assertThat("Validation Error Message must match",\r
-                validationResponse.getValidationResultsAsMap().values().iterator().next(), is(errorMessage));\r
-    }\r
-\r
-    @Test\r
-    public void getAllErrorMessage() throws Exception {\r
-        final String fieldName = "testField";\r
-        final String errorMessage = "Some error message";\r
-        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =\r
-                createTestValidationResponse(fieldName, errorMessage);\r
-        final String allErrorMessage = validationResponse.getAllErrorMessage();\r
-        assertThat("All Error messages should match", allErrorMessage, is(errorMessage));\r
-    }\r
-\r
-    @Test\r
-    public void addErrorMessage() throws Exception {\r
-        final String fieldName = "testField";\r
-        final String errorMessage = "Some error message";\r
-        GenericValidationResponse<CDAPTestAppSettings> validationResponse = new\r
-                GenericValidationResponse<>();\r
-        validationResponse.addErrorMessage(fieldName, errorMessage);\r
-\r
-        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));\r
-        assertThat("Validation Field Name must match",\r
-                validationResponse.getValidationResultsAsMap().keySet().iterator().next(), is(fieldName));\r
-        assertThat("Validation Error Message must match",\r
-                validationResponse.getValidationResultsAsMap().values().iterator().next(), is(errorMessage));\r
-    }\r
-\r
-    private static GenericValidationResponse<CDAPTestAppSettings> createTestValidationResponse(\r
-            final String fieldName, final String errorMessage) {\r
-        GenericValidationResponse<CDAPTestAppSettings> validationResponse = new\r
-                GenericValidationResponse<>();\r
-        if (fieldName != null || errorMessage != null) {\r
-            validationResponse.addErrorMessage(fieldName, errorMessage);\r
-        }\r
-\r
-        return validationResponse;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.common.validation;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.BaseAnalyticsCommonUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/12/2016.
+ */
+public class GenericValidationResponseTest extends BaseAnalyticsCommonUnitTest {
+
+
+    @Test
+    public void testHasErrorsWhenResponseHasErrors() throws Exception {
+
+        final String fieldName = "testField";
+        final String errorMessage = "Some error message";
+        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =
+                createTestValidationResponse(fieldName, errorMessage);
+
+        validationResponse.addErrorMessage("testField", "Some error message");
+        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));
+    }
+
+    @Test
+    public void testHasErrorsWhenResponseDoesNotHaveErrors() throws Exception {
+        GenericValidationResponse<CDAPTestAppSettings> validationResponse = new
+                GenericValidationResponse<>();
+        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(false));
+    }
+
+    @Test
+    public void testGetFieldNamesWithError() throws Exception {
+
+        final String fieldName = "testField";
+        final String errorMessage = "Some error message";
+        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =
+                createTestValidationResponse(fieldName, errorMessage);
+
+        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));
+        assertThat("Validation Field Name must match",
+                validationResponse.getFieldNamesWithError().iterator().next(), is(fieldName));
+    }
+
+    @Test
+    public void testGetErrorMessages() throws Exception {
+
+        final String fieldName = "testField";
+        final String errorMessage = "Some error message";
+        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =
+                createTestValidationResponse(fieldName, errorMessage);
+
+        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));
+        assertThat("Validation Error Message must match",
+                validationResponse.getErrorMessages().iterator().next(), is(errorMessage));
+    }
+
+    @Test
+    public void getValidationResultsAsMap() throws Exception {
+        final String fieldName = "testField";
+        final String errorMessage = "Some error message";
+        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =
+                createTestValidationResponse(fieldName, errorMessage);
+        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));
+        assertThat("Validation Field Name must match",
+                validationResponse.getValidationResultsAsMap().keySet().iterator().next(), is(fieldName));
+        assertThat("Validation Error Message must match",
+                validationResponse.getValidationResultsAsMap().values().iterator().next(), is(errorMessage));
+    }
+
+    @Test
+    public void getAllErrorMessage() throws Exception {
+        final String fieldName = "testField";
+        final String errorMessage = "Some error message";
+        final GenericValidationResponse<CDAPTestAppSettings> validationResponse =
+                createTestValidationResponse(fieldName, errorMessage);
+        final String allErrorMessage = validationResponse.getAllErrorMessage();
+        assertThat("All Error messages should match", allErrorMessage, is(errorMessage));
+    }
+
+    @Test
+    public void addErrorMessage() throws Exception {
+        final String fieldName = "testField";
+        final String errorMessage = "Some error message";
+        GenericValidationResponse<CDAPTestAppSettings> validationResponse = new
+                GenericValidationResponse<>();
+        validationResponse.addErrorMessage(fieldName, errorMessage);
+
+        assertThat("Validation Response must has errors", validationResponse.hasErrors(), is(true));
+        assertThat("Validation Field Name must match",
+                validationResponse.getValidationResultsAsMap().keySet().iterator().next(), is(fieldName));
+        assertThat("Validation Error Message must match",
+                validationResponse.getValidationResultsAsMap().values().iterator().next(), is(errorMessage));
+    }
+
+    private static GenericValidationResponse<CDAPTestAppSettings> createTestValidationResponse(
+            final String fieldName, final String errorMessage) {
+        GenericValidationResponse<CDAPTestAppSettings> validationResponse = new
+                GenericValidationResponse<>();
+        if (fieldName != null || errorMessage != null) {
+            validationResponse.addErrorMessage(fieldName, errorMessage);
+        }
+
+        return validationResponse;
+    }
+
+}
index 9e40f24..fb02c74 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration>\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration>
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index 8ec4856..a8942e9 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-dmaap</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS CODE FOR DMaaP API -->\r
-    <name>DCAE Analytics DMaaP</name>\r
-    <description>\r
-        DMaaP(Data Movement as a Platform) MR API using AAF(Authentication and Authorization Framework)\r
-    </description>\r
-\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- DCAE COMMON DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-common</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <!-- APACHE CLIENT -->\r
-        <dependency>\r
-            <groupId>org.apache.httpcomponents</groupId>\r
-            <artifactId>httpclient</artifactId>\r
-        </dependency>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-        </dependency>\r
-\r
-\r
-        <!-- JACKSON JSON -->\r
-        <dependency>\r
-            <groupId>com.fasterxml.jackson.core</groupId>\r
-            <artifactId>jackson-core</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.fasterxml.jackson.core</groupId>\r
-            <artifactId>jackson-databind</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.fasterxml.jackson.core</groupId>\r
-            <artifactId>jackson-annotations</artifactId>\r
-        </dependency>\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>dcae-analytics</artifactId>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-dmaap</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS CODE FOR DMaaP API -->
+    <name>DCAE Analytics DMaaP</name>
+    <description>
+        DMaaP(Data Movement as a Platform) MR API using AAF(Authentication and Authorization Framework)
+    </description>
+
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+    </properties>
+
+    <dependencies>
+
+        <!-- DCAE COMMON DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-common</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- APACHE CLIENT -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+        </dependency>
+
+
+        <!-- JACKSON JSON -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+
+</project>
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap;\r
-\r
-import com.google.inject.AbstractModule;\r
-import com.google.inject.Guice;\r
-import com.google.inject.Injector;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.module.AnalyticsDMaaPModule;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberFactory;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * Creates pre injected implementations for {@link DMaaPMRPublisher} and {@link DMaaPMRSubscriber}\r
- * <p>\r
- *     Usage:\r
- *     <p>Create an instance of DMaaP MR Factory</p>\r
- *     <pre>\r
- *        DMaaPFactory dmaapFactory = DMaaPFactory.initalize()\r
- *     </pre>\r
- *     <p>Create a new DMaaP MR Publisher</p>\r
- *     <pre>\r
- *         DMaaPMRPublisher publisher = dmaapFactory.createPublisher(publisherConfig)\r
- *     </pre>\r
- *     <p>Create new DMaaP MR Subscriber</p>\r
- *     <pre>\r
- *         DMaaPMRSubscriber subscriber = dmaapFactory.createSubscriber(subscriberConfig)\r
- *     </pre>\r
- * <p>\r
- * <strong>All Clients must use this Factory to initalize DMaaP Message Router Publishers and Subscribers</strong>\r
- * </p>\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-public class DMaaPMRFactory {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRFactory.class);\r
-\r
-    private final Injector injector;\r
-\r
-    public DMaaPMRFactory(AbstractModule guiceModule) {\r
-        injector = Guice.createInjector(guiceModule);\r
-    }\r
-\r
-    /**\r
-     * Returns configured instance of {@link DMaaPMRPublisher}\r
-     *\r
-     * @param publisherConfig Publisher Config\r
-     * @return configured instance of DMaaP MR Publisher\r
-     */\r
-    public DMaaPMRPublisher createPublisher(@Nonnull DMaaPMRPublisherConfig publisherConfig) {\r
-        final DMaaPMRPublisherFactory publisherFactory = injector.getInstance(DMaaPMRPublisherFactory.class);\r
-        LOG.debug("Creating new DMaaP MR Publisher Instance with configuration: {}", publisherConfig);\r
-        final DMaaPMRPublisher dMaaPMRPublisher = publisherFactory.create(publisherConfig);\r
-        LOG.info("Created new DMaaP MR Publisher Instance. Publisher creation time: {}",\r
-                dMaaPMRPublisher.getPublisherCreationTime());\r
-        return dMaaPMRPublisher;\r
-    }\r
-\r
-    /**\r
-     * Returns configured instance of {@link DMaaPMRSubscriber}\r
-     *\r
-     * @param subscriberConfig Subscriber Config\r
-     * @return configured instance of DMaaP MR Subscriber\r
-     */\r
-    public DMaaPMRSubscriber createSubscriber(@Nonnull DMaaPMRSubscriberConfig subscriberConfig) {\r
-        final DMaaPMRSubscriberFactory subscriberFactory = injector.getInstance(DMaaPMRSubscriberFactory.class);\r
-        LOG.debug("Creating new DMaaP MR Subscriber Instance with configuration: {}", subscriberConfig);\r
-        final DMaaPMRSubscriber dMaaPMRSubscriber = subscriberFactory.create(subscriberConfig);\r
-        LOG.info("Created new DMaaP MR Subscriber Instance. Subscriber creation time: {}",\r
-                dMaaPMRSubscriber.getSubscriberCreationTime());\r
-        return dMaaPMRSubscriber;\r
-    }\r
-\r
-    /**\r
-     * Creates an instance of {@link DMaaPMRFactory}\r
-     *\r
-     * @return {@link DMaaPMRFactory} factory instance\r
-     */\r
-    public static DMaaPMRFactory create() {\r
-        final DMaaPMRFactory dMaaPMRFactory = new DMaaPMRFactory(new AnalyticsDMaaPModule());\r
-        LOG.info("Created new instance of DMaaP MR Factory");\r
-        return dMaaPMRFactory;\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.module.AnalyticsDMaaPModule;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Creates pre injected implementations for {@link DMaaPMRPublisher} and {@link DMaaPMRSubscriber}
+ * <p>
+ *     Usage:
+ *     <p>Create an instance of DMaaP MR Factory</p>
+ *     <pre>
+ *        DMaaPFactory dmaapFactory = DMaaPFactory.initalize()
+ *     </pre>
+ *     <p>Create a new DMaaP MR Publisher</p>
+ *     <pre>
+ *         DMaaPMRPublisher publisher = dmaapFactory.createPublisher(publisherConfig)
+ *     </pre>
+ *     <p>Create new DMaaP MR Subscriber</p>
+ *     <pre>
+ *         DMaaPMRSubscriber subscriber = dmaapFactory.createSubscriber(subscriberConfig)
+ *     </pre>
+ * <p>
+ * <strong>All Clients must use this Factory to initalize DMaaP Message Router Publishers and Subscribers</strong>
+ * </p>
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+public class DMaaPMRFactory {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRFactory.class);
+
+    private final Injector injector;
+
+    public DMaaPMRFactory(AbstractModule guiceModule) {
+        injector = Guice.createInjector(guiceModule);
+    }
+
+    /**
+     * Returns configured instance of {@link DMaaPMRPublisher}
+     *
+     * @param publisherConfig Publisher Config
+     * @return configured instance of DMaaP MR Publisher
+     */
+    public DMaaPMRPublisher createPublisher(@Nonnull DMaaPMRPublisherConfig publisherConfig) {
+        final DMaaPMRPublisherFactory publisherFactory = injector.getInstance(DMaaPMRPublisherFactory.class);
+        LOG.debug("Creating new DMaaP MR Publisher Instance with configuration: {}", publisherConfig);
+        final DMaaPMRPublisher dMaaPMRPublisher = publisherFactory.create(publisherConfig);
+        LOG.info("Created new DMaaP MR Publisher Instance. Publisher creation time: {}",
+                dMaaPMRPublisher.getPublisherCreationTime());
+        return dMaaPMRPublisher;
+    }
+
+    /**
+     * Returns configured instance of {@link DMaaPMRSubscriber}
+     *
+     * @param subscriberConfig Subscriber Config
+     * @return configured instance of DMaaP MR Subscriber
+     */
+    public DMaaPMRSubscriber createSubscriber(@Nonnull DMaaPMRSubscriberConfig subscriberConfig) {
+        final DMaaPMRSubscriberFactory subscriberFactory = injector.getInstance(DMaaPMRSubscriberFactory.class);
+        LOG.debug("Creating new DMaaP MR Subscriber Instance with configuration: {}", subscriberConfig);
+        final DMaaPMRSubscriber dMaaPMRSubscriber = subscriberFactory.create(subscriberConfig);
+        LOG.info("Created new DMaaP MR Subscriber Instance. Subscriber creation time: {}",
+                dMaaPMRSubscriber.getSubscriberCreationTime());
+        return dMaaPMRSubscriber;
+    }
+
+    /**
+     * Creates an instance of {@link DMaaPMRFactory}
+     *
+     * @return {@link DMaaPMRFactory} factory instance
+     */
+    public static DMaaPMRFactory create() {
+        final DMaaPMRFactory dMaaPMRFactory = new DMaaPMRFactory(new AnalyticsDMaaPModule());
+        LOG.info("Created new instance of DMaaP MR Factory");
+        return dMaaPMRFactory;
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.config;\r
-\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Locale;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils.JSON_APPLICATION_TYPE;\r
-\r
-/**\r
- * <p>\r
- *      Contains common parameters for both DMaaP Message Router Publisher and Subscriber Configs\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/12/2016.\r
- */\r
-public abstract class DMaaPMRBaseConfig implements DMaaPMRConfig {\r
-\r
-    protected static final Logger LOG = LoggerFactory.getLogger(DMaaPMRBaseConfig.class);\r
-\r
-    protected String hostName;\r
-    protected Integer portNumber;\r
-    protected String topicName;\r
-    protected String protocol;\r
-    protected String userName;\r
-    protected String userPassword;\r
-    protected String contentType;\r
-\r
-    /**\r
-     * Provides host name e.g. mrlocal-mtnjftle01.homer.com\r
-     *\r
-     * @return host name\r
-     */\r
-    public String getHostName() {\r
-        return hostName;\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides Port Number of DMaaP MR Topic Host. Defaults to 80\r
-     *\r
-     * @return host port number\r
-     */\r
-    public Integer getPortNumber() {\r
-        return portNumber;\r
-    }\r
-\r
-    /**\r
-     * Provides topic name e.g. com.dcae.dmaap.mtnje2.DcaeTestVES\r
-     *\r
-     * @return topic name\r
-     */\r
-    public String getTopicName() {\r
-        return topicName;\r
-    }\r
-\r
-    /**\r
-     * Provides protocol type e.g. http or https\r
-     *\r
-     * @return protocol type\r
-     */\r
-    public String getProtocol() {\r
-        return protocol;\r
-    }\r
-\r
-    /**\r
-     * Provides content type e.g. application/json\r
-     *\r
-     * @return content type\r
-     */\r
-    public String getContentType() {\r
-        return contentType;\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides User name for the DMaaP MR Topic authentication\r
-     *\r
-     * @return user name\r
-     */\r
-    public String getUserName() {\r
-        return userName;\r
-    }\r
-\r
-    /**\r
-     * Provides User password for the DMaaP MR Topic authentication\r
-     *\r
-     * @return user Password\r
-     */\r
-    public String getUserPassword() {\r
-        return userPassword;\r
-    }\r
-\r
-\r
-    /**\r
-     * Trims, adjusts casing and validates user input String for protocol selection\r
-     *\r
-     * @param protocol - User input for protocol String\r
-     * @return - network protocol e.g http or https\r
-     */\r
-    protected static String normalizeValidateProtocol(final String protocol) {\r
-        // validate that only http and https are supported protocols are Supported for DMaaP MR\r
-        String normalizedProtocolString = protocol.trim().toLowerCase(Locale.ENGLISH);\r
-        if (normalizedProtocolString.isEmpty() ||\r
-                !("http".equals(normalizedProtocolString) || "https".equals(normalizedProtocolString))) {\r
-\r
-            final String errorMessage =\r
-                    "Unsupported protocol selection. Only HTTPS and HTTPS are currently supported for DMaaP MR";\r
-\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-        return normalizedProtocolString;\r
-    }\r
-\r
-\r
-    /**\r
-     * Trims, adjust casing and validates content type is supported by DMaaP.\r
-     *\r
-     * NOTE: DMaaP currently only support application/json content type\r
-     *\r
-     * @param contentType content type that needs to checked for DMaaP MR support\r
-     * @return true if content type is supported by DMaaP MR\r
-     */\r
-    protected static String normalizeValidateContentType(final String contentType) {\r
-        // Current DMaaP MR is only supporting "application/json" content type\r
-        String normalizedContentType = contentType.trim().toLowerCase(Locale.ENGLISH);\r
-        final boolean isSupported = contentType.equals(JSON_APPLICATION_TYPE);\r
-        if (!isSupported) {\r
-            final String errorMessage =\r
-                    "Unsupported content type selection. Only application/json is currently supported for DMaaP MR";\r
-\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-        return normalizedContentType;\r
-    }\r
-\r
-\r
-    @Override\r
-    public boolean equals(Object o) {\r
-        if (this == o) {\r
-            return true;\r
-        }\r
-        if (!(o instanceof DMaaPMRBaseConfig)) {\r
-            return false;\r
-        }\r
-        DMaaPMRBaseConfig that = (DMaaPMRBaseConfig) o;\r
-        return Objects.equal(hostName, that.hostName) &&\r
-                Objects.equal(portNumber, that.portNumber) &&\r
-                Objects.equal(topicName, that.topicName) &&\r
-                Objects.equal(protocol, that.protocol) &&\r
-                Objects.equal(userName, that.userName) &&\r
-                Objects.equal(userPassword, that.userPassword) &&\r
-                Objects.equal(contentType, that.contentType);\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return Objects.hashCode(hostName, portNumber, topicName, protocol, userName, userPassword, contentType);\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("hostName", hostName)\r
-                .add("portNumber", portNumber)\r
-                .add("topicName", topicName)\r
-                .add("protocol", protocol)\r
-                .add("userName", userName)\r
-                .add("contentType", contentType)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.config;
+
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Locale;
+
+import static org.onap.dcae.apod.analytics.common.utils.HTTPUtils.JSON_APPLICATION_TYPE;
+
+/**
+ * <p>
+ *      Contains common parameters for both DMaaP Message Router Publisher and Subscriber Configs
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/12/2016.
+ */
+public abstract class DMaaPMRBaseConfig implements DMaaPMRConfig {
+
+    protected static final Logger LOG = LoggerFactory.getLogger(DMaaPMRBaseConfig.class);
+
+    protected String hostName;
+    protected Integer portNumber;
+    protected String topicName;
+    protected String protocol;
+    protected String userName;
+    protected String userPassword;
+    protected String contentType;
+
+    /**
+     * Provides host name e.g. mrlocal-mtnjftle01.homer.com
+     *
+     * @return host name
+     */
+    public String getHostName() {
+        return hostName;
+    }
+
+
+    /**
+     * Provides Port Number of DMaaP MR Topic Host. Defaults to 80
+     *
+     * @return host port number
+     */
+    public Integer getPortNumber() {
+        return portNumber;
+    }
+
+    /**
+     * Provides topic name e.g. com.dcae.dmaap.mtnje2.DcaeTestVES
+     *
+     * @return topic name
+     */
+    public String getTopicName() {
+        return topicName;
+    }
+
+    /**
+     * Provides protocol type e.g. http or https
+     *
+     * @return protocol type
+     */
+    public String getProtocol() {
+        return protocol;
+    }
+
+    /**
+     * Provides content type e.g. application/json
+     *
+     * @return content type
+     */
+    public String getContentType() {
+        return contentType;
+    }
+
+
+    /**
+     * Provides User name for the DMaaP MR Topic authentication
+     *
+     * @return user name
+     */
+    public String getUserName() {
+        return userName;
+    }
+
+    /**
+     * Provides User password for the DMaaP MR Topic authentication
+     *
+     * @return user Password
+     */
+    public String getUserPassword() {
+        return userPassword;
+    }
+
+
+    /**
+     * Trims, adjusts casing and validates user input String for protocol selection
+     *
+     * @param protocol - User input for protocol String
+     * @return - network protocol e.g http or https
+     */
+    protected static String normalizeValidateProtocol(final String protocol) {
+        // validate that only http and https are supported protocols are Supported for DMaaP MR
+        String normalizedProtocolString = protocol.trim().toLowerCase(Locale.ENGLISH);
+        if (normalizedProtocolString.isEmpty() ||
+                !("http".equals(normalizedProtocolString) || "https".equals(normalizedProtocolString))) {
+
+            final String errorMessage =
+                    "Unsupported protocol selection. Only HTTPS and HTTPS are currently supported for DMaaP MR";
+
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+        return normalizedProtocolString;
+    }
+
+
+    /**
+     * Trims, adjust casing and validates content type is supported by DMaaP.
+     *
+     * NOTE: DMaaP currently only support application/json content type
+     *
+     * @param contentType content type that needs to checked for DMaaP MR support
+     * @return true if content type is supported by DMaaP MR
+     */
+    protected static String normalizeValidateContentType(final String contentType) {
+        // Current DMaaP MR is only supporting "application/json" content type
+        String normalizedContentType = contentType.trim().toLowerCase(Locale.ENGLISH);
+        final boolean isSupported = contentType.equals(JSON_APPLICATION_TYPE);
+        if (!isSupported) {
+            final String errorMessage =
+                    "Unsupported content type selection. Only application/json is currently supported for DMaaP MR";
+
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+        return normalizedContentType;
+    }
+
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (!(o instanceof DMaaPMRBaseConfig)) {
+            return false;
+        }
+        DMaaPMRBaseConfig that = (DMaaPMRBaseConfig) o;
+        return Objects.equal(hostName, that.hostName) &&
+                Objects.equal(portNumber, that.portNumber) &&
+                Objects.equal(topicName, that.topicName) &&
+                Objects.equal(protocol, that.protocol) &&
+                Objects.equal(userName, that.userName) &&
+                Objects.equal(userPassword, that.userPassword) &&
+                Objects.equal(contentType, that.contentType);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(hostName, portNumber, topicName, protocol, userName, userPassword, contentType);
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("hostName", hostName)
+                .add("portNumber", portNumber)
+                .add("topicName", topicName)
+                .add("protocol", protocol)
+                .add("userName", userName)
+                .add("contentType", contentType)
+                .toString();
+    }
+}
@@ -1,32 +1,32 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.config;\r
-\r
-/**\r
- * <p>\r
- *      Marker Interface for all DMaaP MR Configs.\r
- *      Holds Default configuration parameters for all Configs\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/12/2016.\r
- */\r
-public interface DMaaPMRConfig {\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.config;
+
+/**
+ * <p>
+ *      Marker Interface for all DMaaP MR Configs.
+ *      Holds Default configuration parameters for all Configs
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/12/2016.
+ */
+public interface DMaaPMRConfig {
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.config;\r
-\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * <p>\r
- *      Immutable DMaaP MR Configuration for DMaaP MR Publisher.\r
- * <p>\r
- *      Use {@link DMaaPMRPublisherConfig.Builder} to construct Subscriber Configuration\r
- * </p>\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/12/2016.\r
- */\r
-public class DMaaPMRPublisherConfig extends DMaaPMRBaseConfig {\r
-\r
-    /**\r
-     * Publisher batching queue size\r
-     */\r
-    private int maxBatchSize;\r
-\r
-    /**\r
-     * Publisher Recovery Queue Size\r
-     */\r
-    private int maxRecoveryQueueSize;\r
-\r
-\r
-    private DMaaPMRPublisherConfig(@Nonnull String hostName,\r
-                                   @Nonnull Integer portNumber,\r
-                                   @Nonnull String topicName,\r
-                                   @Nonnull String protocol,\r
-                                   String userName,\r
-                                   String userPassword,\r
-                                   @Nonnull String contentType,\r
-                                   int maxBatchSize,\r
-                                   int maxRecoveryQueueSize) {\r
-        this.hostName = hostName;\r
-        this.portNumber = portNumber;\r
-        this.topicName = topicName;\r
-        this.protocol = protocol;\r
-        this.userName = userName;\r
-        this.userPassword = userPassword;\r
-        this.contentType = contentType;\r
-        this.maxBatchSize = maxBatchSize;\r
-        this.maxRecoveryQueueSize = maxRecoveryQueueSize;\r
-    }\r
-\r
-\r
-    /**\r
-     * Builder to initialize immutable {@link DMaaPMRPublisherConfig} object\r
-     */\r
-    public static class Builder {\r
-\r
-        private String hostName;\r
-        private Integer portNumber;\r
-        private String topicName;\r
-        private String userName;\r
-        private String userPassword;\r
-        private String protocol;\r
-        private String contentType;\r
-        private int maxBatchSize;\r
-        private int maxRecoveryQueueSize;\r
-\r
-        public Builder(@Nonnull String hostName, @Nonnull String topicName) {\r
-            // required values\r
-            this.hostName = hostName;\r
-            this.topicName = topicName;\r
-            // Default values\r
-            this.portNumber = AnalyticsConstants.DEFAULT_PORT_NUMBER;\r
-            this.userName = AnalyticsConstants.DEFAULT_USER_NAME;\r
-            this.userPassword = AnalyticsConstants.DEFAULT_USER_PASSWORD;\r
-            this.protocol = AnalyticsConstants.DEFAULT_PROTOCOL;\r
-            this.contentType = AnalyticsConstants.DEFAULT_CONTENT_TYPE;\r
-            this.maxBatchSize = AnalyticsConstants.DEFAULT_PUBLISHER_MAX_BATCH_SIZE;\r
-            this.maxRecoveryQueueSize = AnalyticsConstants.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE;\r
-        }\r
-\r
-        /**\r
-         * Setup for custom host port number - Defaults to 80.\r
-         *\r
-         * @param portNumber custom port number\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setPortNumber(@Nonnull Integer portNumber) {\r
-            this.portNumber = portNumber;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup user name for authentication. If no username is provided authentication will be disabled\r
-         *\r
-         * @param userName user name for DMaaP Topic Authentication\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setUserName(@Nonnull String userName) {\r
-            this.userName = userName;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup user password for authentication. If no password is provided authentication will be disabled\r
-         *\r
-         * @param userPassword user password for DMaaP Topic Authentication\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setUserPassword(@Nonnull String userPassword) {\r
-            this.userPassword = userPassword;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup custom Publisher protocol - Defaults to https.\r
-         * Note: Only http and https are currently supported.\r
-         *\r
-         * @param protocol protocol e.g. https\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setProtocol(@Nonnull String protocol) {\r
-            this.protocol = normalizeValidateProtocol(protocol);\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup custom Publisher content-type - Defaults to application/json\r
-         *\r
-         * @param contentType content type e.g. application/json\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setContentType(@Nonnull String contentType) {\r
-            final String normalizedContentType = normalizeValidateContentType(contentType);\r
-            this.contentType = normalizedContentType;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup custom Publisher Max Batch Size - Defaults to 100\r
-         *\r
-         * @param maxBatchSize max Batch Size\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setMaxBatchSize(int maxBatchSize) {\r
-            this.maxBatchSize = maxBatchSize;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup custom Maximum Recovery Queue Size. Recovery Queue is used to hold messages temporarily in case\r
-         * DMaaP MR Publisher topic is not responding for any reason. Defaults to 100,000\r
-         *\r
-         * @param maxRecoveryQueueSize max recovery queue size\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setMaxRecoveryQueueSize(int maxRecoveryQueueSize) {\r
-            this.maxRecoveryQueueSize = maxRecoveryQueueSize;\r
-            return this;\r
-        }\r
-\r
-        /**\r
-         * Creates immutable instance of {@link DMaaPMRPublisherConfig}\r
-         *\r
-         * @return Builds and returns thread safe, immutable {@link DMaaPMRPublisherConfig} object\r
-         */\r
-        public DMaaPMRPublisherConfig build() {\r
-            return new DMaaPMRPublisherConfig(hostName, portNumber, topicName, protocol, userName, userPassword,\r
-                    contentType, maxBatchSize, maxRecoveryQueueSize);\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns max Publisher Batch Queue Size\r
-     *\r
-     * @return max Publisher Batch Queue size\r
-     */\r
-    public int getMaxBatchSize() {\r
-        return maxBatchSize;\r
-    }\r
-\r
-    /**\r
-     * Returns max Publisher Recovery Queue Size\r
-     *\r
-     * @return max Recovery Queue size\r
-     */\r
-    public int getMaxRecoveryQueueSize() {\r
-        return maxRecoveryQueueSize;\r
-    }\r
-\r
-\r
-    @Override\r
-    public boolean equals(Object o) {\r
-        if (this == o) {\r
-            return true;\r
-        }\r
-        if (o == null || getClass() != o.getClass()) {\r
-            return false;\r
-        }\r
-        if (!super.equals(o)) {\r
-            return false;\r
-        }\r
-        DMaaPMRPublisherConfig that = (DMaaPMRPublisherConfig) o;\r
-        return maxBatchSize == that.maxBatchSize &&\r
-                maxRecoveryQueueSize == that.maxRecoveryQueueSize;\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return Objects.hashCode(super.hashCode(), maxBatchSize, maxRecoveryQueueSize);\r
-    }\r
-\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("baseConfig", super.toString())\r
-                .add("maxBatchSize", maxBatchSize)\r
-                .add("maxRecoveryQueueSize", maxRecoveryQueueSize)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.config;
+
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+import javax.annotation.Nonnull;
+
+/**
+ * <p>
+ *      Immutable DMaaP MR Configuration for DMaaP MR Publisher.
+ * <p>
+ *      Use {@link DMaaPMRPublisherConfig.Builder} to construct Subscriber Configuration
+ * </p>
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/12/2016.
+ */
+public class DMaaPMRPublisherConfig extends DMaaPMRBaseConfig {
+
+    /**
+     * Publisher batching queue size
+     */
+    private int maxBatchSize;
+
+    /**
+     * Publisher Recovery Queue Size
+     */
+    private int maxRecoveryQueueSize;
+
+
+    private DMaaPMRPublisherConfig(@Nonnull String hostName,
+                                   @Nonnull Integer portNumber,
+                                   @Nonnull String topicName,
+                                   @Nonnull String protocol,
+                                   String userName,
+                                   String userPassword,
+                                   @Nonnull String contentType,
+                                   int maxBatchSize,
+                                   int maxRecoveryQueueSize) {
+        this.hostName = hostName;
+        this.portNumber = portNumber;
+        this.topicName = topicName;
+        this.protocol = protocol;
+        this.userName = userName;
+        this.userPassword = userPassword;
+        this.contentType = contentType;
+        this.maxBatchSize = maxBatchSize;
+        this.maxRecoveryQueueSize = maxRecoveryQueueSize;
+    }
+
+
+    /**
+     * Builder to initialize immutable {@link DMaaPMRPublisherConfig} object
+     */
+    public static class Builder {
+
+        private String hostName;
+        private Integer portNumber;
+        private String topicName;
+        private String userName;
+        private String userPassword;
+        private String protocol;
+        private String contentType;
+        private int maxBatchSize;
+        private int maxRecoveryQueueSize;
+
+        public Builder(@Nonnull String hostName, @Nonnull String topicName) {
+            // required values
+            this.hostName = hostName;
+            this.topicName = topicName;
+            // Default values
+            this.portNumber = AnalyticsConstants.DEFAULT_PORT_NUMBER;
+            this.userName = AnalyticsConstants.DEFAULT_USER_NAME;
+            this.userPassword = AnalyticsConstants.DEFAULT_USER_PASSWORD;
+            this.protocol = AnalyticsConstants.DEFAULT_PROTOCOL;
+            this.contentType = AnalyticsConstants.DEFAULT_CONTENT_TYPE;
+            this.maxBatchSize = AnalyticsConstants.DEFAULT_PUBLISHER_MAX_BATCH_SIZE;
+            this.maxRecoveryQueueSize = AnalyticsConstants.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE;
+        }
+
+        /**
+         * Setup for custom host port number - Defaults to 80.
+         *
+         * @param portNumber custom port number
+         * @return Builder object itself for chaining
+         */
+        public Builder setPortNumber(@Nonnull Integer portNumber) {
+            this.portNumber = portNumber;
+            return this;
+        }
+
+
+        /**
+         * Setup user name for authentication. If no username is provided authentication will be disabled
+         *
+         * @param userName user name for DMaaP Topic Authentication
+         * @return Builder object itself for chaining
+         */
+        public Builder setUserName(@Nonnull String userName) {
+            this.userName = userName;
+            return this;
+        }
+
+
+        /**
+         * Setup user password for authentication. If no password is provided authentication will be disabled
+         *
+         * @param userPassword user password for DMaaP Topic Authentication
+         * @return Builder object itself for chaining
+         */
+        public Builder setUserPassword(@Nonnull String userPassword) {
+            this.userPassword = userPassword;
+            return this;
+        }
+
+
+        /**
+         * Setup custom Publisher protocol - Defaults to https.
+         * Note: Only http and https are currently supported.
+         *
+         * @param protocol protocol e.g. https
+         * @return Builder object itself for chaining
+         */
+        public Builder setProtocol(@Nonnull String protocol) {
+            this.protocol = normalizeValidateProtocol(protocol);
+            return this;
+        }
+
+
+        /**
+         * Setup custom Publisher content-type - Defaults to application/json
+         *
+         * @param contentType content type e.g. application/json
+         * @return Builder object itself for chaining
+         */
+        public Builder setContentType(@Nonnull String contentType) {
+            final String normalizedContentType = normalizeValidateContentType(contentType);
+            this.contentType = normalizedContentType;
+            return this;
+        }
+
+
+        /**
+         * Setup custom Publisher Max Batch Size - Defaults to 100
+         *
+         * @param maxBatchSize max Batch Size
+         * @return Builder object itself for chaining
+         */
+        public Builder setMaxBatchSize(int maxBatchSize) {
+            this.maxBatchSize = maxBatchSize;
+            return this;
+        }
+
+
+        /**
+         * Setup custom Maximum Recovery Queue Size. Recovery Queue is used to hold messages temporarily in case
+         * DMaaP MR Publisher topic is not responding for any reason. Defaults to 100,000
+         *
+         * @param maxRecoveryQueueSize max recovery queue size
+         * @return Builder object itself for chaining
+         */
+        public Builder setMaxRecoveryQueueSize(int maxRecoveryQueueSize) {
+            this.maxRecoveryQueueSize = maxRecoveryQueueSize;
+            return this;
+        }
+
+        /**
+         * Creates immutable instance of {@link DMaaPMRPublisherConfig}
+         *
+         * @return Builds and returns thread safe, immutable {@link DMaaPMRPublisherConfig} object
+         */
+        public DMaaPMRPublisherConfig build() {
+            return new DMaaPMRPublisherConfig(hostName, portNumber, topicName, protocol, userName, userPassword,
+                    contentType, maxBatchSize, maxRecoveryQueueSize);
+        }
+
+    }
+
+
+    /**
+     * Returns max Publisher Batch Queue Size
+     *
+     * @return max Publisher Batch Queue size
+     */
+    public int getMaxBatchSize() {
+        return maxBatchSize;
+    }
+
+    /**
+     * Returns max Publisher Recovery Queue Size
+     *
+     * @return max Recovery Queue size
+     */
+    public int getMaxRecoveryQueueSize() {
+        return maxRecoveryQueueSize;
+    }
+
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
+        DMaaPMRPublisherConfig that = (DMaaPMRPublisherConfig) o;
+        return maxBatchSize == that.maxBatchSize &&
+                maxRecoveryQueueSize == that.maxRecoveryQueueSize;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(super.hashCode(), maxBatchSize, maxRecoveryQueueSize);
+    }
+
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("baseConfig", super.toString())
+                .add("maxBatchSize", maxBatchSize)
+                .add("maxRecoveryQueueSize", maxRecoveryQueueSize)
+                .toString();
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.config;\r
-\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-\r
-import java.util.UUID;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * <p>\r
- *      Immutable DMaaP MR Configuration for Subscriber.\r
- * <p>\r
- *      Use {@link DMaaPMRSubscriberConfig.Builder} to construct Subscriber Configuration\r
- * <p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/12/2016.\r
- */\r
-public final class DMaaPMRSubscriberConfig extends DMaaPMRBaseConfig {\r
-\r
-    private final String consumerId;\r
-    private final String consumerGroup;\r
-    private final Integer timeoutMS;\r
-    private final Integer messageLimit;\r
-\r
-    private DMaaPMRSubscriberConfig(@Nonnull String hostName,\r
-                                    @Nonnull Integer portNumber,\r
-                                    @Nonnull String topicName,\r
-                                    @Nonnull String protocol,\r
-                                    String userName,\r
-                                    String userPassword,\r
-                                    @Nonnull String contentType,\r
-                                    @Nonnull String consumerId,\r
-                                    @Nonnull String consumerGroup,\r
-                                    @Nonnull Integer timeoutMS,\r
-                                    @Nonnull Integer messageLimit) {\r
-        this.hostName = hostName;\r
-        this.portNumber = portNumber;\r
-        this.topicName = topicName;\r
-        this.protocol = protocol;\r
-        this.userName = userName;\r
-        this.userPassword = userPassword;\r
-        this.contentType = contentType;\r
-        this.consumerId = consumerId;\r
-        this.consumerGroup = consumerGroup;\r
-        this.timeoutMS = timeoutMS;\r
-        this.messageLimit = messageLimit;\r
-    }\r
-\r
-    /**\r
-     * Builder to initialize immutable {@link DMaaPMRSubscriberConfig} object\r
-     */\r
-    public static class Builder {\r
-\r
-        private String hostName;\r
-        private Integer portNumber;\r
-        private String topicName;\r
-        private String userName;\r
-        private String userPassword;\r
-        private String protocol;\r
-        private String contentType;\r
-        private String consumerId;\r
-        private String consumerGroup;\r
-        private Integer timeoutMS;\r
-        private Integer messageLimit;\r
-\r
-        public Builder(@Nonnull String hostName,\r
-                       @Nonnull String topicName) {\r
-            // Required Values\r
-            this.hostName = hostName;\r
-            this.topicName = topicName;\r
-\r
-            // Default values\r
-            this.portNumber = AnalyticsConstants.DEFAULT_PORT_NUMBER;\r
-            this.userName = AnalyticsConstants.DEFAULT_USER_NAME;\r
-            this.userPassword = AnalyticsConstants.DEFAULT_USER_PASSWORD;\r
-            this.protocol = AnalyticsConstants.DEFAULT_PROTOCOL;\r
-            this.contentType = AnalyticsConstants.DEFAULT_CONTENT_TYPE;\r
-            this.consumerId = UUID.randomUUID().toString(); // consumer is assigned a random id by default\r
-            this.consumerGroup = AnalyticsConstants.DEFAULT_SUBSCRIBER_GROUP_PREFIX + consumerId; // random group\r
-            this.timeoutMS = AnalyticsConstants.DEFAULT_SUBSCRIBER_TIMEOUT_MS; // defaults to 10ms timeout\r
-            this.messageLimit = AnalyticsConstants.DEFAULT_SUBSCRIBER_MESSAGE_LIMIT; // defaults to 1000 message limit\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup for custom host port number - Defaults to 80.\r
-         *\r
-         * @param portNumber custom port number\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setPortNumber(@Nonnull Integer portNumber) {\r
-            this.portNumber = portNumber;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup user name for authentication. If no username is provided authentication will be disabled\r
-         *\r
-         * @param userName user name for DMaaP Topic Authentication\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setUserName(@Nonnull String userName) {\r
-            this.userName = userName;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup user password for authentication. If no password is provided authentication will be disabled\r
-         *\r
-         * @param userPassword user password for DMaaP Topic Authentication\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setUserPassword(@Nonnull String userPassword) {\r
-            this.userPassword = userPassword;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup custom Subscriber protocol - Defaults to https.\r
-         * Note: Only http and https are currently supported.\r
-         *\r
-         * @param protocol protocol e.g. https or http\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setProtocol(@Nonnull String protocol) {\r
-\r
-            this.protocol = normalizeValidateProtocol(protocol);\r
-            return this;\r
-        }\r
-\r
-        /**\r
-         * Setup custom Subscriber content-type - Defaults to application/json\r
-         *\r
-         * @param contentType content type e.g. application/json\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setContentType(@Nonnull String contentType) {\r
-            final String normalizedContentType = normalizeValidateContentType(contentType);\r
-            this.contentType = normalizedContentType;\r
-            return this;\r
-        }\r
-\r
-\r
-        /**\r
-         * Setup custom Consumer Id - Defaults to random Id\r
-         *\r
-         * @param consumerId - custom consumer ID\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setConsumerId(@Nonnull String consumerId) {\r
-            this.consumerId = consumerId;\r
-            return this;\r
-        }\r
-\r
-        /**\r
-         * Setup custom Consumer Group - Default to OpenDCAE-DMaaPSub-ConsumerID\r
-         *\r
-         * @param consumerGroup - custom Consumer Group\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setConsumerGroup(@Nonnull String consumerGroup) {\r
-            this.consumerGroup = consumerGroup;\r
-            return this;\r
-        }\r
-\r
-        /**\r
-         * Setup Custom Subscriber timeout in ms - Default to no timeout limit\r
-         *\r
-         * @param timeoutMS timeout in milliseconds\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setTimeoutMS(@Nonnull Integer timeoutMS) {\r
-            this.timeoutMS = timeoutMS;\r
-            return this;\r
-        }\r
-\r
-        /**\r
-         * Setup custom Subscriber Message Limit - Default to no limit\r
-         *\r
-         * @param messageLimit message Limit\r
-         * @return Builder object itself for chaining\r
-         */\r
-        public Builder setMessageLimit(@Nonnull Integer messageLimit) {\r
-            this.messageLimit = messageLimit;\r
-            return this;\r
-        }\r
-\r
-        /**\r
-         * Builds Immutable instance of {@link DMaaPMRSubscriberConfig}\r
-         *\r
-         * @return immutable DMaaP Subscriber Config Object\r
-         */\r
-        public DMaaPMRSubscriberConfig build() {\r
-            return new DMaaPMRSubscriberConfig(hostName, portNumber, topicName, protocol, userName, userPassword,\r
-                    contentType, consumerId, consumerGroup, timeoutMS, messageLimit);\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Consumer Id\r
-     *\r
-     * @return consumer Id\r
-     */\r
-    public String getConsumerId() {\r
-        return consumerId;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Consumer Group\r
-     *\r
-     * @return consumer group\r
-     */\r
-    public String getConsumerGroup() {\r
-        return consumerGroup;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber Timeout in ms\r
-     *\r
-     * @return subscriber timeout ms\r
-     */\r
-    public Integer getTimeoutMS() {\r
-        return timeoutMS;\r
-    }\r
-\r
-    /**\r
-     * DMaaP MR Subscriber message limit\r
-     *\r
-     * @return subscriber message limit\r
-     */\r
-    public Integer getMessageLimit() {\r
-        return messageLimit;\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object o) {\r
-        if (this == o) {\r
-            return true;\r
-        }\r
-        if (o == null || getClass() != o.getClass()) {\r
-            return false;\r
-        }\r
-        if (!super.equals(o)) {\r
-            return false;\r
-        }\r
-        DMaaPMRSubscriberConfig that = (DMaaPMRSubscriberConfig) o;\r
-        return Objects.equal(consumerId, that.consumerId) &&\r
-                Objects.equal(consumerGroup, that.consumerGroup) &&\r
-                Objects.equal(timeoutMS, that.timeoutMS) &&\r
-                Objects.equal(messageLimit, that.messageLimit);\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return Objects.hashCode(super.hashCode(), consumerId, consumerGroup, timeoutMS, messageLimit);\r
-    }\r
-\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("baseConfig", super.toString())\r
-                .add("consumerId", consumerId)\r
-                .add("consumerGroup", consumerGroup)\r
-                .add("timeoutMS", timeoutMS)\r
-                .add("messageLimit", messageLimit)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.config;
+
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+
+import java.util.UUID;
+
+import javax.annotation.Nonnull;
+
+/**
+ * <p>
+ *      Immutable DMaaP MR Configuration for Subscriber.
+ * <p>
+ *      Use {@link DMaaPMRSubscriberConfig.Builder} to construct Subscriber Configuration
+ * <p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/12/2016.
+ */
+public final class DMaaPMRSubscriberConfig extends DMaaPMRBaseConfig {
+
+    private final String consumerId;
+    private final String consumerGroup;
+    private final Integer timeoutMS;
+    private final Integer messageLimit;
+
+    private DMaaPMRSubscriberConfig(@Nonnull String hostName,
+                                    @Nonnull Integer portNumber,
+                                    @Nonnull String topicName,
+                                    @Nonnull String protocol,
+                                    String userName,
+                                    String userPassword,
+                                    @Nonnull String contentType,
+                                    @Nonnull String consumerId,
+                                    @Nonnull String consumerGroup,
+                                    @Nonnull Integer timeoutMS,
+                                    @Nonnull Integer messageLimit) {
+        this.hostName = hostName;
+        this.portNumber = portNumber;
+        this.topicName = topicName;
+        this.protocol = protocol;
+        this.userName = userName;
+        this.userPassword = userPassword;
+        this.contentType = contentType;
+        this.consumerId = consumerId;
+        this.consumerGroup = consumerGroup;
+        this.timeoutMS = timeoutMS;
+        this.messageLimit = messageLimit;
+    }
+
+    /**
+     * Builder to initialize immutable {@link DMaaPMRSubscriberConfig} object
+     */
+    public static class Builder {
+
+        private String hostName;
+        private Integer portNumber;
+        private String topicName;
+        private String userName;
+        private String userPassword;
+        private String protocol;
+        private String contentType;
+        private String consumerId;
+        private String consumerGroup;
+        private Integer timeoutMS;
+        private Integer messageLimit;
+
+        public Builder(@Nonnull String hostName,
+                       @Nonnull String topicName) {
+            // Required Values
+            this.hostName = hostName;
+            this.topicName = topicName;
+
+            // Default values
+            this.portNumber = AnalyticsConstants.DEFAULT_PORT_NUMBER;
+            this.userName = AnalyticsConstants.DEFAULT_USER_NAME;
+            this.userPassword = AnalyticsConstants.DEFAULT_USER_PASSWORD;
+            this.protocol = AnalyticsConstants.DEFAULT_PROTOCOL;
+            this.contentType = AnalyticsConstants.DEFAULT_CONTENT_TYPE;
+            this.consumerId = UUID.randomUUID().toString(); // consumer is assigned a random id by default
+            this.consumerGroup = AnalyticsConstants.DEFAULT_SUBSCRIBER_GROUP_PREFIX + consumerId; // random group
+            this.timeoutMS = AnalyticsConstants.DEFAULT_SUBSCRIBER_TIMEOUT_MS; // defaults to 10ms timeout
+            this.messageLimit = AnalyticsConstants.DEFAULT_SUBSCRIBER_MESSAGE_LIMIT; // defaults to 1000 message limit
+        }
+
+
+        /**
+         * Setup for custom host port number - Defaults to 80.
+         *
+         * @param portNumber custom port number
+         * @return Builder object itself for chaining
+         */
+        public Builder setPortNumber(@Nonnull Integer portNumber) {
+            this.portNumber = portNumber;
+            return this;
+        }
+
+
+        /**
+         * Setup user name for authentication. If no username is provided authentication will be disabled
+         *
+         * @param userName user name for DMaaP Topic Authentication
+         * @return Builder object itself for chaining
+         */
+        public Builder setUserName(@Nonnull String userName) {
+            this.userName = userName;
+            return this;
+        }
+
+
+        /**
+         * Setup user password for authentication. If no password is provided authentication will be disabled
+         *
+         * @param userPassword user password for DMaaP Topic Authentication
+         * @return Builder object itself for chaining
+         */
+        public Builder setUserPassword(@Nonnull String userPassword) {
+            this.userPassword = userPassword;
+            return this;
+        }
+
+
+        /**
+         * Setup custom Subscriber protocol - Defaults to https.
+         * Note: Only http and https are currently supported.
+         *
+         * @param protocol protocol e.g. https or http
+         * @return Builder object itself for chaining
+         */
+        public Builder setProtocol(@Nonnull String protocol) {
+
+            this.protocol = normalizeValidateProtocol(protocol);
+            return this;
+        }
+
+        /**
+         * Setup custom Subscriber content-type - Defaults to application/json
+         *
+         * @param contentType content type e.g. application/json
+         * @return Builder object itself for chaining
+         */
+        public Builder setContentType(@Nonnull String contentType) {
+            final String normalizedContentType = normalizeValidateContentType(contentType);
+            this.contentType = normalizedContentType;
+            return this;
+        }
+
+
+        /**
+         * Setup custom Consumer Id - Defaults to random Id
+         *
+         * @param consumerId - custom consumer ID
+         * @return Builder object itself for chaining
+         */
+        public Builder setConsumerId(@Nonnull String consumerId) {
+            this.consumerId = consumerId;
+            return this;
+        }
+
+        /**
+         * Setup custom Consumer Group - Default to OpenDCAE-DMaaPSub-ConsumerID
+         *
+         * @param consumerGroup - custom Consumer Group
+         * @return Builder object itself for chaining
+         */
+        public Builder setConsumerGroup(@Nonnull String consumerGroup) {
+            this.consumerGroup = consumerGroup;
+            return this;
+        }
+
+        /**
+         * Setup Custom Subscriber timeout in ms - Default to no timeout limit
+         *
+         * @param timeoutMS timeout in milliseconds
+         * @return Builder object itself for chaining
+         */
+        public Builder setTimeoutMS(@Nonnull Integer timeoutMS) {
+            this.timeoutMS = timeoutMS;
+            return this;
+        }
+
+        /**
+         * Setup custom Subscriber Message Limit - Default to no limit
+         *
+         * @param messageLimit message Limit
+         * @return Builder object itself for chaining
+         */
+        public Builder setMessageLimit(@Nonnull Integer messageLimit) {
+            this.messageLimit = messageLimit;
+            return this;
+        }
+
+        /**
+         * Builds Immutable instance of {@link DMaaPMRSubscriberConfig}
+         *
+         * @return immutable DMaaP Subscriber Config Object
+         */
+        public DMaaPMRSubscriberConfig build() {
+            return new DMaaPMRSubscriberConfig(hostName, portNumber, topicName, protocol, userName, userPassword,
+                    contentType, consumerId, consumerGroup, timeoutMS, messageLimit);
+        }
+
+    }
+
+
+    /**
+     * DMaaP MR Subscriber Consumer Id
+     *
+     * @return consumer Id
+     */
+    public String getConsumerId() {
+        return consumerId;
+    }
+
+    /**
+     * DMaaP MR Subscriber Consumer Group
+     *
+     * @return consumer group
+     */
+    public String getConsumerGroup() {
+        return consumerGroup;
+    }
+
+    /**
+     * DMaaP MR Subscriber Timeout in ms
+     *
+     * @return subscriber timeout ms
+     */
+    public Integer getTimeoutMS() {
+        return timeoutMS;
+    }
+
+    /**
+     * DMaaP MR Subscriber message limit
+     *
+     * @return subscriber message limit
+     */
+    public Integer getMessageLimit() {
+        return messageLimit;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
+        DMaaPMRSubscriberConfig that = (DMaaPMRSubscriberConfig) o;
+        return Objects.equal(consumerId, that.consumerId) &&
+                Objects.equal(consumerGroup, that.consumerGroup) &&
+                Objects.equal(timeoutMS, that.timeoutMS) &&
+                Objects.equal(messageLimit, that.messageLimit);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(super.hashCode(), consumerId, consumerGroup, timeoutMS, messageLimit);
+    }
+
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("baseConfig", super.toString())
+                .add("consumerId", consumerId)
+                .add("consumerGroup", consumerGroup)
+                .add("timeoutMS", timeoutMS)
+                .add("messageLimit", messageLimit)
+                .toString();
+    }
+}
@@ -1,38 +1,38 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.response;\r
-\r
-/**\r
- * <p>\r
- *      Contract for all DMaaPMR Publisher Response\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public interface DMaaPMRPublisherResponse extends DMaaPMRResponse {\r
-\r
-\r
-    /**\r
-     * Gets number of pending messages\r
-     *\r
-     * @return pending messages in the batch queue\r
-     */\r
-    int getPendingMessagesCount();\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.response;
+
+/**
+ * <p>
+ *      Contract for all DMaaPMR Publisher Response
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public interface DMaaPMRPublisherResponse extends DMaaPMRResponse {
+
+
+    /**
+     * Gets number of pending messages
+     *
+     * @return pending messages in the batch queue
+     */
+    int getPendingMessagesCount();
+}
@@ -1,70 +1,70 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.response;\r
-\r
-import com.google.common.base.Objects;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * <p>\r
- *      An simple implementation of {@link DMaaPMRPublisherResponse}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public class DMaaPMRPublisherResponseImpl implements DMaaPMRPublisherResponse {\r
-\r
-    private final Integer responseCode;\r
-    private final String responseMessage;\r
-    private final int pendingMessagesCount;\r
-\r
-    public DMaaPMRPublisherResponseImpl(@Nonnull Integer responseCode,\r
-                                        @Nonnull String responseMessage,\r
-                                        int pendingMessagesCount) {\r
-        this.responseCode = responseCode;\r
-        this.responseMessage = responseMessage;\r
-        this.pendingMessagesCount = pendingMessagesCount;\r
-    }\r
-\r
-    @Override\r
-    public Integer getResponseCode() {\r
-        return responseCode;\r
-    }\r
-\r
-    @Override\r
-    public String getResponseMessage() {\r
-        return responseMessage;\r
-    }\r
-\r
-    @Override\r
-    public int getPendingMessagesCount() {\r
-        return pendingMessagesCount;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("responseCode", responseCode)\r
-                .add("responseMessage", responseMessage)\r
-                .add("pendingMessagesCount", pendingMessagesCount)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.response;
+
+import com.google.common.base.Objects;
+
+import javax.annotation.Nonnull;
+
+/**
+ * <p>
+ *      An simple implementation of {@link DMaaPMRPublisherResponse}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public class DMaaPMRPublisherResponseImpl implements DMaaPMRPublisherResponse {
+
+    private final Integer responseCode;
+    private final String responseMessage;
+    private final int pendingMessagesCount;
+
+    public DMaaPMRPublisherResponseImpl(@Nonnull Integer responseCode,
+                                        @Nonnull String responseMessage,
+                                        int pendingMessagesCount) {
+        this.responseCode = responseCode;
+        this.responseMessage = responseMessage;
+        this.pendingMessagesCount = pendingMessagesCount;
+    }
+
+    @Override
+    public Integer getResponseCode() {
+        return responseCode;
+    }
+
+    @Override
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    @Override
+    public int getPendingMessagesCount() {
+        return pendingMessagesCount;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("responseCode", responseCode)
+                .add("responseMessage", responseMessage)
+                .add("pendingMessagesCount", pendingMessagesCount)
+                .toString();
+    }
+}
@@ -1,46 +1,46 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.response;\r
-\r
-/**\r
- * <p>\r
- *      Contract for DMaaP MR Responses\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public interface DMaaPMRResponse {\r
-\r
-    /**\r
-     * Gets HTTP Response Code\r
-     *\r
-     * @return HTTP Response code as String\r
-     */\r
-    Integer getResponseCode();\r
-\r
-    /**\r
-     * Gets Response Message\r
-     *\r
-     * @return Response Message\r
-     */\r
-    String getResponseMessage();\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.response;
+
+/**
+ * <p>
+ *      Contract for DMaaP MR Responses
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public interface DMaaPMRResponse {
+
+    /**
+     * Gets HTTP Response Code
+     *
+     * @return HTTP Response code as String
+     */
+    Integer getResponseCode();
+
+    /**
+     * Gets Response Message
+     *
+     * @return Response Message
+     */
+    String getResponseMessage();
+
+
+}
@@ -1,40 +1,40 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.response;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * <p>\r
- *     Contract for all DMaaP MR Subscriber Responses\r
- * </p>\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public interface DMaaPMRSubscriberResponse extends DMaaPMRResponse {\r
-\r
-    /**\r
-     * Returns message fetched from DMaaP MR Topic\r
-     *\r
-     * @return collection of actual message retrieved from DMaaP MR Topic\r
-     */\r
-    List<String> getFetchedMessages();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.response;
+
+import java.util.List;
+
+/**
+ * <p>
+ *     Contract for all DMaaP MR Subscriber Responses
+ * </p>
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public interface DMaaPMRSubscriberResponse extends DMaaPMRResponse {
+
+    /**
+     * Returns message fetched from DMaaP MR Topic
+     *
+     * @return collection of actual message retrieved from DMaaP MR Topic
+     */
+    List<String> getFetchedMessages();
+
+}
@@ -1,80 +1,80 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.response;\r
-\r
-import com.google.common.base.Objects;\r
-import com.google.common.collect.ImmutableList;\r
-\r
-import java.util.List;\r
-\r
-import javax.annotation.Nonnull;\r
-import javax.annotation.Nullable;\r
-\r
-import static java.util.Collections.unmodifiableList;\r
-\r
-/**\r
- * <p>\r
- *      A simple implementation for {@link DMaaPMRSubscriberResponse}\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public class DMaaPMRSubscriberResponseImpl implements DMaaPMRSubscriberResponse {\r
-\r
-    private final Integer responseCode;\r
-    private final String responseMessage;\r
-    private final List<String> fetchedMessages;\r
-\r
-    public DMaaPMRSubscriberResponseImpl(@Nonnull Integer responseCode,\r
-                                         @Nonnull String responseMessage,\r
-                                         @Nullable List<String> fetchedMessages) {\r
-        this.responseCode = responseCode;\r
-        this.responseMessage = responseMessage;\r
-        this.fetchedMessages = fetchedMessages != null ? fetchedMessages : ImmutableList.<String>of();\r
-    }\r
-\r
-    public DMaaPMRSubscriberResponseImpl(Integer responseCode, String responseMessage) {\r
-        this(responseCode, responseMessage, null);\r
-    }\r
-\r
-    @Override\r
-    public Integer getResponseCode() {\r
-        return responseCode;\r
-    }\r
-\r
-    @Override\r
-    public String getResponseMessage() {\r
-        return responseMessage;\r
-    }\r
-\r
-    @Override\r
-    public List<String> getFetchedMessages() {\r
-        return unmodifiableList(fetchedMessages);\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("responseCode", responseCode)\r
-                .add("responseMessage", responseMessage)\r
-                .add("fetchedMessages(size)", fetchedMessages.size())\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.response;
+
+import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import static java.util.Collections.unmodifiableList;
+
+/**
+ * <p>
+ *      A simple implementation for {@link DMaaPMRSubscriberResponse}
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public class DMaaPMRSubscriberResponseImpl implements DMaaPMRSubscriberResponse {
+
+    private final Integer responseCode;
+    private final String responseMessage;
+    private final List<String> fetchedMessages;
+
+    public DMaaPMRSubscriberResponseImpl(@Nonnull Integer responseCode,
+                                         @Nonnull String responseMessage,
+                                         @Nullable List<String> fetchedMessages) {
+        this.responseCode = responseCode;
+        this.responseMessage = responseMessage;
+        this.fetchedMessages = fetchedMessages != null ? fetchedMessages : ImmutableList.<String>of();
+    }
+
+    public DMaaPMRSubscriberResponseImpl(Integer responseCode, String responseMessage) {
+        this(responseCode, responseMessage, null);
+    }
+
+    @Override
+    public Integer getResponseCode() {
+        return responseCode;
+    }
+
+    @Override
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    @Override
+    public List<String> getFetchedMessages() {
+        return unmodifiableList(fetchedMessages);
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("responseCode", responseCode)
+                .add("responseMessage", responseMessage)
+                .add("fetchedMessages(size)", fetchedMessages.size())
+                .toString();
+    }
+}
@@ -1,62 +1,62 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.module;\r
-\r
-import com.google.inject.AbstractModule;\r
-import com.google.inject.assistedinject.FactoryModuleBuilder;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.apache.http.impl.client.HttpClients;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherImpl;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueImpl;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberImpl;\r
-\r
-/**\r
- * Guice Module to wire concrete implementations with interfaces\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-public class AnalyticsDMaaPModule extends AbstractModule {\r
-\r
-\r
-    @Override\r
-    protected void configure() {\r
-\r
-        // Bind Http Client\r
-        bind(CloseableHttpClient.class).toInstance(HttpClients.createDefault());\r
-\r
-        // Bind Publishing queue\r
-        install(new FactoryModuleBuilder().implement(DMaaPMRPublisherQueue.class, DMaaPMRPublisherQueueImpl.class)\r
-                .build(DMaaPMRPublisherQueueFactory.class));\r
-\r
-        install(new FactoryModuleBuilder().implement(DMaaPMRPublisher.class, DMaaPMRPublisherImpl.class)\r
-                .build(DMaaPMRPublisherFactory.class));\r
-\r
-        install(new FactoryModuleBuilder().implement(DMaaPMRSubscriber.class, DMaaPMRSubscriberImpl.class)\r
-                .build(DMaaPMRSubscriberFactory.class));\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.module;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.assistedinject.FactoryModuleBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherImpl;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueImpl;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberImpl;
+
+/**
+ * Guice Module to wire concrete implementations with interfaces
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+public class AnalyticsDMaaPModule extends AbstractModule {
+
+
+    @Override
+    protected void configure() {
+
+        // Bind Http Client
+        bind(CloseableHttpClient.class).toInstance(HttpClients.createDefault());
+
+        // Bind Publishing queue
+        install(new FactoryModuleBuilder().implement(DMaaPMRPublisherQueue.class, DMaaPMRPublisherQueueImpl.class)
+                .build(DMaaPMRPublisherQueueFactory.class));
+
+        install(new FactoryModuleBuilder().implement(DMaaPMRPublisher.class, DMaaPMRPublisherImpl.class)
+                .build(DMaaPMRPublisherFactory.class));
+
+        install(new FactoryModuleBuilder().implement(DMaaPMRSubscriber.class, DMaaPMRSubscriberImpl.class)
+                .build(DMaaPMRSubscriberFactory.class));
+
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.JsonNode;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Optional;\r
-import org.apache.commons.codec.binary.Base64;\r
-import org.apache.commons.lang3.StringEscapeUtils;\r
-import org.apache.commons.lang3.tuple.ImmutablePair;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.apache.http.HttpEntity;\r
-import org.apache.http.HttpResponse;\r
-import org.apache.http.client.ResponseHandler;\r
-import org.apache.http.client.utils.URIBuilder;\r
-import org.apache.http.util.EntityUtils;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponseImpl;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponseImpl;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.net.URI;\r
-import java.net.URISyntaxException;\r
-import java.nio.charset.Charset;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-import javax.annotation.Nonnull;\r
-import javax.annotation.Nullable;\r
-\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * Base class for DMaaP MR Publishers and Subscriber Implementations containing various utility methods\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/1/2016.\r
- */\r
-public abstract class BaseDMaaPMRComponent implements DMaaPMRComponent {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(BaseDMaaPMRComponent.class);\r
-\r
-    private static final ObjectMapper objectMapper = new ObjectMapper();\r
-\r
-    /**\r
-     * Creates Base64 encoded Auth Header for given userName and Password\r
-     * If either user name of password are null return absent\r
-     *\r
-     * @param userName username\r
-     * @param userPassword user password\r
-     * @return base64 encoded auth header if username or password are both non null\r
-     */\r
-    protected static Optional<String> getAuthHeader(@Nullable final String userName,\r
-                                                    @Nullable final String userPassword) {\r
-        if (userName == null || userPassword == null) {\r
-            return Optional.absent();\r
-        } else {\r
-            final String auth = userName + ":" + userPassword;\r
-            final Charset isoCharset = Charset.forName("ISO-8859-1");\r
-            byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(isoCharset));\r
-            return Optional.of("Basic " + new String(encodedAuth, isoCharset));\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates Publisher URI for given {@link DMaaPMRPublisherConfig}\r
-     *\r
-     * @param publisherConfig publisher settings\r
-     *\r
-     * @return DMaaP MR Publisher Topic URI that can be used to post messages to MR Topic\r
-     */\r
-    protected static URI createPublisherURI(final DMaaPMRPublisherConfig publisherConfig) {\r
-        final String hostName = publisherConfig.getHostName();\r
-        final Integer portNumber = publisherConfig.getPortNumber();\r
-        final String getProtocol = publisherConfig.getProtocol();\r
-        final String topicName = publisherConfig.getTopicName();\r
-        URI publisherURI = null;\r
-        try {\r
-            publisherURI = new URIBuilder().setScheme(getProtocol).setHost(hostName).setPort(portNumber)\r
-                    .setPath(AnalyticsConstants.DMAAP_URI_PATH_PREFIX + topicName).build();\r
-        } catch (URISyntaxException e) {\r
-            final String errorMessage = format("Error while creating publisher URI: %s", e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-        LOG.info("Created DMaaP MR Publisher URI: {}", publisherURI);\r
-        return publisherURI;\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates Subscriber URI for given {@link DMaaPMRSubscriberConfig}\r
-     *\r
-     * @param subscriberConfig subscriber settings\r
-     *\r
-     * @return DMaaP MR Subscriber Topic URI that can be used to fetch messages from MR topic\r
-     */\r
-    protected static URI createSubscriberURI(final DMaaPMRSubscriberConfig subscriberConfig) {\r
-        final String hostName = subscriberConfig.getHostName();\r
-        final Integer portNumber = subscriberConfig.getPortNumber();\r
-        final String getProtocol = subscriberConfig.getProtocol();\r
-        final String topicName = subscriberConfig.getTopicName();\r
-        final String consumerId = subscriberConfig.getConsumerId();\r
-        final String consumerGroup = subscriberConfig.getConsumerGroup();\r
-        final Integer timeoutMS = subscriberConfig.getTimeoutMS();\r
-        final Integer messageLimit = subscriberConfig.getMessageLimit();\r
-        URI subscriberURI = null;\r
-        try {\r
-            URIBuilder uriBuilder = new URIBuilder().setScheme(getProtocol).setHost(hostName).setPort(portNumber)\r
-                    .setPath(AnalyticsConstants.DMAAP_URI_PATH_PREFIX\r
-                            + topicName + "/"\r
-                            + consumerGroup + "/" +\r
-                            consumerId);\r
-            // add query params if present\r
-            if (timeoutMS > 0) {\r
-                uriBuilder.addParameter(AnalyticsConstants.SUBSCRIBER_TIMEOUT_QUERY_PARAM_NAME, timeoutMS.toString());\r
-            }\r
-            if (messageLimit > 0) {\r
-                uriBuilder.addParameter(AnalyticsConstants.SUBSCRIBER_MSG_LIMIT_QUERY_PARAM_NAME,\r
-                        messageLimit.toString());\r
-            }\r
-            subscriberURI = uriBuilder.build();\r
-\r
-        } catch (URISyntaxException e) {\r
-            final String errorMessage = format("Error while creating subscriber URI: %s", e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-        LOG.info("Created DMaaP MR Subscriber URI: {}", subscriberURI);\r
-        return subscriberURI;\r
-    }\r
-\r
-\r
-    /**\r
-     *  Creates 202 (Accepted) Response code message\r
-     *\r
-     * @param batchQueueSize batch Queue size\r
-     *\r
-     * @return response with 202 message code\r
-     */\r
-    protected static DMaaPMRPublisherResponse createPublisherAcceptedResponse(int batchQueueSize) {\r
-        return createPublisherResponse(HTTPUtils.HTTP_ACCEPTED_RESPONSE_CODE,\r
-                "Accepted - Messages queued for batch publishing to MR Topic", batchQueueSize);\r
-    }\r
-\r
-\r
-    /**\r
-     *  Creates 204 (No Content) Response code message\r
-     *\r
-     * @return response with 204 message code\r
-     */\r
-    protected static DMaaPMRPublisherResponse createPublisherNoContentResponse() {\r
-        return createPublisherResponse(HTTPUtils.HTTP_NO_CONTENT_RESPONSE_CODE,\r
-                "No Content - No Messages in batch queue for flushing to MR Topic", 0);\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates Publisher Response for given response code, response Message and pending Message Count\r
-     *\r
-     * @param responseCode HTTP Status Code\r
-     * @param responseMessage response message\r
-     * @param pendingMessages pending messages in batch queue\r
-     *\r
-     * @return DMaaP MR Publisher Response\r
-     */\r
-    protected static DMaaPMRPublisherResponse createPublisherResponse(int responseCode, String\r
-            responseMessage, int pendingMessages) {\r
-        return new DMaaPMRPublisherResponseImpl(responseCode, responseMessage, pendingMessages);\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns weekly consistent pending messages in batch queue\r
-     *\r
-     * @param publisherQueue batch queue\r
-     * @param publisherConfig publisher settings\r
-     *\r
-     * @return pending messages to be published\r
-     */\r
-    protected static int getPendingMessages(@Nonnull final DMaaPMRPublisherQueue publisherQueue,\r
-                                            @Nonnull final DMaaPMRPublisherConfig publisherConfig) {\r
-        return publisherConfig.getMaxBatchSize() - publisherQueue.getBatchQueueRemainingSize();\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates Subscriber Response for give response Code, response Message and fetch messages\r
-     *\r
-     * @param responseCode response Code\r
-     * @param responseMessage response Message\r
-     * @param fetchedMessages fetched messages\r
-     *\r
-     * @return DMaaP MR Subscriber Response\r
-     */\r
-    protected static DMaaPMRSubscriberResponse createSubscriberResponse(int responseCode, String\r
-            responseMessage, List<String> fetchedMessages) {\r
-        if (fetchedMessages == null) {\r
-            return new DMaaPMRSubscriberResponseImpl(responseCode, responseMessage);\r
-        } else {\r
-            return new DMaaPMRSubscriberResponseImpl(responseCode, responseMessage, fetchedMessages);\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Custom response handler which extract status code and response body\r
-     *\r
-     * @return Pair containing Response code and response body\r
-     */\r
-    protected static ResponseHandler<Pair<Integer, String>> responseHandler() {\r
-        return new ResponseHandler<Pair<Integer, String>>() {\r
-            @Override\r
-            public Pair<Integer, String> handleResponse(HttpResponse response) throws IOException {\r
-                // Get Response status code\r
-                final int status = response.getStatusLine().getStatusCode();\r
-                final HttpEntity responseEntity = response.getEntity();\r
-                // If response entity is not null - extract response body as string\r
-                String responseEntityString = "";\r
-                if (responseEntity != null) {\r
-                    responseEntityString = EntityUtils.toString(responseEntity);\r
-                }\r
-                return new ImmutablePair<>(status, responseEntityString);\r
-            }\r
-        };\r
-    }\r
-\r
-\r
-    /**\r
-     *  Adds message to Publisher recovery queue. If recovery queue is full throws an error as messages will\r
-     *  be lost\r
-     *\r
-     * @param publisherQueue publisher queue\r
-     * @param messages recoverable messages to be published to recovery queue\r
-     */\r
-    protected static void addMessagesToRecoveryQueue(DMaaPMRPublisherQueue publisherQueue,\r
-                                                     List<String> messages) {\r
-        try {\r
-            publisherQueue.addRecoverableMessages(messages);\r
-\r
-            LOG.debug("Messages Added to Recovery Queue. Messages Size: {}, Recovery Queue Remaining Size: {}",\r
-                    messages.size(), publisherQueue.getBatchQueueRemainingSize());\r
-\r
-        } catch (IllegalStateException e) {\r
-            final String errorMessage = format("Unable to put messages in recovery queue. Messages will be lost. " +\r
-                            "Recovery Queue might be full. Message Size: %d, Recovery Queue Remaining Capacity: %d",\r
-                    messages.size(), publisherQueue.getRecoveryQueueRemainingSize());\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Converts List of messages to Json String Array which can be published to DMaaP MR topic.\r
-     *\r
-     * @param messages messages that need to parsed to Json Array representation\r
-     * @return json string representation of message\r
-     */\r
-    protected static String convertToJsonString(@Nullable final List<String> messages) {\r
-        // If messages are null or empty just return empty array\r
-        if (messages == null || messages.isEmpty()) {\r
-            return "[]";\r
-        }\r
-\r
-\r
-        List<JsonNode> jsonMessageObjectsList = new LinkedList<>();\r
-\r
-        try {\r
-            for (String message : messages) {\r
-                final JsonNode jsonNode = objectMapper.readTree(message);\r
-                jsonMessageObjectsList.add(jsonNode);\r
-            }\r
-            return objectMapper.writeValueAsString(jsonMessageObjectsList);\r
-        } catch (JsonProcessingException e) {\r
-            final String errorMessage =\r
-                    format("Unable to convert publisher messages to Json. Messages: %s, Json Error: %s",\r
-                            messages, e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-\r
-        } catch (IOException e) {\r
-            final String errorMessage =\r
-                    format("IO Exception while converting publisher messages to Json. Messages: %s, Json Error: %s",\r
-                            messages, e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Converts subscriber messages json string to List of messages. If message Json String is empty\r
-     * or null\r
-     *\r
-     * @param messagesJsonString json messages String\r
-     *\r
-     * @return List containing DMaaP MR Messages\r
-     */\r
-    protected static List<String> convertJsonToStringMessages(@Nullable final String messagesJsonString) {\r
-\r
-        final LinkedList<String> messages = new LinkedList<>();\r
-\r
-        // If message string is not null or not empty parse json message array to List of string messages\r
-        if (messagesJsonString != null && !messagesJsonString.trim().isEmpty()\r
-                && !("[]").equals(messagesJsonString.trim())) {\r
-\r
-            try {\r
-                // get root node\r
-                final JsonNode rootNode = objectMapper.readTree(messagesJsonString);\r
-                // iterate over root node and parse arrays messages\r
-                for (JsonNode jsonNode : rootNode) {\r
-                    // if array parse it is array of messages\r
-                    final String incomingMessageString = jsonNode.toString();\r
-                    if (jsonNode.isArray()) {\r
-                        final List messageList = objectMapper.readValue(incomingMessageString, List.class);\r
-                        for (Object message : messageList) {\r
-                            final String jsonMessageString = objectMapper.writeValueAsString(message);\r
-                            addUnescapedJsonToMessage(messages, jsonMessageString);\r
-                        }\r
-                    } else {\r
-                        // parse it as object\r
-                        addUnescapedJsonToMessage(messages, incomingMessageString);\r
-                    }\r
-                }\r
-\r
-            } catch (IOException e) {\r
-                final String errorMessage =\r
-                        format("Unable to convert subscriber Json String to Messages. Subscriber Response String: %s," +\r
-                                " Json Error: %s", messagesJsonString, e);\r
-                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-            }\r
-\r
-        }\r
-        return messages;\r
-    }\r
-\r
-    /**\r
-     * Adds unescaped Json messages to given messages list\r
-     *\r
-     * @param messages message list in which unescaped messages will be added\r
-     * @param incomingMessageString incoming message string that may need to be escaped\r
-     */\r
-    private static void addUnescapedJsonToMessage(List<String> messages, String incomingMessageString) {\r
-        if (incomingMessageString.startsWith("\"") && incomingMessageString.endsWith("\"")) {\r
-            messages.add(StringEscapeUtils.unescapeJson(\r
-                    incomingMessageString.substring(1, incomingMessageString.length() - 1)));\r
-        } else {\r
-            messages.add(StringEscapeUtils.unescapeJson(incomingMessageString));\r
-        }\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Optional;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.util.EntityUtils;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.common.utils.HTTPUtils;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponseImpl;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponseImpl;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.Charset;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import static java.lang.String.format;
+
+/**
+ * Base class for DMaaP MR Publishers and Subscriber Implementations containing various utility methods
+ *
+ * @author Rajiv Singla . Creation Date: 11/1/2016.
+ */
+public abstract class BaseDMaaPMRComponent implements DMaaPMRComponent {
+
+    private static final Logger LOG = LoggerFactory.getLogger(BaseDMaaPMRComponent.class);
+
+    private static final ObjectMapper objectMapper = new ObjectMapper();
+
+    /**
+     * Creates Base64 encoded Auth Header for given userName and Password
+     * If either user name of password are null return absent
+     *
+     * @param userName username
+     * @param userPassword user password
+     * @return base64 encoded auth header if username or password are both non null
+     */
+    protected static Optional<String> getAuthHeader(@Nullable final String userName,
+                                                    @Nullable final String userPassword) {
+        if (userName == null || userPassword == null) {
+            return Optional.absent();
+        } else {
+            final String auth = userName + ":" + userPassword;
+            final Charset isoCharset = Charset.forName("ISO-8859-1");
+            byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(isoCharset));
+            return Optional.of("Basic " + new String(encodedAuth, isoCharset));
+        }
+    }
+
+
+    /**
+     * Creates Publisher URI for given {@link DMaaPMRPublisherConfig}
+     *
+     * @param publisherConfig publisher settings
+     *
+     * @return DMaaP MR Publisher Topic URI that can be used to post messages to MR Topic
+     */
+    protected static URI createPublisherURI(final DMaaPMRPublisherConfig publisherConfig) {
+        final String hostName = publisherConfig.getHostName();
+        final Integer portNumber = publisherConfig.getPortNumber();
+        final String getProtocol = publisherConfig.getProtocol();
+        final String topicName = publisherConfig.getTopicName();
+        URI publisherURI = null;
+        try {
+            publisherURI = new URIBuilder().setScheme(getProtocol).setHost(hostName).setPort(portNumber)
+                    .setPath(AnalyticsConstants.DMAAP_URI_PATH_PREFIX + topicName).build();
+        } catch (URISyntaxException e) {
+            final String errorMessage = format("Error while creating publisher URI: %s", e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+        LOG.info("Created DMaaP MR Publisher URI: {}", publisherURI);
+        return publisherURI;
+    }
+
+
+    /**
+     * Creates Subscriber URI for given {@link DMaaPMRSubscriberConfig}
+     *
+     * @param subscriberConfig subscriber settings
+     *
+     * @return DMaaP MR Subscriber Topic URI that can be used to fetch messages from MR topic
+     */
+    protected static URI createSubscriberURI(final DMaaPMRSubscriberConfig subscriberConfig) {
+        final String hostName = subscriberConfig.getHostName();
+        final Integer portNumber = subscriberConfig.getPortNumber();
+        final String getProtocol = subscriberConfig.getProtocol();
+        final String topicName = subscriberConfig.getTopicName();
+        final String consumerId = subscriberConfig.getConsumerId();
+        final String consumerGroup = subscriberConfig.getConsumerGroup();
+        final Integer timeoutMS = subscriberConfig.getTimeoutMS();
+        final Integer messageLimit = subscriberConfig.getMessageLimit();
+        URI subscriberURI = null;
+        try {
+            URIBuilder uriBuilder = new URIBuilder().setScheme(getProtocol).setHost(hostName).setPort(portNumber)
+                    .setPath(AnalyticsConstants.DMAAP_URI_PATH_PREFIX
+                            + topicName + "/"
+                            + consumerGroup + "/" +
+                            consumerId);
+            // add query params if present
+            if (timeoutMS > 0) {
+                uriBuilder.addParameter(AnalyticsConstants.SUBSCRIBER_TIMEOUT_QUERY_PARAM_NAME, timeoutMS.toString());
+            }
+            if (messageLimit > 0) {
+                uriBuilder.addParameter(AnalyticsConstants.SUBSCRIBER_MSG_LIMIT_QUERY_PARAM_NAME,
+                        messageLimit.toString());
+            }
+            subscriberURI = uriBuilder.build();
+
+        } catch (URISyntaxException e) {
+            final String errorMessage = format("Error while creating subscriber URI: %s", e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+        LOG.info("Created DMaaP MR Subscriber URI: {}", subscriberURI);
+        return subscriberURI;
+    }
+
+
+    /**
+     *  Creates 202 (Accepted) Response code message
+     *
+     * @param batchQueueSize batch Queue size
+     *
+     * @return response with 202 message code
+     */
+    protected static DMaaPMRPublisherResponse createPublisherAcceptedResponse(int batchQueueSize) {
+        return createPublisherResponse(HTTPUtils.HTTP_ACCEPTED_RESPONSE_CODE,
+                "Accepted - Messages queued for batch publishing to MR Topic", batchQueueSize);
+    }
+
+
+    /**
+     *  Creates 204 (No Content) Response code message
+     *
+     * @return response with 204 message code
+     */
+    protected static DMaaPMRPublisherResponse createPublisherNoContentResponse() {
+        return createPublisherResponse(HTTPUtils.HTTP_NO_CONTENT_RESPONSE_CODE,
+                "No Content - No Messages in batch queue for flushing to MR Topic", 0);
+    }
+
+
+    /**
+     * Creates Publisher Response for given response code, response Message and pending Message Count
+     *
+     * @param responseCode HTTP Status Code
+     * @param responseMessage response message
+     * @param pendingMessages pending messages in batch queue
+     *
+     * @return DMaaP MR Publisher Response
+     */
+    protected static DMaaPMRPublisherResponse createPublisherResponse(int responseCode, String
+            responseMessage, int pendingMessages) {
+        return new DMaaPMRPublisherResponseImpl(responseCode, responseMessage, pendingMessages);
+    }
+
+
+    /**
+     * Returns weekly consistent pending messages in batch queue
+     *
+     * @param publisherQueue batch queue
+     * @param publisherConfig publisher settings
+     *
+     * @return pending messages to be published
+     */
+    protected static int getPendingMessages(@Nonnull final DMaaPMRPublisherQueue publisherQueue,
+                                            @Nonnull final DMaaPMRPublisherConfig publisherConfig) {
+        return publisherConfig.getMaxBatchSize() - publisherQueue.getBatchQueueRemainingSize();
+    }
+
+
+    /**
+     * Creates Subscriber Response for give response Code, response Message and fetch messages
+     *
+     * @param responseCode response Code
+     * @param responseMessage response Message
+     * @param fetchedMessages fetched messages
+     *
+     * @return DMaaP MR Subscriber Response
+     */
+    protected static DMaaPMRSubscriberResponse createSubscriberResponse(int responseCode, String
+            responseMessage, List<String> fetchedMessages) {
+        if (fetchedMessages == null) {
+            return new DMaaPMRSubscriberResponseImpl(responseCode, responseMessage);
+        } else {
+            return new DMaaPMRSubscriberResponseImpl(responseCode, responseMessage, fetchedMessages);
+        }
+    }
+
+
+    /**
+     * Custom response handler which extract status code and response body
+     *
+     * @return Pair containing Response code and response body
+     */
+    protected static ResponseHandler<Pair<Integer, String>> responseHandler() {
+        return new ResponseHandler<Pair<Integer, String>>() {
+            @Override
+            public Pair<Integer, String> handleResponse(HttpResponse response) throws IOException {
+                // Get Response status code
+                final int status = response.getStatusLine().getStatusCode();
+                final HttpEntity responseEntity = response.getEntity();
+                // If response entity is not null - extract response body as string
+                String responseEntityString = "";
+                if (responseEntity != null) {
+                    responseEntityString = EntityUtils.toString(responseEntity);
+                }
+                return new ImmutablePair<>(status, responseEntityString);
+            }
+        };
+    }
+
+
+    /**
+     *  Adds message to Publisher recovery queue. If recovery queue is full throws an error as messages will
+     *  be lost
+     *
+     * @param publisherQueue publisher queue
+     * @param messages recoverable messages to be published to recovery queue
+     */
+    protected static void addMessagesToRecoveryQueue(DMaaPMRPublisherQueue publisherQueue,
+                                                     List<String> messages) {
+        try {
+            publisherQueue.addRecoverableMessages(messages);
+
+            LOG.debug("Messages Added to Recovery Queue. Messages Size: {}, Recovery Queue Remaining Size: {}",
+                    messages.size(), publisherQueue.getBatchQueueRemainingSize());
+
+        } catch (IllegalStateException e) {
+            final String errorMessage = format("Unable to put messages in recovery queue. Messages will be lost. " +
+                            "Recovery Queue might be full. Message Size: %d, Recovery Queue Remaining Capacity: %d",
+                    messages.size(), publisherQueue.getRecoveryQueueRemainingSize());
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+    }
+
+
+    /**
+     * Converts List of messages to Json String Array which can be published to DMaaP MR topic.
+     *
+     * @param messages messages that need to parsed to Json Array representation
+     * @return json string representation of message
+     */
+    protected static String convertToJsonString(@Nullable final List<String> messages) {
+        // If messages are null or empty just return empty array
+        if (messages == null || messages.isEmpty()) {
+            return "[]";
+        }
+
+
+        List<JsonNode> jsonMessageObjectsList = new LinkedList<>();
+
+        try {
+            for (String message : messages) {
+                final JsonNode jsonNode = objectMapper.readTree(message);
+                jsonMessageObjectsList.add(jsonNode);
+            }
+            return objectMapper.writeValueAsString(jsonMessageObjectsList);
+        } catch (JsonProcessingException e) {
+            final String errorMessage =
+                    format("Unable to convert publisher messages to Json. Messages: %s, Json Error: %s",
+                            messages, e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+
+        } catch (IOException e) {
+            final String errorMessage =
+                    format("IO Exception while converting publisher messages to Json. Messages: %s, Json Error: %s",
+                            messages, e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+    }
+
+
+    /**
+     * Converts subscriber messages json string to List of messages. If message Json String is empty
+     * or null
+     *
+     * @param messagesJsonString json messages String
+     *
+     * @return List containing DMaaP MR Messages
+     */
+    protected static List<String> convertJsonToStringMessages(@Nullable final String messagesJsonString) {
+
+        final LinkedList<String> messages = new LinkedList<>();
+
+        // If message string is not null or not empty parse json message array to List of string messages
+        if (messagesJsonString != null && !messagesJsonString.trim().isEmpty()
+                && !("[]").equals(messagesJsonString.trim())) {
+
+            try {
+                // get root node
+                final JsonNode rootNode = objectMapper.readTree(messagesJsonString);
+                // iterate over root node and parse arrays messages
+                for (JsonNode jsonNode : rootNode) {
+                    // if array parse it is array of messages
+                    final String incomingMessageString = jsonNode.toString();
+                    if (jsonNode.isArray()) {
+                        final List messageList = objectMapper.readValue(incomingMessageString, List.class);
+                        for (Object message : messageList) {
+                            final String jsonMessageString = objectMapper.writeValueAsString(message);
+                            addUnescapedJsonToMessage(messages, jsonMessageString);
+                        }
+                    } else {
+                        // parse it as object
+                        addUnescapedJsonToMessage(messages, incomingMessageString);
+                    }
+                }
+
+            } catch (IOException e) {
+                final String errorMessage =
+                        format("Unable to convert subscriber Json String to Messages. Subscriber Response String: %s," +
+                                " Json Error: %s", messagesJsonString, e);
+                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+            }
+
+        }
+        return messages;
+    }
+
+    /**
+     * Adds unescaped Json messages to given messages list
+     *
+     * @param messages message list in which unescaped messages will be added
+     * @param incomingMessageString incoming message string that may need to be escaped
+     */
+    private static void addUnescapedJsonToMessage(List<String> messages, String incomingMessageString) {
+        if (incomingMessageString.startsWith("\"") && incomingMessageString.endsWith("\"")) {
+            messages.add(StringEscapeUtils.unescapeJson(
+                    incomingMessageString.substring(1, incomingMessageString.length() - 1)));
+        } else {
+            messages.add(StringEscapeUtils.unescapeJson(incomingMessageString));
+        }
+    }
+
+
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service;\r
-\r
-/**\r
- * Marker interface for all DMaaP MR Components e.g. MR Publishers, MR Subscribers\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/1/2016.\r
- */\r
-public interface DMaaPMRComponent {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service;
+
+/**
+ * Marker interface for all DMaaP MR Components e.g. MR Publishers, MR Subscribers
+ *
+ * @author Rajiv Singla . Creation Date: 11/1/2016.
+ */
+public interface DMaaPMRComponent {
+}
@@ -1,95 +1,95 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-/**\r
- * <p>\r
- *     DMaaP MR Publisher can be used to publish messages to DMaaP MR Topics.\r
- * <p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public interface DMaaPMRPublisher extends AutoCloseable {\r
-\r
-\r
-    /**\r
-     * <p>\r
-     *     Adds collection of messages to DMaaP MR Topic Publishing Queue.\r
-     * <p>\r
-     *     Note: Invoking this method may or may not cause publishing immediately\r
-     *     as publishing in done is batch mode by default. Parameter maxBatchSize\r
-     *     in {@link DMaaPMRPublisherConfig} is used to determine max batch queue size.\r
-     *     If the maxBatchSize is reached all message will be published automatically\r
-     *     during subsequent call.\r
-     * </p>\r
-     *\r
-     * @param messages messages to publish to DMaaP MR Publisher\r
-     * @return response which may contain Http Response code 202 (Accepted) as publishing\r
-     * will proceed when max batch size is reached. Throws {@link DCAEAnalyticsRuntimeException}\r
-     * if publishing fails\r
-     */\r
-    DMaaPMRPublisherResponse publish(List<String> messages);\r
-\r
-\r
-    /**\r
-     * <p>\r
-     *     Forces publishing of messages to DMaaP MR Topic and returns {@link DMaaPMRPublisherResponse}\r
-     *     which can be inspected for HTTP status code of publishing call to DMaaP MR Topic.\r
-     * </p>\r
-     *\r
-     * @param messages messages to publish to DMaaP MR Publisher\r
-     * @return DMaaP Message Router Publisher Response. Throws {@link DCAEAnalyticsRuntimeException}\r
-     * if force publishing fails\r
-     *\r
-     */\r
-    DMaaPMRPublisherResponse forcePublish(List<String> messages);\r
-\r
-\r
-    /**\r
-     * <p>\r
-     *     Forces publishing of messages in Publisher queue to DMaaP MR Topic and returns\r
-     *     {@link DMaaPMRPublisherResponse}.If there are no messages were in the queue to\r
-     *     be flushed response code 304 (Not Modified) will be returned\r
-     * </p>\r
-     *\r
-     * @return DMaaP Message Router Publisher Response\r
-     */\r
-    DMaaPMRPublisherResponse flush();\r
-\r
-\r
-    /**\r
-     * <p>\r
-     *     Returns the creation time when Publisher instance was created.\r
-     * <p>\r
-     *\r
-     * @return creation time of Subscriber instance\r
-     */\r
-    Date getPublisherCreationTime();\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *     DMaaP MR Publisher can be used to publish messages to DMaaP MR Topics.
+ * <p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public interface DMaaPMRPublisher extends AutoCloseable {
+
+
+    /**
+     * <p>
+     *     Adds collection of messages to DMaaP MR Topic Publishing Queue.
+     * <p>
+     *     Note: Invoking this method may or may not cause publishing immediately
+     *     as publishing in done is batch mode by default. Parameter maxBatchSize
+     *     in {@link DMaaPMRPublisherConfig} is used to determine max batch queue size.
+     *     If the maxBatchSize is reached all message will be published automatically
+     *     during subsequent call.
+     * </p>
+     *
+     * @param messages messages to publish to DMaaP MR Publisher
+     * @return response which may contain Http Response code 202 (Accepted) as publishing
+     * will proceed when max batch size is reached. Throws {@link DCAEAnalyticsRuntimeException}
+     * if publishing fails
+     */
+    DMaaPMRPublisherResponse publish(List<String> messages);
+
+
+    /**
+     * <p>
+     *     Forces publishing of messages to DMaaP MR Topic and returns {@link DMaaPMRPublisherResponse}
+     *     which can be inspected for HTTP status code of publishing call to DMaaP MR Topic.
+     * </p>
+     *
+     * @param messages messages to publish to DMaaP MR Publisher
+     * @return DMaaP Message Router Publisher Response. Throws {@link DCAEAnalyticsRuntimeException}
+     * if force publishing fails
+     *
+     */
+    DMaaPMRPublisherResponse forcePublish(List<String> messages);
+
+
+    /**
+     * <p>
+     *     Forces publishing of messages in Publisher queue to DMaaP MR Topic and returns
+     *     {@link DMaaPMRPublisherResponse}.If there are no messages were in the queue to
+     *     be flushed response code 304 (Not Modified) will be returned
+     * </p>
+     *
+     * @return DMaaP Message Router Publisher Response
+     */
+    DMaaPMRPublisherResponse flush();
+
+
+    /**
+     * <p>
+     *     Returns the creation time when Publisher instance was created.
+     * <p>
+     *
+     * @return creation time of Subscriber instance
+     */
+    Date getPublisherCreationTime();
+
+
+}
@@ -1,49 +1,49 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-\r
-/**\r
- * <p>\r
- *     Factory to initialize instance of {@link DMaaPMRPublisher} for Guice DI injection purposes.\r
- * <p>\r
- *     <strong>\r
- *          NOTE: Client should not use this Factory to initialize {@link DMaaPMRPublisher} unless they\r
- *                are wiring dependencies using Guice. Client must use {@link DMaaPMRFactory} to initialize\r
- *                guice injected Publisher instances\r
- *      </strong>\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-public interface DMaaPMRPublisherFactory {\r
-\r
-    /**\r
-     * Guice Factory to create DMaaP MR Publisher\r
-     *\r
-     * @param publisherConfig publisher config\r
-     *\r
-     * @return DMaaP MR Publisher instance\r
-     */\r
-    DMaaPMRPublisher create(DMaaPMRPublisherConfig publisherConfig);\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+
+/**
+ * <p>
+ *     Factory to initialize instance of {@link DMaaPMRPublisher} for Guice DI injection purposes.
+ * <p>
+ *     <strong>
+ *          NOTE: Client should not use this Factory to initialize {@link DMaaPMRPublisher} unless they
+ *                are wiring dependencies using Guice. Client must use {@link DMaaPMRFactory} to initialize
+ *                guice injected Publisher instances
+ *      </strong>
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+public interface DMaaPMRPublisherFactory {
+
+    /**
+     * Guice Factory to create DMaaP MR Publisher
+     *
+     * @param publisherConfig publisher config
+     *
+     * @return DMaaP MR Publisher instance
+     */
+    DMaaPMRPublisher create(DMaaPMRPublisherConfig publisherConfig);
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import com.google.common.base.Optional;\r
-import com.google.common.collect.Iterables;\r
-import com.google.common.collect.Lists;\r
-import com.google.inject.Inject;\r
-import com.google.inject.assistedinject.Assisted;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.apache.http.HttpHeaders;\r
-import org.apache.http.client.HttpClient;\r
-import org.apache.http.client.methods.HttpPost;\r
-import org.apache.http.entity.ContentType;\r
-import org.apache.http.entity.StringEntity;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.BaseDMaaPMRComponent;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.net.URI;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils.isSuccessfulResponseCode;\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * Concrete Implementation of {@link DMaaPMRPublisher} which uses {@link HttpClient}\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public class DMaaPMRPublisherImpl extends BaseDMaaPMRComponent implements DMaaPMRPublisher {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRPublisherImpl.class);\r
-\r
-    private final DMaaPMRPublisherConfig publisherConfig;\r
-    private final CloseableHttpClient closeableHttpClient;\r
-    private final DMaaPMRPublisherQueue publisherQueue;\r
-    private final Date publisherCreationTime;\r
-    private URI publisherUri;\r
-\r
-    @Inject\r
-    public DMaaPMRPublisherImpl(@Assisted DMaaPMRPublisherConfig publisherConfig,\r
-                                DMaaPMRPublisherQueueFactory dMaaPMRPublisherQueueFactory,\r
-                                CloseableHttpClient closeableHttpClient) {\r
-\r
-        this.publisherConfig = publisherConfig;\r
-        final int maxBatchSize = publisherConfig.getMaxBatchSize() > 0 ? publisherConfig.getMaxBatchSize() : 1;\r
-        this.publisherQueue = dMaaPMRPublisherQueueFactory.create(\r
-                maxBatchSize, publisherConfig.getMaxRecoveryQueueSize());\r
-        this.closeableHttpClient = closeableHttpClient;\r
-        this.publisherUri = createPublisherURI(publisherConfig);\r
-        this.publisherCreationTime = new Date();\r
-    }\r
-\r
-\r
-    @Override\r
-    public DMaaPMRPublisherResponse publish(List<String> messages)  {\r
-\r
-        final int batchQueueRemainingSize = publisherQueue.getBatchQueueRemainingSize();\r
-\r
-        // if messages size is less than batch queue size - just queue them for batch publishing\r
-        if (batchQueueRemainingSize > messages.size()) {\r
-            LOG.debug("Adding messages to batch Queue. No flushing required. Messages Size:{}. Batch Queue Size:{}",\r
-                    messages.size(), batchQueueRemainingSize);\r
-            final int batchQueueSize = publisherQueue.addBatchMessages(messages);\r
-            return createPublisherAcceptedResponse(batchQueueSize);\r
-\r
-        } else {\r
-\r
-            // grab all already queued messages, append current messages and force publish them to DMaaP MR topic\r
-            final List<String> queueMessages = publisherQueue.getMessageForPublishing();\r
-            LOG.debug("Batch Queue capacity exceeds messages size. Flushing of all pending messages to DMaaP MR " +\r
-                    "Publisher Topic.");\r
-            return forcePublish(Lists.newLinkedList(Iterables.concat(queueMessages, messages)));\r
-        }\r
-\r
-    }\r
-\r
-    @Override\r
-    public DMaaPMRPublisherResponse forcePublish(List<String> messages) {\r
-\r
-        LOG.debug("Force publishing messages to DMaaP MR Topic. Messages Size: {}", messages.size());\r
-\r
-        final String contentType = publisherConfig.getContentType();\r
-        final String userName = publisherConfig.getUserName();\r
-        final String userPassword = publisherConfig.getUserPassword();\r
-        final HttpPost postRequest = new HttpPost(publisherUri);\r
-\r
-        // add Authorization Header if username and password are present\r
-        final Optional<String> authHeader = getAuthHeader(userName, userPassword);\r
-        if (authHeader.isPresent()) {\r
-            postRequest.addHeader(HttpHeaders.AUTHORIZATION, authHeader.get());\r
-        } else {\r
-            LOG.debug("DMaaP MR Publisher Authentication is disabled as username or password is not present.");\r
-        }\r
-\r
-        // Create post string entity\r
-        final String messagesJson = convertToJsonString(messages);\r
-        final StringEntity requestEntity =\r
-                new StringEntity(messagesJson, ContentType.create(contentType, "UTF-8"));\r
-        postRequest.setEntity(requestEntity);\r
-\r
-        try {\r
-            final Pair<Integer, String> responsePair = closeableHttpClient.execute(postRequest, responseHandler());\r
-            final Integer responseCode = responsePair.getLeft();\r
-            final String responseBody = responsePair.getRight();\r
-            // if messages were published successfully, return successful response\r
-            if (isSuccessfulResponseCode(responseCode)) {\r
-                LOG.debug("DMaaP MR Messages published successfully. DMaaP Response Code: {}. DMaaP Response " +\r
-                                "Body: {}, Number of Messages published: {}",\r
-                        responseCode, responseBody, messages.size());\r
-\r
-            } else {\r
-                LOG.warn("Unable to publish messages to DMaaP MR Topic. DMaaP Response Code: {}, DMaaP Response " +\r
-                        "Body: {}. Messages will be queued in recovery queue", responseCode, responseBody);\r
-                addMessagesToRecoveryQueue(publisherQueue, messages);\r
-            }\r
-\r
-            return createPublisherResponse(responseCode, responseBody,\r
-                    getPendingMessages(publisherQueue, publisherConfig));\r
-\r
-        } catch (IOException e) {\r
-            // If IO Error then we need to also put messages in recovery queue\r
-            addMessagesToRecoveryQueue(publisherQueue, messages);\r
-            final String errorMessage = format("IO Exception while publishing messages to DMaaP Topic. " +\r
-                    "Messages will be queued in recovery queue. Messages Size: %d", messages.size());\r
-\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-    }\r
-\r
-\r
-    @Override\r
-    public DMaaPMRPublisherResponse flush() {\r
-        final List<String> queueMessages = publisherQueue.getMessageForPublishing();\r
-        // If there are no message return 204 (No Content) response code\r
-        if (queueMessages.isEmpty()) {\r
-            LOG.debug("No messages to publish to batch queue. Returning 204 status code");\r
-            return createPublisherNoContentResponse();\r
-        } else {\r
-            // force publish messages in queue\r
-            return forcePublish(queueMessages);\r
-        }\r
-    }\r
-\r
-    @Override\r
-    public Date getPublisherCreationTime() {\r
-        return new Date(publisherCreationTime.getTime());\r
-    }\r
-\r
-    @Override\r
-    public void close() throws Exception {\r
-\r
-        // flush current message in the queue\r
-        int retrialNumber = 0;\r
-        int flushResponseCode;\r
-\r
-        // automatic retries if messages cannot be flushed\r
-        do {\r
-            retrialNumber++;\r
-            DMaaPMRPublisherResponse flushResponse = flush();\r
-            flushResponseCode = flushResponse.getResponseCode();\r
-\r
-            if (!isSuccessfulResponseCode(flushResponseCode)) {\r
-                LOG.warn("Unable to flush batch messages to publisher due to DMaaP MR invalid Response: {}. " +\r
-                                "Retrial No: {} of Max {} Retries", flushResponseCode, retrialNumber,\r
-                        AnalyticsConstants.PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE);\r
-\r
-                Thread.sleep(AnalyticsConstants.PUBLISHER_DELAY_MS_ON_RETRIES_ON_CLOSE);\r
-            }\r
-        } while (retrialNumber <= AnalyticsConstants.PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE &&\r
-                !isSuccessfulResponseCode(flushResponseCode));\r
-\r
-        if (!isSuccessfulResponseCode(flushResponseCode)) {\r
-            LOG.error("Unable to flush batch messages to publisher. Messages loss cannot be prevented");\r
-        } else {\r
-            LOG.info("Successfully published all batched messages to publisher.");\r
-        }\r
-\r
-        // close http client\r
-        closeableHttpClient.close();\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+import com.google.inject.assistedinject.Assisted;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.http.HttpHeaders;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.BaseDMaaPMRComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Date;
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.common.utils.HTTPUtils.isSuccessfulResponseCode;
+import static java.lang.String.format;
+
+/**
+ * Concrete Implementation of {@link DMaaPMRPublisher} which uses {@link HttpClient}
+ *
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public class DMaaPMRPublisherImpl extends BaseDMaaPMRComponent implements DMaaPMRPublisher {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRPublisherImpl.class);
+
+    private final DMaaPMRPublisherConfig publisherConfig;
+    private final CloseableHttpClient closeableHttpClient;
+    private final DMaaPMRPublisherQueue publisherQueue;
+    private final Date publisherCreationTime;
+    private URI publisherUri;
+
+    @Inject
+    public DMaaPMRPublisherImpl(@Assisted DMaaPMRPublisherConfig publisherConfig,
+                                DMaaPMRPublisherQueueFactory dMaaPMRPublisherQueueFactory,
+                                CloseableHttpClient closeableHttpClient) {
+
+        this.publisherConfig = publisherConfig;
+        final int maxBatchSize = publisherConfig.getMaxBatchSize() > 0 ? publisherConfig.getMaxBatchSize() : 1;
+        this.publisherQueue = dMaaPMRPublisherQueueFactory.create(
+                maxBatchSize, publisherConfig.getMaxRecoveryQueueSize());
+        this.closeableHttpClient = closeableHttpClient;
+        this.publisherUri = createPublisherURI(publisherConfig);
+        this.publisherCreationTime = new Date();
+    }
+
+
+    @Override
+    public DMaaPMRPublisherResponse publish(List<String> messages)  {
+
+        final int batchQueueRemainingSize = publisherQueue.getBatchQueueRemainingSize();
+
+        // if messages size is less than batch queue size - just queue them for batch publishing
+        if (batchQueueRemainingSize > messages.size()) {
+            LOG.debug("Adding messages to batch Queue. No flushing required. Messages Size:{}. Batch Queue Size:{}",
+                    messages.size(), batchQueueRemainingSize);
+            final int batchQueueSize = publisherQueue.addBatchMessages(messages);
+            return createPublisherAcceptedResponse(batchQueueSize);
+
+        } else {
+
+            // grab all already queued messages, append current messages and force publish them to DMaaP MR topic
+            final List<String> queueMessages = publisherQueue.getMessageForPublishing();
+            LOG.debug("Batch Queue capacity exceeds messages size. Flushing of all pending messages to DMaaP MR " +
+                    "Publisher Topic.");
+            return forcePublish(Lists.newLinkedList(Iterables.concat(queueMessages, messages)));
+        }
+
+    }
+
+    @Override
+    public DMaaPMRPublisherResponse forcePublish(List<String> messages) {
+
+        LOG.debug("Force publishing messages to DMaaP MR Topic. Messages Size: {}", messages.size());
+
+        final String contentType = publisherConfig.getContentType();
+        final String userName = publisherConfig.getUserName();
+        final String userPassword = publisherConfig.getUserPassword();
+        final HttpPost postRequest = new HttpPost(publisherUri);
+
+        // add Authorization Header if username and password are present
+        final Optional<String> authHeader = getAuthHeader(userName, userPassword);
+        if (authHeader.isPresent()) {
+            postRequest.addHeader(HttpHeaders.AUTHORIZATION, authHeader.get());
+        } else {
+            LOG.debug("DMaaP MR Publisher Authentication is disabled as username or password is not present.");
+        }
+
+        // Create post string entity
+        final String messagesJson = convertToJsonString(messages);
+        final StringEntity requestEntity =
+                new StringEntity(messagesJson, ContentType.create(contentType, "UTF-8"));
+        postRequest.setEntity(requestEntity);
+
+        try {
+            final Pair<Integer, String> responsePair = closeableHttpClient.execute(postRequest, responseHandler());
+            final Integer responseCode = responsePair.getLeft();
+            final String responseBody = responsePair.getRight();
+            // if messages were published successfully, return successful response
+            if (isSuccessfulResponseCode(responseCode)) {
+                LOG.debug("DMaaP MR Messages published successfully. DMaaP Response Code: {}. DMaaP Response " +
+                                "Body: {}, Number of Messages published: {}",
+                        responseCode, responseBody, messages.size());
+
+            } else {
+                LOG.warn("Unable to publish messages to DMaaP MR Topic. DMaaP Response Code: {}, DMaaP Response " +
+                        "Body: {}. Messages will be queued in recovery queue", responseCode, responseBody);
+                addMessagesToRecoveryQueue(publisherQueue, messages);
+            }
+
+            return createPublisherResponse(responseCode, responseBody,
+                    getPendingMessages(publisherQueue, publisherConfig));
+
+        } catch (IOException e) {
+            // If IO Error then we need to also put messages in recovery queue
+            addMessagesToRecoveryQueue(publisherQueue, messages);
+            final String errorMessage = format("IO Exception while publishing messages to DMaaP Topic. " +
+                    "Messages will be queued in recovery queue. Messages Size: %d", messages.size());
+
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+    }
+
+
+    @Override
+    public DMaaPMRPublisherResponse flush() {
+        final List<String> queueMessages = publisherQueue.getMessageForPublishing();
+        // If there are no message return 204 (No Content) response code
+        if (queueMessages.isEmpty()) {
+            LOG.debug("No messages to publish to batch queue. Returning 204 status code");
+            return createPublisherNoContentResponse();
+        } else {
+            // force publish messages in queue
+            return forcePublish(queueMessages);
+        }
+    }
+
+    @Override
+    public Date getPublisherCreationTime() {
+        return new Date(publisherCreationTime.getTime());
+    }
+
+    @Override
+    public void close() throws Exception {
+
+        // flush current message in the queue
+        int retrialNumber = 0;
+        int flushResponseCode;
+
+        // automatic retries if messages cannot be flushed
+        do {
+            retrialNumber++;
+            DMaaPMRPublisherResponse flushResponse = flush();
+            flushResponseCode = flushResponse.getResponseCode();
+
+            if (!isSuccessfulResponseCode(flushResponseCode)) {
+                LOG.warn("Unable to flush batch messages to publisher due to DMaaP MR invalid Response: {}. " +
+                                "Retrial No: {} of Max {} Retries", flushResponseCode, retrialNumber,
+                        AnalyticsConstants.PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE);
+
+                Thread.sleep(AnalyticsConstants.PUBLISHER_DELAY_MS_ON_RETRIES_ON_CLOSE);
+            }
+        } while (retrialNumber <= AnalyticsConstants.PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE &&
+                !isSuccessfulResponseCode(flushResponseCode));
+
+        if (!isSuccessfulResponseCode(flushResponseCode)) {
+            LOG.error("Unable to flush batch messages to publisher. Messages loss cannot be prevented");
+        } else {
+            LOG.info("Successfully published all batched messages to publisher.");
+        }
+
+        // close http client
+        closeableHttpClient.close();
+
+    }
+}
@@ -1,87 +1,87 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * <p>\r
- *     DMaaP MR Publisher Queue handles back pressure in case DMaaP MR Publisher topic\r
- *     is offline for some reason. It does so by having a recovery queue which keeps\r
- *     messages in order in case there is temporary interruption in DMaaP Publisher\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/1/2016.\r
- */\r
-public interface DMaaPMRPublisherQueue {\r
-\r
-    /**\r
-     * <p>\r
-     *     Add batchMessages to Batch Queue\r
-     * </p>\r
-     *\r
-     * @param batchMessages messages that needs to be added to batch queue\r
-     * @return current size of batch queue. Throws {@link IllegalStateException}\r
-     * if batch queue does not have enough space\r
-     */\r
-    int addBatchMessages(List<String> batchMessages);\r
-\r
-\r
-    /**\r
-     * <p>\r
-     *     Add recoverable messages to Recoverable Queue\r
-     * </p>\r
-     *\r
-     * @param recoverableMessages messages that needs to be added to recoverable queue\r
-     * @return current size of the recoverable queue. Throws {@link IllegalStateException}\r
-     * if recoverable queue does not have enough space\r
-     */\r
-    int addRecoverableMessages(List<String> recoverableMessages);\r
-\r
-    /**\r
-     * <p>\r
-     *     Get messages that need to be published to DMaaP topic. Messages in recoverable\r
-     *     queue are appended if present.\r
-     * </p>\r
-     *\r
-     * @return List of messages from both batch and recovery queue\r
-     */\r
-    List<String> getMessageForPublishing();\r
-\r
-    /**\r
-     * <p>\r
-     *     Remaining capacity of Batch Queue\r
-     * </p>\r
-     *\r
-     * @return Remaining Batch Queue Size\r
-     */\r
-    int getBatchQueueRemainingSize();\r
-\r
-    /**\r
-     * <p>\r
-     *     Remaining capacity of Recovery Queue\r
-     * </p>\r
-     *\r
-     * @return Remaining Recovery Queue Size\r
-     */\r
-    int getRecoveryQueueRemainingSize();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import java.util.List;
+
+/**
+ * <p>
+ *     DMaaP MR Publisher Queue handles back pressure in case DMaaP MR Publisher topic
+ *     is offline for some reason. It does so by having a recovery queue which keeps
+ *     messages in order in case there is temporary interruption in DMaaP Publisher
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/1/2016.
+ */
+public interface DMaaPMRPublisherQueue {
+
+    /**
+     * <p>
+     *     Add batchMessages to Batch Queue
+     * </p>
+     *
+     * @param batchMessages messages that needs to be added to batch queue
+     * @return current size of batch queue. Throws {@link IllegalStateException}
+     * if batch queue does not have enough space
+     */
+    int addBatchMessages(List<String> batchMessages);
+
+
+    /**
+     * <p>
+     *     Add recoverable messages to Recoverable Queue
+     * </p>
+     *
+     * @param recoverableMessages messages that needs to be added to recoverable queue
+     * @return current size of the recoverable queue. Throws {@link IllegalStateException}
+     * if recoverable queue does not have enough space
+     */
+    int addRecoverableMessages(List<String> recoverableMessages);
+
+    /**
+     * <p>
+     *     Get messages that need to be published to DMaaP topic. Messages in recoverable
+     *     queue are appended if present.
+     * </p>
+     *
+     * @return List of messages from both batch and recovery queue
+     */
+    List<String> getMessageForPublishing();
+
+    /**
+     * <p>
+     *     Remaining capacity of Batch Queue
+     * </p>
+     *
+     * @return Remaining Batch Queue Size
+     */
+    int getBatchQueueRemainingSize();
+
+    /**
+     * <p>
+     *     Remaining capacity of Recovery Queue
+     * </p>
+     *
+     * @return Remaining Recovery Queue Size
+     */
+    int getRecoveryQueueRemainingSize();
+
+}
@@ -1,45 +1,45 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import com.google.inject.assistedinject.Assisted;\r
-\r
-/**\r
- * <p>\r
- *     Factory to initialize instance of {@link DMaaPMRPublisherQueue} for Guice DI injection purposes.\r
- * <p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/1/2016.\r
- */\r
-public interface DMaaPMRPublisherQueueFactory {\r
-\r
-    /**\r
-     * Guice Factory to create DMaaP MR Publisher Queue\r
-     *\r
-     * @param batchQueueSize batch queue size\r
-     * @param recoveryQueueSize recovery queue size\r
-     *\r
-     * @return instance of DMaaP MR Publisher Queue\r
-     */\r
-    DMaaPMRPublisherQueue create(@Assisted("batchQueueSize") int batchQueueSize,\r
-                                 @Assisted("recoveryQueueSize") int recoveryQueueSize);\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import com.google.inject.assistedinject.Assisted;
+
+/**
+ * <p>
+ *     Factory to initialize instance of {@link DMaaPMRPublisherQueue} for Guice DI injection purposes.
+ * <p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/1/2016.
+ */
+public interface DMaaPMRPublisherQueueFactory {
+
+    /**
+     * Guice Factory to create DMaaP MR Publisher Queue
+     *
+     * @param batchQueueSize batch queue size
+     * @param recoveryQueueSize recovery queue size
+     *
+     * @return instance of DMaaP MR Publisher Queue
+     */
+    DMaaPMRPublisherQueue create(@Assisted("batchQueueSize") int batchQueueSize,
+                                 @Assisted("recoveryQueueSize") int recoveryQueueSize);
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import com.google.inject.Inject;\r
-import com.google.inject.assistedinject.Assisted;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.concurrent.LinkedBlockingDeque;\r
-\r
-import static com.google.common.collect.Iterables.concat;\r
-import static com.google.common.collect.Lists.newLinkedList;\r
-import static java.util.Collections.unmodifiableList;\r
-\r
-/**\r
- * <p>\r
- *     An implementation of {@link DMaaPMRPublisherQueue} which uses {@link java.util.concurrent.BlockingDeque}\r
- *     for batch and recovery queues\r
- * </p>\r
- *\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/1/2016.\r
- */\r
-public class DMaaPMRPublisherQueueImpl implements DMaaPMRPublisherQueue {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRPublisherQueueImpl.class);\r
-\r
-    private final LinkedBlockingDeque<String> batchQueue;\r
-    private final LinkedBlockingDeque<String> recoveryQueue;\r
-\r
-    @Inject\r
-    public DMaaPMRPublisherQueueImpl(@Assisted("batchQueueSize") int batchQueueSize,\r
-                                     @Assisted("recoveryQueueSize") int recoveryQueueSize) {\r
-        batchQueue = new LinkedBlockingDeque<>(batchQueueSize);\r
-        recoveryQueue = new LinkedBlockingDeque<>(recoveryQueueSize);\r
-        LOG.debug("Creating Instance of DMaaP Publisher Queue. BatchQueueSize: {}, RecoveryQueueSize: {}",\r
-                batchQueueSize, recoveryQueueSize);\r
-    }\r
-\r
-    @Override\r
-    public synchronized int addBatchMessages(List<String> batchMessages) {\r
-\r
-        // checks if batchMessages size does not exceed batch queue capacity\r
-        if (batchMessages.size() > batchQueue.remainingCapacity()) {\r
-            throw new IllegalStateException("Not enough capacity to add batchMessages  in batch queue");\r
-        }\r
-\r
-        // Add batchMessages to batch queue\r
-        for (String message : batchMessages) {\r
-            batchQueue.add(message);\r
-        }\r
-\r
-        // returns current elements size in batch queue\r
-        return batchQueue.size();\r
-    }\r
-\r
-    @Override\r
-    public synchronized int addRecoverableMessages(List<String> recoverableMessages) {\r
-\r
-        // checks if messages size does not exceed recovery queue size\r
-        if (recoverableMessages.size() > recoveryQueue.remainingCapacity()) {\r
-            throw new IllegalStateException("Not enough capacity to add messages in recovery queue");\r
-        }\r
-\r
-        // add messages to recovery queue\r
-        for (String recoverableMessage : recoverableMessages) {\r
-            recoveryQueue.add(recoverableMessage);\r
-        }\r
-\r
-        // returns current size of recovery queue\r
-        return recoveryQueue.size();\r
-    }\r
-\r
-    @Override\r
-    public synchronized List<String> getMessageForPublishing() {\r
-\r
-        final List<String> recoveryMessageList = new LinkedList<>();\r
-        final List<String> batchMessagesList = new LinkedList<>();\r
-\r
-        // get messages from recovery queue if present\r
-        if (!recoveryQueue.isEmpty()) {\r
-            final int recoveryQueueSize = recoveryQueue.drainTo(recoveryMessageList);\r
-            LOG.debug("Drained Recovery Queue elements for flushing: {}", recoveryQueueSize);\r
-        }\r
-\r
-        // get messages from batch queue if present\r
-        if (!batchQueue.isEmpty()) {\r
-            final int batchQueueSize = batchQueue.drainTo(batchMessagesList);\r
-            LOG.debug("Drained Batch Queue elements for flushing: {}", batchQueueSize);\r
-        }\r
-\r
-        // concat recovery and batch queue elements\r
-        return unmodifiableList(newLinkedList(concat(recoveryMessageList, batchMessagesList)));\r
-    }\r
-\r
-    @Override\r
-    public synchronized int getBatchQueueRemainingSize() {\r
-        return batchQueue.remainingCapacity();\r
-    }\r
-\r
-    @Override\r
-    public synchronized int getRecoveryQueueRemainingSize() {\r
-        return recoveryQueue.remainingCapacity();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import com.google.inject.Inject;
+import com.google.inject.assistedinject.Assisted;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.LinkedBlockingDeque;
+
+import static com.google.common.collect.Iterables.concat;
+import static com.google.common.collect.Lists.newLinkedList;
+import static java.util.Collections.unmodifiableList;
+
+/**
+ * <p>
+ *     An implementation of {@link DMaaPMRPublisherQueue} which uses {@link java.util.concurrent.BlockingDeque}
+ *     for batch and recovery queues
+ * </p>
+ *
+ *
+ * @author Rajiv Singla . Creation Date: 11/1/2016.
+ */
+public class DMaaPMRPublisherQueueImpl implements DMaaPMRPublisherQueue {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRPublisherQueueImpl.class);
+
+    private final LinkedBlockingDeque<String> batchQueue;
+    private final LinkedBlockingDeque<String> recoveryQueue;
+
+    @Inject
+    public DMaaPMRPublisherQueueImpl(@Assisted("batchQueueSize") int batchQueueSize,
+                                     @Assisted("recoveryQueueSize") int recoveryQueueSize) {
+        batchQueue = new LinkedBlockingDeque<>(batchQueueSize);
+        recoveryQueue = new LinkedBlockingDeque<>(recoveryQueueSize);
+        LOG.debug("Creating Instance of DMaaP Publisher Queue. BatchQueueSize: {}, RecoveryQueueSize: {}",
+                batchQueueSize, recoveryQueueSize);
+    }
+
+    @Override
+    public synchronized int addBatchMessages(List<String> batchMessages) {
+
+        // checks if batchMessages size does not exceed batch queue capacity
+        if (batchMessages.size() > batchQueue.remainingCapacity()) {
+            throw new IllegalStateException("Not enough capacity to add batchMessages  in batch queue");
+        }
+
+        // Add batchMessages to batch queue
+        for (String message : batchMessages) {
+            batchQueue.add(message);
+        }
+
+        // returns current elements size in batch queue
+        return batchQueue.size();
+    }
+
+    @Override
+    public synchronized int addRecoverableMessages(List<String> recoverableMessages) {
+
+        // checks if messages size does not exceed recovery queue size
+        if (recoverableMessages.size() > recoveryQueue.remainingCapacity()) {
+            throw new IllegalStateException("Not enough capacity to add messages in recovery queue");
+        }
+
+        // add messages to recovery queue
+        for (String recoverableMessage : recoverableMessages) {
+            recoveryQueue.add(recoverableMessage);
+        }
+
+        // returns current size of recovery queue
+        return recoveryQueue.size();
+    }
+
+    @Override
+    public synchronized List<String> getMessageForPublishing() {
+
+        final List<String> recoveryMessageList = new LinkedList<>();
+        final List<String> batchMessagesList = new LinkedList<>();
+
+        // get messages from recovery queue if present
+        if (!recoveryQueue.isEmpty()) {
+            final int recoveryQueueSize = recoveryQueue.drainTo(recoveryMessageList);
+            LOG.debug("Drained Recovery Queue elements for flushing: {}", recoveryQueueSize);
+        }
+
+        // get messages from batch queue if present
+        if (!batchQueue.isEmpty()) {
+            final int batchQueueSize = batchQueue.drainTo(batchMessagesList);
+            LOG.debug("Drained Batch Queue elements for flushing: {}", batchQueueSize);
+        }
+
+        // concat recovery and batch queue elements
+        return unmodifiableList(newLinkedList(concat(recoveryMessageList, batchMessagesList)));
+    }
+
+    @Override
+    public synchronized int getBatchQueueRemainingSize() {
+        return batchQueue.remainingCapacity();
+    }
+
+    @Override
+    public synchronized int getRecoveryQueueRemainingSize() {
+        return recoveryQueue.remainingCapacity();
+    }
+}
@@ -1,57 +1,57 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.subscriber;\r
-\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-\r
-import java.util.Date;\r
-\r
-/**\r
- * <p>\r
- *     DMaaP MR Subscriber can be used to subscribe messages from DMaaP MR Topics.\r
- * <p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public interface DMaaPMRSubscriber extends AutoCloseable {\r
-\r
-    /**\r
-     * Fetches Messages from DMaaP MR Topic. {@link DMaaPMRPublisherConfig} settings parameters\r
-     * for messageLimit and message timeout are used\r
-     *\r
-     * @return DMaaP Message Router Subscriber Response\r
-     */\r
-    DMaaPMRSubscriberResponse fetchMessages();\r
-\r
-\r
-    /**\r
-     * Returns the Subscriber instance creation time\r
-     * <p>\r
-     * NOTE: Due to DMaaP API Design - Subscribers can only fetch messages which\r
-     * are published to the topic after the creation of the Subscriber.\r
-     *\r
-     * @return creation time of Subscriber instance\r
-     */\r
-    Date getSubscriberCreationTime();\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.subscriber;
+
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+
+import java.util.Date;
+
+/**
+ * <p>
+ *     DMaaP MR Subscriber can be used to subscribe messages from DMaaP MR Topics.
+ * <p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public interface DMaaPMRSubscriber extends AutoCloseable {
+
+    /**
+     * Fetches Messages from DMaaP MR Topic. {@link DMaaPMRPublisherConfig} settings parameters
+     * for messageLimit and message timeout are used
+     *
+     * @return DMaaP Message Router Subscriber Response
+     */
+    DMaaPMRSubscriberResponse fetchMessages();
+
+
+    /**
+     * Returns the Subscriber instance creation time
+     * <p>
+     * NOTE: Due to DMaaP API Design - Subscribers can only fetch messages which
+     * are published to the topic after the creation of the Subscriber.
+     *
+     * @return creation time of Subscriber instance
+     */
+    Date getSubscriberCreationTime();
+
+
+}
@@ -1,47 +1,47 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.subscriber;\r
-\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-\r
-/**\r
- * Factory to initialize instance of {@link DMaaPMRSubscriber} for Guice DI injection purposes.\r
- * <p>\r
- *     <strong>\r
- *          NOTE: Client should not use this Factory to initialize {@link DMaaPMRSubscriber} unless they\r
- *              are wiring dependencies using Guice. Client must use {@link DMaaPMRFactory} to initialize\r
- *              guice injected Subscriber instances\r
- *      </strong>\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-public interface DMaaPMRSubscriberFactory {\r
-\r
-    /**\r
-     * Guice Factory to create DMaaP MR Subscriber Instance\r
-     *\r
-     * @param subscriberConfig subscriber config\r
-     *\r
-     * @return DMaaP MR Subscriber instance\r
-     */\r
-    DMaaPMRSubscriber create(DMaaPMRSubscriberConfig subscriberConfig);\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.subscriber;
+
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+
+/**
+ * Factory to initialize instance of {@link DMaaPMRSubscriber} for Guice DI injection purposes.
+ * <p>
+ *     <strong>
+ *          NOTE: Client should not use this Factory to initialize {@link DMaaPMRSubscriber} unless they
+ *              are wiring dependencies using Guice. Client must use {@link DMaaPMRFactory} to initialize
+ *              guice injected Subscriber instances
+ *      </strong>
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+public interface DMaaPMRSubscriberFactory {
+
+    /**
+     * Guice Factory to create DMaaP MR Subscriber Instance
+     *
+     * @param subscriberConfig subscriber config
+     *
+     * @return DMaaP MR Subscriber instance
+     */
+    DMaaPMRSubscriber create(DMaaPMRSubscriberConfig subscriberConfig);
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.subscriber;\r
-\r
-import com.google.common.base.Optional;\r
-import com.google.inject.Inject;\r
-import com.google.inject.assistedinject.Assisted;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.apache.http.HttpHeaders;\r
-import org.apache.http.client.HttpClient;\r
-import org.apache.http.client.methods.HttpGet;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.BaseDMaaPMRComponent;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.net.URI;\r
-import java.util.Date;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils.isSuccessfulResponseCode;\r
-import static java.lang.String.format;\r
-\r
-/**\r
- * Concrete Implementation of {@link DMaaPMRSubscriber} which uses {@link HttpClient}\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public class DMaaPMRSubscriberImpl extends BaseDMaaPMRComponent implements DMaaPMRSubscriber {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRSubscriberImpl.class);\r
-\r
-    private final DMaaPMRSubscriberConfig subscriberConfig;\r
-    private final CloseableHttpClient closeableHttpClient;\r
-    private final URI subscriberUri;\r
-    private final Date subscriberCreationTime;\r
-\r
-    @Inject\r
-    public DMaaPMRSubscriberImpl(@Assisted DMaaPMRSubscriberConfig subscriberConfig,\r
-                                 CloseableHttpClient closeableHttpClient) {\r
-        this.subscriberConfig = subscriberConfig;\r
-        this.closeableHttpClient = closeableHttpClient;\r
-        this.subscriberUri = createSubscriberURI(subscriberConfig);\r
-        this.subscriberCreationTime = new Date();\r
-    }\r
-\r
-    @Override\r
-    public DMaaPMRSubscriberResponse fetchMessages() {\r
-\r
-        final String userName = subscriberConfig.getUserName();\r
-        final String userPassword = subscriberConfig.getUserPassword();\r
-\r
-        final HttpGet getRequest = new HttpGet(subscriberUri);\r
-\r
-        // add Authorization Header if username and password are present\r
-        final Optional<String> authHeader = getAuthHeader(userName, userPassword);\r
-        if (authHeader.isPresent()) {\r
-            getRequest.addHeader(HttpHeaders.AUTHORIZATION, authHeader.get());\r
-        } else {\r
-            LOG.debug("DMaaP MR Subscriber Authentication is disabled as username or password is not present.");\r
-        }\r
-\r
-        try {\r
-\r
-            final Pair<Integer, String> responsePair = closeableHttpClient.execute(getRequest, responseHandler());\r
-            final Integer responseCode = responsePair.getLeft();\r
-            final String responseBody = responsePair.getRight();\r
-\r
-            List<String> fetchedMessages = new LinkedList<>();\r
-            String responseMessage = responseBody;\r
-\r
-            // if messages were published successfully, return successful response\r
-            if (isSuccessfulResponseCode(responseCode)) {\r
-                if (responseBody != null) {\r
-                    fetchedMessages = convertJsonToStringMessages(responseBody);\r
-                    responseMessage = "Messages Fetched Successfully";\r
-                } else {\r
-                    responseMessage = "DMaaP Response Body had no messages";\r
-                }\r
-            } else {\r
-                LOG.error("Unable to fetch messages to DMaaP MR Topic. DMaaP MR unsuccessful Response Code: {}, " +\r
-                        "DMaaP Response Body: {}", responseCode, responseBody);\r
-            }\r
-\r
-            return createSubscriberResponse(responseCode, responseMessage, fetchedMessages);\r
-\r
-        } catch (IOException e) {\r
-\r
-            final String errorMessage =\r
-                    format("IO Exception while fetching messages from DMaaP Topic. Exception %s", e);\r
-            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-        }\r
-\r
-\r
-    }\r
-\r
-    @Override\r
-    public Date getSubscriberCreationTime() {\r
-        return new Date(subscriberCreationTime.getTime());\r
-    }\r
-\r
-    @Override\r
-    public void close() throws Exception {\r
-        closeableHttpClient.close();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.subscriber;
+
+import com.google.common.base.Optional;
+import com.google.inject.Inject;
+import com.google.inject.assistedinject.Assisted;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.http.HttpHeaders;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.BaseDMaaPMRComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.common.utils.HTTPUtils.isSuccessfulResponseCode;
+import static java.lang.String.format;
+
+/**
+ * Concrete Implementation of {@link DMaaPMRSubscriber} which uses {@link HttpClient}
+ *
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public class DMaaPMRSubscriberImpl extends BaseDMaaPMRComponent implements DMaaPMRSubscriber {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DMaaPMRSubscriberImpl.class);
+
+    private final DMaaPMRSubscriberConfig subscriberConfig;
+    private final CloseableHttpClient closeableHttpClient;
+    private final URI subscriberUri;
+    private final Date subscriberCreationTime;
+
+    @Inject
+    public DMaaPMRSubscriberImpl(@Assisted DMaaPMRSubscriberConfig subscriberConfig,
+                                 CloseableHttpClient closeableHttpClient) {
+        this.subscriberConfig = subscriberConfig;
+        this.closeableHttpClient = closeableHttpClient;
+        this.subscriberUri = createSubscriberURI(subscriberConfig);
+        this.subscriberCreationTime = new Date();
+    }
+
+    @Override
+    public DMaaPMRSubscriberResponse fetchMessages() {
+
+        final String userName = subscriberConfig.getUserName();
+        final String userPassword = subscriberConfig.getUserPassword();
+
+        final HttpGet getRequest = new HttpGet(subscriberUri);
+
+        // add Authorization Header if username and password are present
+        final Optional<String> authHeader = getAuthHeader(userName, userPassword);
+        if (authHeader.isPresent()) {
+            getRequest.addHeader(HttpHeaders.AUTHORIZATION, authHeader.get());
+        } else {
+            LOG.debug("DMaaP MR Subscriber Authentication is disabled as username or password is not present.");
+        }
+
+        try {
+
+            final Pair<Integer, String> responsePair = closeableHttpClient.execute(getRequest, responseHandler());
+            final Integer responseCode = responsePair.getLeft();
+            final String responseBody = responsePair.getRight();
+
+            List<String> fetchedMessages = new LinkedList<>();
+            String responseMessage = responseBody;
+
+            // if messages were published successfully, return successful response
+            if (isSuccessfulResponseCode(responseCode)) {
+                if (responseBody != null) {
+                    fetchedMessages = convertJsonToStringMessages(responseBody);
+                    responseMessage = "Messages Fetched Successfully";
+                } else {
+                    responseMessage = "DMaaP Response Body had no messages";
+                }
+            } else {
+                LOG.error("Unable to fetch messages to DMaaP MR Topic. DMaaP MR unsuccessful Response Code: {}, " +
+                        "DMaaP Response Body: {}", responseCode, responseBody);
+            }
+
+            return createSubscriberResponse(responseCode, responseMessage, fetchedMessages);
+
+        } catch (IOException e) {
+
+            final String errorMessage =
+                    format("IO Exception while fetching messages from DMaaP Topic. Exception %s", e);
+            throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+        }
+
+
+    }
+
+    @Override
+    public Date getSubscriberCreationTime() {
+        return new Date(subscriberCreationTime.getTime());
+    }
+
+    @Override
+    public void close() throws Exception {
+        closeableHttpClient.close();
+    }
+}
@@ -1,31 +1,31 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap;\r
-\r
-import org.junit.runner.RunWith;\r
-import org.openecomp.dcae.apod.analytics.test.runner.GuiceJUnitRunner;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-@RunWith(GuiceJUnitRunner.class)\r
-public abstract class BaseAnalyticsDMaaPGuiceUnitTest extends BaseAnalyticsDMaaPUnitTest {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap;
+
+import org.junit.runner.RunWith;
+import org.onap.dcae.apod.analytics.test.runner.GuiceJUnitRunner;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+@RunWith(GuiceJUnitRunner.class)
+public abstract class BaseAnalyticsDMaaPGuiceUnitTest extends BaseAnalyticsDMaaPUnitTest {
+}
@@ -1,99 +1,99 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap;\r
-\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-import java.util.List;\r
-\r
-import static com.google.common.collect.ImmutableList.of;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/14/2016.\r
- */\r
-public abstract class BaseAnalyticsDMaaPUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-    // Unit Test Settings\r
-    protected static final String HOST_NAME = "testHostName";\r
-    protected static final Integer PORT_NUMBER = 8080;\r
-    protected static final String TOPIC_NAME = "testTopicName";\r
-    protected static final String USERNAME = "testUserName";\r
-    protected static final String PASSWORD = "testPassword";\r
-    protected static final String HTTP_PROTOCOL = "https";\r
-    protected static final String CONTENT_TYPE = "application/json";\r
-\r
-    protected static final int PUBLISHER_MAX_BATCH_QUEUE_SIZE = 200;\r
-    protected static final int PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 2000;\r
-\r
-    protected static final String SUBSCRIBER_CONSUMER_ID = "123";\r
-    protected static final String SUBSCRIBER_CONSUMER_GROUP_NAME = "testGonsumerName-" + SUBSCRIBER_CONSUMER_ID;\r
-    protected static final int SUBSCRIBER_TIMEOUT_MS = 2000;\r
-    protected static final int SUBSCRIBER_MESSAGE_LIMIT = 20;\r
-\r
-    /**\r
-     * Creates Sample Publisher settings for unit testing purposes\r
-     *\r
-     * @return sample publisher settings for testing\r
-     */\r
-    protected static DMaaPMRPublisherConfig getPublisherConfig() {\r
-        return new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setUserName(USERNAME)\r
-                .setUserPassword(PASSWORD)\r
-                .setContentType(CONTENT_TYPE)\r
-                .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)\r
-                .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE).build();\r
-    }\r
-\r
-    /**\r
-     * Creates Sample Subscriber settings for unit testing purposes\r
-     *\r
-     * @return sample subscriber settings for testing\r
-     */\r
-    protected static DMaaPMRSubscriberConfig getSubscriberConfig(String consumerId, String consumerGroup) {\r
-        return new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setUserName(USERNAME)\r
-                .setUserPassword(PASSWORD)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setContentType(CONTENT_TYPE)\r
-                .setConsumerGroup(consumerGroup != null ? consumerGroup : SUBSCRIBER_CONSUMER_GROUP_NAME)\r
-                .setConsumerId(consumerId != null ? consumerId : SUBSCRIBER_CONSUMER_ID)\r
-                .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)\r
-                .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT).build();\r
-    }\r
-\r
-    /**\r
-     * Creates two sample message for publishing\r
-     *\r
-     * @return sample publish message list\r
-     */\r
-    protected static List<String> getTwoSampleMessages() {\r
-        String message1 = "{ \"message\" : \"Test Message1\"}";\r
-        String message2 = "{ \"message\" : \"Test Message2\"}";\r
-        return of(message1, message2);\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap;
+
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+import java.util.List;
+
+import static com.google.common.collect.ImmutableList.of;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/14/2016.
+ */
+public abstract class BaseAnalyticsDMaaPUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+    // Unit Test Settings
+    protected static final String HOST_NAME = "testHostName";
+    protected static final Integer PORT_NUMBER = 8080;
+    protected static final String TOPIC_NAME = "testTopicName";
+    protected static final String USERNAME = "testUserName";
+    protected static final String PASSWORD = "testPassword";
+    protected static final String HTTP_PROTOCOL = "https";
+    protected static final String CONTENT_TYPE = "application/json";
+
+    protected static final int PUBLISHER_MAX_BATCH_QUEUE_SIZE = 200;
+    protected static final int PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 2000;
+
+    protected static final String SUBSCRIBER_CONSUMER_ID = "123";
+    protected static final String SUBSCRIBER_CONSUMER_GROUP_NAME = "testGonsumerName-" + SUBSCRIBER_CONSUMER_ID;
+    protected static final int SUBSCRIBER_TIMEOUT_MS = 2000;
+    protected static final int SUBSCRIBER_MESSAGE_LIMIT = 20;
+
+    /**
+     * Creates Sample Publisher settings for unit testing purposes
+     *
+     * @return sample publisher settings for testing
+     */
+    protected static DMaaPMRPublisherConfig getPublisherConfig() {
+        return new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)
+                .setPortNumber(PORT_NUMBER)
+                .setProtocol(HTTP_PROTOCOL)
+                .setUserName(USERNAME)
+                .setUserPassword(PASSWORD)
+                .setContentType(CONTENT_TYPE)
+                .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)
+                .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE).build();
+    }
+
+    /**
+     * Creates Sample Subscriber settings for unit testing purposes
+     *
+     * @return sample subscriber settings for testing
+     */
+    protected static DMaaPMRSubscriberConfig getSubscriberConfig(String consumerId, String consumerGroup) {
+        return new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)
+                .setPortNumber(PORT_NUMBER)
+                .setUserName(USERNAME)
+                .setUserPassword(PASSWORD)
+                .setProtocol(HTTP_PROTOCOL)
+                .setContentType(CONTENT_TYPE)
+                .setConsumerGroup(consumerGroup != null ? consumerGroup : SUBSCRIBER_CONSUMER_GROUP_NAME)
+                .setConsumerId(consumerId != null ? consumerId : SUBSCRIBER_CONSUMER_ID)
+                .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)
+                .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT).build();
+    }
+
+    /**
+     * Creates two sample message for publishing
+     *
+     * @return sample publish message list
+     */
+    protected static List<String> getTwoSampleMessages() {
+        String message1 = "{ \"message\" : \"Test Message1\"}";
+        String message2 = "{ \"message\" : \"Test Message2\"}";
+        return of(message1, message2);
+    }
+
+
+}
@@ -1,67 +1,67 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.module.AnalyticsDMaaPTestModule;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.openecomp.dcae.apod.analytics.test.annotation.GuiceModules;\r
-\r
-import static org.hamcrest.Matchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Manjesh Gowda. Creation Date: 11/7/2016.\r
- */\r
-@GuiceModules(AnalyticsDMaaPTestModule.class)\r
-public class DMaaPMRFactoryTest extends BaseAnalyticsDMaaPGuiceUnitTest {\r
-\r
-    private DMaaPMRFactory dmaapMRFactory;\r
-\r
-    @Before\r
-    public void setUp() throws Exception {\r
-        dmaapMRFactory = new DMaaPMRFactory(new AnalyticsDMaaPTestModule());\r
-    }\r
-\r
-    @Test\r
-    public void createPublisher() throws Exception {\r
-        DMaaPMRPublisher publisher = dmaapMRFactory.createPublisher(getPublisherConfig());\r
-        DMaaPMRPublisherResponse response = publisher.publish(null);\r
-        assertThat(response.getResponseCode(), is(102));\r
-    }\r
-\r
-    @Test\r
-    public void createSubscriber() throws Exception {\r
-        DMaaPMRSubscriber dmaapMRSubscriber = dmaapMRFactory.createSubscriber(getSubscriberConfig("", ""));\r
-        DMaaPMRSubscriberResponse response = dmaapMRSubscriber.fetchMessages();\r
-        assertThat(response.getResponseCode(), is(102));\r
-    }\r
-\r
-    @Test\r
-    public void create() throws Exception {\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.module.AnalyticsDMaaPTestModule;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.test.annotation.GuiceModules;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Manjesh Gowda. Creation Date: 11/7/2016.
+ */
+@GuiceModules(AnalyticsDMaaPTestModule.class)
+public class DMaaPMRFactoryTest extends BaseAnalyticsDMaaPGuiceUnitTest {
+
+    private DMaaPMRFactory dmaapMRFactory;
+
+    @Before
+    public void setUp() throws Exception {
+        dmaapMRFactory = new DMaaPMRFactory(new AnalyticsDMaaPTestModule());
+    }
+
+    @Test
+    public void createPublisher() throws Exception {
+        DMaaPMRPublisher publisher = dmaapMRFactory.createPublisher(getPublisherConfig());
+        DMaaPMRPublisherResponse response = publisher.publish(null);
+        assertThat(response.getResponseCode(), is(102));
+    }
+
+    @Test
+    public void createSubscriber() throws Exception {
+        DMaaPMRSubscriber dmaapMRSubscriber = dmaapMRFactory.createSubscriber(getSubscriberConfig("", ""));
+        DMaaPMRSubscriberResponse response = dmaapMRSubscriber.fetchMessages();
+        assertThat(response.getResponseCode(), is(102));
+    }
+
+    @Test
+    public void create() throws Exception {
+
+    }
+
+}
@@ -1,78 +1,78 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.config;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/14/2016.\r
- */\r
-public class DMaaPMRPublisherConfigTest extends BaseAnalyticsDMaaPUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testPublisherConfigDefaults() throws Exception {\r
-\r
-        final DMaaPMRPublisherConfig actualDefaultPublisherConfig =\r
-                new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME).build();\r
-\r
-        final DMaaPMRPublisherConfig expectedDefaultPublisherConfig =\r
-                new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                        .setPortNumber(AnalyticsConstants.DEFAULT_PORT_NUMBER)\r
-                        .setContentType(AnalyticsConstants.DEFAULT_CONTENT_TYPE)\r
-                        .setProtocol(AnalyticsConstants.DEFAULT_PROTOCOL)\r
-                        .setMaxBatchSize(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_BATCH_SIZE)\r
-                        .setMaxRecoveryQueueSize(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)\r
-                        .build();\r
-\r
-        assertTrue("Default Publisher Config parameters must match",\r
-                actualDefaultPublisherConfig.equals(expectedDefaultPublisherConfig));\r
-\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testPublisherCustomConfig() throws Exception {\r
-\r
-\r
-        final DMaaPMRPublisherConfig actualCustomPublisherConfig = getPublisherConfig();\r
-\r
-        final DMaaPMRPublisherConfig expectedCustomPublisherConfig =\r
-                new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                        .setPortNumber(PORT_NUMBER)\r
-                        .setUserName(USERNAME)\r
-                        .setUserPassword(PASSWORD)\r
-                        .setContentType(CONTENT_TYPE)\r
-                        .setProtocol(HTTP_PROTOCOL)\r
-                        .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE)\r
-                        .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)\r
-                        .build();\r
-\r
-        assertTrue("Custom Publisher Config parameters must match",\r
-                actualCustomPublisherConfig.equals(expectedCustomPublisherConfig));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.config;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/14/2016.
+ */
+public class DMaaPMRPublisherConfigTest extends BaseAnalyticsDMaaPUnitTest {
+
+
+    @Test
+    public void testPublisherConfigDefaults() throws Exception {
+
+        final DMaaPMRPublisherConfig actualDefaultPublisherConfig =
+                new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME).build();
+
+        final DMaaPMRPublisherConfig expectedDefaultPublisherConfig =
+                new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)
+                        .setPortNumber(AnalyticsConstants.DEFAULT_PORT_NUMBER)
+                        .setContentType(AnalyticsConstants.DEFAULT_CONTENT_TYPE)
+                        .setProtocol(AnalyticsConstants.DEFAULT_PROTOCOL)
+                        .setMaxBatchSize(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_BATCH_SIZE)
+                        .setMaxRecoveryQueueSize(AnalyticsConstants.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)
+                        .build();
+
+        assertTrue("Default Publisher Config parameters must match",
+                actualDefaultPublisherConfig.equals(expectedDefaultPublisherConfig));
+
+    }
+
+
+    @Test
+    public void testPublisherCustomConfig() throws Exception {
+
+
+        final DMaaPMRPublisherConfig actualCustomPublisherConfig = getPublisherConfig();
+
+        final DMaaPMRPublisherConfig expectedCustomPublisherConfig =
+                new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)
+                        .setPortNumber(PORT_NUMBER)
+                        .setUserName(USERNAME)
+                        .setUserPassword(PASSWORD)
+                        .setContentType(CONTENT_TYPE)
+                        .setProtocol(HTTP_PROTOCOL)
+                        .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE)
+                        .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)
+                        .build();
+
+        assertTrue("Custom Publisher Config parameters must match",
+                actualCustomPublisherConfig.equals(expectedCustomPublisherConfig));
+    }
+
+
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.domain.config;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/14/2016.\r
- */\r
-public class DMaaPMRSubscriberConfigTest extends BaseAnalyticsDMaaPUnitTest {\r
-\r
-    @Test\r
-    public void testSubscriberConfigDefaults() throws Exception {\r
-\r
-        DMaaPMRSubscriberConfig actualDefaultSubscriberConfig =\r
-                new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                        .setConsumerGroup(AnalyticsConstants.DEFAULT_SUBSCRIBER_GROUP_PREFIX + SUBSCRIBER_CONSUMER_ID)\r
-                        .setConsumerId(SUBSCRIBER_CONSUMER_ID).build();\r
-\r
-        DMaaPMRSubscriberConfig expectedSubscriberConfig =\r
-                new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                        .setPortNumber(AnalyticsConstants.DEFAULT_PORT_NUMBER)\r
-                        .setContentType(AnalyticsConstants.DEFAULT_CONTENT_TYPE)\r
-                        .setProtocol(AnalyticsConstants.DEFAULT_PROTOCOL)\r
-                        .setConsumerGroup(AnalyticsConstants.DEFAULT_SUBSCRIBER_GROUP_PREFIX + SUBSCRIBER_CONSUMER_ID)\r
-                        .setConsumerId(SUBSCRIBER_CONSUMER_ID)\r
-                        .setMessageLimit(AnalyticsConstants.DEFAULT_SUBSCRIBER_MESSAGE_LIMIT)\r
-                        .setTimeoutMS(AnalyticsConstants.DEFAULT_SUBSCRIBER_TIMEOUT_MS)\r
-                        .build();\r
-\r
-        assertTrue("Default Subscriber Config parameters must match",\r
-                actualDefaultSubscriberConfig.equals(expectedSubscriberConfig));\r
-\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testSubscriberCustomConfig() throws Exception {\r
-\r
-        DMaaPMRSubscriberConfig actualSubscriberCustomConfig = getSubscriberConfig(SUBSCRIBER_CONSUMER_ID,\r
-                SUBSCRIBER_CONSUMER_GROUP_NAME);\r
-\r
-        DMaaPMRSubscriberConfig expectedSubscriberCustomConfig =\r
-                new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                        .setPortNumber(PORT_NUMBER)\r
-                        .setUserName(USERNAME)\r
-                        .setUserPassword(PASSWORD)\r
-                        .setContentType(CONTENT_TYPE)\r
-                        .setProtocol(HTTP_PROTOCOL)\r
-                        .setConsumerGroup(SUBSCRIBER_CONSUMER_GROUP_NAME)\r
-                        .setConsumerId(SUBSCRIBER_CONSUMER_ID)\r
-                        .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT)\r
-                        .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)\r
-                        .build();\r
-\r
-        assertTrue("Custom Subscriber Config parameters must match",\r
-                actualSubscriberCustomConfig.equals(expectedSubscriberCustomConfig));\r
-\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.domain.config;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/14/2016.
+ */
+public class DMaaPMRSubscriberConfigTest extends BaseAnalyticsDMaaPUnitTest {
+
+    @Test
+    public void testSubscriberConfigDefaults() throws Exception {
+
+        DMaaPMRSubscriberConfig actualDefaultSubscriberConfig =
+                new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)
+                        .setConsumerGroup(AnalyticsConstants.DEFAULT_SUBSCRIBER_GROUP_PREFIX + SUBSCRIBER_CONSUMER_ID)
+                        .setConsumerId(SUBSCRIBER_CONSUMER_ID).build();
+
+        DMaaPMRSubscriberConfig expectedSubscriberConfig =
+                new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)
+                        .setPortNumber(AnalyticsConstants.DEFAULT_PORT_NUMBER)
+                        .setContentType(AnalyticsConstants.DEFAULT_CONTENT_TYPE)
+                        .setProtocol(AnalyticsConstants.DEFAULT_PROTOCOL)
+                        .setConsumerGroup(AnalyticsConstants.DEFAULT_SUBSCRIBER_GROUP_PREFIX + SUBSCRIBER_CONSUMER_ID)
+                        .setConsumerId(SUBSCRIBER_CONSUMER_ID)
+                        .setMessageLimit(AnalyticsConstants.DEFAULT_SUBSCRIBER_MESSAGE_LIMIT)
+                        .setTimeoutMS(AnalyticsConstants.DEFAULT_SUBSCRIBER_TIMEOUT_MS)
+                        .build();
+
+        assertTrue("Default Subscriber Config parameters must match",
+                actualDefaultSubscriberConfig.equals(expectedSubscriberConfig));
+
+    }
+
+
+    @Test
+    public void testSubscriberCustomConfig() throws Exception {
+
+        DMaaPMRSubscriberConfig actualSubscriberCustomConfig = getSubscriberConfig(SUBSCRIBER_CONSUMER_ID,
+                SUBSCRIBER_CONSUMER_GROUP_NAME);
+
+        DMaaPMRSubscriberConfig expectedSubscriberCustomConfig =
+                new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)
+                        .setPortNumber(PORT_NUMBER)
+                        .setUserName(USERNAME)
+                        .setUserPassword(PASSWORD)
+                        .setContentType(CONTENT_TYPE)
+                        .setProtocol(HTTP_PROTOCOL)
+                        .setConsumerGroup(SUBSCRIBER_CONSUMER_GROUP_NAME)
+                        .setConsumerId(SUBSCRIBER_CONSUMER_ID)
+                        .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT)
+                        .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)
+                        .build();
+
+        assertTrue("Custom Subscriber Config parameters must match",
+                actualSubscriberCustomConfig.equals(expectedSubscriberCustomConfig));
+
+    }
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.it;\r
-\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;\r
-\r
-import java.util.List;\r
-\r
-import static com.google.common.collect.ImmutableList.of;\r
-\r
-/**\r
- * Base class for all DCAE DMaaP Integration Tests\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-public abstract class BaseAnalyticsDMaaPIT extends BaseDCAEAnalyticsIT {\r
-\r
-    // Integration Test Settings\r
-    protected static final String HOST_NAME = "mrlocal-mtnjftle01.homer.com";\r
-    protected static final Integer PORT_NUMBER = 3905;\r
-    protected static final String TOPIC_NAME = "com.dcae.dmaap.mtnje2.DcaeTestVESPub";\r
-\r
-    protected static final String USERNAME = "USER";\r
-    protected static final String PASSWORD = "PASSWORD";\r
-    protected static final String HTTP_PROTOCOL = "https";\r
-    protected static final String CONTENT_TYPE = "application/json";\r
-\r
-    protected static final int PUBLISHER_MAX_BATCH_QUEUE_SIZE = 20;\r
-    protected static final int PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 200;\r
-\r
-    protected static final String SUBSCRIBER_CONSUMER_ID = "123";\r
-    protected static final String SUBSCRIBER_CONSUMER_GROUP_NAME = "testGonsumerName-" + SUBSCRIBER_CONSUMER_ID;\r
-    protected static final int SUBSCRIBER_TIMEOUT_MS = 2000;\r
-    protected static final int SUBSCRIBER_MESSAGE_LIMIT = 20;\r
-\r
-    /**\r
-     * Creates Sample Publisher settings for integration testing purposes\r
-     *\r
-     * @return DMaaP MR Publisher Config\r
-     */\r
-    protected static DMaaPMRPublisherConfig getPublisherConfig() {\r
-        return new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setContentType(CONTENT_TYPE)\r
-                .setUserName(USERNAME)\r
-                .setUserPassword(PASSWORD)\r
-                .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE)\r
-                .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)\r
-                .build();\r
-    }\r
-\r
-    /**\r
-     * Creates Sample Subscriber settings for integration testing purposes\r
-     *\r
-     * @return DMaaP MR Subscriber Config\r
-     */\r
-    protected static DMaaPMRSubscriberConfig getSubscriberConfig(String consumerId) {\r
-        return new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setContentType(CONTENT_TYPE)\r
-                .setUserName(USERNAME)\r
-                .setUserPassword(PASSWORD)\r
-                .setConsumerGroup(SUBSCRIBER_CONSUMER_GROUP_NAME)\r
-                .setConsumerId(consumerId != null ? consumerId : SUBSCRIBER_CONSUMER_ID)\r
-                .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)\r
-                .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT).build();\r
-    }\r
-\r
-    /**\r
-     * Publishes 2 sample message to DMaaP Topic for integration test purposes\r
-     *\r
-     * @param dMaaPMRPublisher DMaaP MR Publisher\r
-     * @return DMaaP MR Publisher Response\r
-     */\r
-    protected static DMaaPMRPublisherResponse publishTwoSampleMessages(DMaaPMRPublisher dMaaPMRPublisher) {\r
-        return dMaaPMRPublisher.publish(getTwoSampleMessage());\r
-    }\r
-\r
-    protected static List<String> getTwoSampleMessage() {\r
-        String message1 = "{ \"message\" : \"Test Message1\"}";\r
-        String message2 = "{ \"message\" : \"Test Message2\"}";\r
-        return of(message1, message2);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.it;
+
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;
+
+import java.util.List;
+
+import static com.google.common.collect.ImmutableList.of;
+
+/**
+ * Base class for all DCAE DMaaP Integration Tests
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+public abstract class BaseAnalyticsDMaaPIT extends BaseDCAEAnalyticsIT {
+
+    // Integration Test Settings
+    protected static final String HOST_NAME = "mrlocal-mtnjftle01.homer.com";
+    protected static final Integer PORT_NUMBER = 3905;
+    protected static final String TOPIC_NAME = "com.dcae.dmaap.mtnje2.DcaeTestVESPub";
+
+    protected static final String USERNAME = "USER";
+    protected static final String PASSWORD = "PASSWORD";
+    protected static final String HTTP_PROTOCOL = "https";
+    protected static final String CONTENT_TYPE = "application/json";
+
+    protected static final int PUBLISHER_MAX_BATCH_QUEUE_SIZE = 20;
+    protected static final int PUBLISHER_MAX_RECOVERY_QUEUE_SIZE = 200;
+
+    protected static final String SUBSCRIBER_CONSUMER_ID = "123";
+    protected static final String SUBSCRIBER_CONSUMER_GROUP_NAME = "testGonsumerName-" + SUBSCRIBER_CONSUMER_ID;
+    protected static final int SUBSCRIBER_TIMEOUT_MS = 2000;
+    protected static final int SUBSCRIBER_MESSAGE_LIMIT = 20;
+
+    /**
+     * Creates Sample Publisher settings for integration testing purposes
+     *
+     * @return DMaaP MR Publisher Config
+     */
+    protected static DMaaPMRPublisherConfig getPublisherConfig() {
+        return new DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)
+                .setPortNumber(PORT_NUMBER)
+                .setProtocol(HTTP_PROTOCOL)
+                .setContentType(CONTENT_TYPE)
+                .setUserName(USERNAME)
+                .setUserPassword(PASSWORD)
+                .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE)
+                .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)
+                .build();
+    }
+
+    /**
+     * Creates Sample Subscriber settings for integration testing purposes
+     *
+     * @return DMaaP MR Subscriber Config
+     */
+    protected static DMaaPMRSubscriberConfig getSubscriberConfig(String consumerId) {
+        return new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)
+                .setPortNumber(PORT_NUMBER)
+                .setProtocol(HTTP_PROTOCOL)
+                .setContentType(CONTENT_TYPE)
+                .setUserName(USERNAME)
+                .setUserPassword(PASSWORD)
+                .setConsumerGroup(SUBSCRIBER_CONSUMER_GROUP_NAME)
+                .setConsumerId(consumerId != null ? consumerId : SUBSCRIBER_CONSUMER_ID)
+                .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)
+                .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT).build();
+    }
+
+    /**
+     * Publishes 2 sample message to DMaaP Topic for integration test purposes
+     *
+     * @param dMaaPMRPublisher DMaaP MR Publisher
+     * @return DMaaP MR Publisher Response
+     */
+    protected static DMaaPMRPublisherResponse publishTwoSampleMessages(DMaaPMRPublisher dMaaPMRPublisher) {
+        return dMaaPMRPublisher.publish(getTwoSampleMessage());
+    }
+
+    protected static List<String> getTwoSampleMessage() {
+        String message1 = "{ \"message\" : \"Test Message1\"}";
+        String message2 = "{ \"message\" : \"Test Message2\"}";
+        return of(message1, message2);
+    }
+
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.it;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Ignore;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-@Ignore\r
-public class DMaaPMRPublisherImplIT extends BaseAnalyticsDMaaPIT {\r
-\r
-    private DMaaPMRPublisher dMaaPMRPublisher;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        DMaaPMRFactory dMaaPMRFactory = DMaaPMRFactory.create();\r
-        dMaaPMRPublisher = dMaaPMRFactory.createPublisher(getPublisherConfig());\r
-    }\r
-\r
-    @Test\r
-    public void testPublish() throws Exception {\r
-        long pendingMessageCount = publishTwoSampleMessages(dMaaPMRPublisher).getPendingMessagesCount();\r
-        Assert.assertTrue("Published Message Count must be 2", pendingMessageCount == 2);\r
-    }\r
-\r
-    @Test\r
-    public void testFlush() throws Exception {\r
-        publishTwoSampleMessages(dMaaPMRPublisher);\r
-        DMaaPMRPublisherResponse publisherResponse = dMaaPMRPublisher.flush();\r
-        Integer responseCode = publisherResponse.getResponseCode();\r
-        Assert.assertTrue("Server Response code must be 200", responseCode == 200);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.it;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+@Ignore
+public class DMaaPMRPublisherImplIT extends BaseAnalyticsDMaaPIT {
+
+    private DMaaPMRPublisher dMaaPMRPublisher;
+
+    @Before
+    public void before() throws Exception {
+        DMaaPMRFactory dMaaPMRFactory = DMaaPMRFactory.create();
+        dMaaPMRPublisher = dMaaPMRFactory.createPublisher(getPublisherConfig());
+    }
+
+    @Test
+    public void testPublish() throws Exception {
+        long pendingMessageCount = publishTwoSampleMessages(dMaaPMRPublisher).getPendingMessagesCount();
+        Assert.assertTrue("Published Message Count must be 2", pendingMessageCount == 2);
+    }
+
+    @Test
+    public void testFlush() throws Exception {
+        publishTwoSampleMessages(dMaaPMRPublisher);
+        DMaaPMRPublisherResponse publisherResponse = dMaaPMRPublisher.flush();
+        Integer responseCode = publisherResponse.getResponseCode();
+        Assert.assertTrue("Server Response code must be 200", responseCode == 200);
+    }
+}
@@ -1,87 +1,87 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.it;\r
-\r
-import org.junit.After;\r
-import org.junit.Before;\r
-import org.junit.Ignore;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.UUID;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/13/2016.\r
- */\r
-@Ignore\r
-public class DMaaPMRSubscriberImplIT extends BaseAnalyticsDMaaPIT {\r
-\r
-    private DMaaPMRPublisher dMaaPMRPublisher;\r
-    private DMaaPMRSubscriber dMaaPMRSubscriber;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        String randomConsumerID = UUID.randomUUID().toString();\r
-        DMaaPMRFactory dMaaPMRFactory = DMaaPMRFactory.create();\r
-        dMaaPMRSubscriber = dMaaPMRFactory.createSubscriber(getSubscriberConfig(randomConsumerID));\r
-        dMaaPMRPublisher = dMaaPMRFactory.createPublisher(getPublisherConfig());\r
-    }\r
-\r
-    @After\r
-    public void after() throws Exception {\r
-        dMaaPMRSubscriber.close();\r
-        dMaaPMRPublisher.close();\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testFetchMessages() throws Exception {\r
-\r
-        // This call is used to just register a brand new subscriber with DMaaP\r
-        DMaaPMRSubscriberResponse subscriberRegistrationResponse = dMaaPMRSubscriber.fetchMessages();\r
-        assertTrue("Subscriber Registration Response code must be 200 confirming subscriber was registered " +\r
-                "successfully", subscriberRegistrationResponse.getResponseCode() == 200);\r
-        assertTrue("Subscriber Registration Response must not contain any messages", subscriberRegistrationResponse\r
-                .getFetchedMessages().size() == 0);\r
-\r
-        // Force push couple of test messages\r
-        DMaaPMRPublisherResponse publisherResponse = dMaaPMRPublisher.forcePublish(getTwoSampleMessage());\r
-        assertTrue("Message must be posted successfully before subscriber can fetch it", publisherResponse\r
-                .getResponseCode() == 200);\r
-\r
-        // Now fetch messages from DMaaP\r
-        DMaaPMRSubscriberResponse subscriberResponse = dMaaPMRSubscriber.fetchMessages();\r
-        List<String> messageList = new LinkedList<>();\r
-        for (String message : subscriberResponse.getFetchedMessages()) {\r
-            messageList.add(message);\r
-        }\r
-        assertTrue("Subscriber message count must be 2", messageList.size() == 2);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.it;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/13/2016.
+ */
+@Ignore
+public class DMaaPMRSubscriberImplIT extends BaseAnalyticsDMaaPIT {
+
+    private DMaaPMRPublisher dMaaPMRPublisher;
+    private DMaaPMRSubscriber dMaaPMRSubscriber;
+
+    @Before
+    public void before() throws Exception {
+        String randomConsumerID = UUID.randomUUID().toString();
+        DMaaPMRFactory dMaaPMRFactory = DMaaPMRFactory.create();
+        dMaaPMRSubscriber = dMaaPMRFactory.createSubscriber(getSubscriberConfig(randomConsumerID));
+        dMaaPMRPublisher = dMaaPMRFactory.createPublisher(getPublisherConfig());
+    }
+
+    @After
+    public void after() throws Exception {
+        dMaaPMRSubscriber.close();
+        dMaaPMRPublisher.close();
+    }
+
+
+    @Test
+    public void testFetchMessages() throws Exception {
+
+        // This call is used to just register a brand new subscriber with DMaaP
+        DMaaPMRSubscriberResponse subscriberRegistrationResponse = dMaaPMRSubscriber.fetchMessages();
+        assertTrue("Subscriber Registration Response code must be 200 confirming subscriber was registered " +
+                "successfully", subscriberRegistrationResponse.getResponseCode() == 200);
+        assertTrue("Subscriber Registration Response must not contain any messages", subscriberRegistrationResponse
+                .getFetchedMessages().size() == 0);
+
+        // Force push couple of test messages
+        DMaaPMRPublisherResponse publisherResponse = dMaaPMRPublisher.forcePublish(getTwoSampleMessage());
+        assertTrue("Message must be posted successfully before subscriber can fetch it", publisherResponse
+                .getResponseCode() == 200);
+
+        // Now fetch messages from DMaaP
+        DMaaPMRSubscriberResponse subscriberResponse = dMaaPMRSubscriber.fetchMessages();
+        List<String> messageList = new LinkedList<>();
+        for (String message : subscriberResponse.getFetchedMessages()) {
+            messageList.add(message);
+        }
+        assertTrue("Subscriber message count must be 2", messageList.size() == 2);
+    }
+
+}
@@ -1,60 +1,60 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.module;\r
-\r
-import com.google.inject.AbstractModule;\r
-import com.google.inject.assistedinject.FactoryModuleBuilder;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.apache.http.impl.client.HttpClients;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherMockImpl;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueImpl;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberFactory;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberMockImpl;\r
-\r
-/**\r
- * DMaaP Guice Test Module\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-public class AnalyticsDMaaPTestModule extends AbstractModule {\r
-\r
-\r
-    @Override\r
-    protected void configure() {\r
-// Bind Http Client\r
-        bind(CloseableHttpClient.class).toInstance(HttpClients.createDefault());\r
-\r
-        // Bind Publishing queue\r
-        install(new FactoryModuleBuilder().implement(DMaaPMRPublisherQueue.class, DMaaPMRPublisherQueueImpl.class)\r
-                .build(DMaaPMRPublisherQueueFactory.class));\r
-\r
-        install(new FactoryModuleBuilder().implement(DMaaPMRPublisher.class, DMaaPMRPublisherMockImpl.class)\r
-                .build(DMaaPMRPublisherFactory.class));\r
-\r
-        install(new FactoryModuleBuilder().implement(DMaaPMRSubscriber.class, DMaaPMRSubscriberMockImpl.class)\r
-                .build(DMaaPMRSubscriberFactory.class));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.module;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.assistedinject.FactoryModuleBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherMockImpl;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueueImpl;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberFactory;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriberMockImpl;
+
+/**
+ * DMaaP Guice Test Module
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+public class AnalyticsDMaaPTestModule extends AbstractModule {
+
+
+    @Override
+    protected void configure() {
+// Bind Http Client
+        bind(CloseableHttpClient.class).toInstance(HttpClients.createDefault());
+
+        // Bind Publishing queue
+        install(new FactoryModuleBuilder().implement(DMaaPMRPublisherQueue.class, DMaaPMRPublisherQueueImpl.class)
+                .build(DMaaPMRPublisherQueueFactory.class));
+
+        install(new FactoryModuleBuilder().implement(DMaaPMRPublisher.class, DMaaPMRPublisherMockImpl.class)
+                .build(DMaaPMRPublisherFactory.class));
+
+        install(new FactoryModuleBuilder().implement(DMaaPMRSubscriber.class, DMaaPMRSubscriberMockImpl.class)
+                .build(DMaaPMRSubscriberFactory.class));
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.google.common.base.Optional;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.apache.http.HttpEntity;\r
-import org.apache.http.HttpResponse;\r
-import org.apache.http.StatusLine;\r
-import org.apache.http.client.ResponseHandler;\r
-import org.junit.Rule;\r
-import org.junit.Test;\r
-import org.junit.rules.ExpectedException;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;\r
-\r
-import java.io.IOException;\r
-import java.net.URI;\r
-import java.util.ArrayList;\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.Matchers.containsInAnyOrder;\r
-import static org.hamcrest.Matchers.hasSize;\r
-import static org.hamcrest.Matchers.is;\r
-import static org.hamcrest.Matchers.isA;\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-import static org.mockito.BDDMockito.given;\r
-import static org.mockito.Mockito.mock;\r
-\r
-/**\r
- * @author Manjesh Gowda. Creation Date: 11/4/2016.\r
- */\r
-public class BaseDMaaPMRComponentTest extends BaseAnalyticsDMaaPUnitTest {\r
-\r
-    @Test\r
-    public void testGetAuthHeaderWithGoodValues() {\r
-        String expectedEncodedString = "Basic bTAwNTAyQHRjYS5hZi5kY2FlLmNvbTpUZTUwMjFhYmM=";\r
-        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader("USER", "PASSWORD");\r
-        assertTrue(" Authentication Header has value ", actualOutput.isPresent());\r
-//        assertEquals(" Authentication Header has value ", expectedEncodedString, actualOutput.get());\r
-    }\r
-\r
-    @Test\r
-    public void testGetAuthHeaderWithNullValues() {\r
-        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader(null, null);\r
-        assertFalse(" Authentication Header has value ", actualOutput.isPresent());\r
-    }\r
-\r
-    @Test\r
-    public void testGetAuthHeaderWithUserNullValue() {\r
-        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader("USER", null);\r
-        assertFalse(" Authentication Header has value ", actualOutput.isPresent());\r
-    }\r
-\r
-    @Test\r
-    public void testGetAuthHeaderWithPasswordNullValue() {\r
-        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader(null, "PASSWORD");\r
-        assertFalse(" Authentication Header has value ", actualOutput.isPresent());\r
-    }\r
-\r
-    @Test\r
-    public void testCreatePublishURIWithGoodValues() {\r
-        URI actualURI = BaseDMaaPMRComponent.createPublisherURI(getPublisherConfig());\r
-        String test = actualURI.toString();\r
-        assertEquals("Generated Publisher URL is correct",\r
-                "https://testHostName:8080/events/testTopicName", actualURI.toString());\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testCreatePublishURIWithURISyntaxException() {\r
-        DMaaPMRPublisherConfig badPublisherConfig = new DMaaPMRPublisherConfig\r
-                .Builder(" dav /gh. ss/ asd ", "///@$%#-htps:<>!##")\r
-                .setPortNumber(0)\r
-                .setProtocol("https").build();\r
-\r
-      BaseDMaaPMRComponent.createPublisherURI(badPublisherConfig);\r
-    }\r
-\r
-    @Test\r
-    public void testCreateSubscribeURIWithGoodValues() {\r
-        URI actualURI = BaseDMaaPMRComponent.createSubscriberURI(\r
-                getSubscriberConfig("test-consumer-group", "test-consumer-id"));\r
-        assertEquals("Generated Subscriber URL is correct",\r
-                "https://testHostName:8080/events/testTopicName/" +\r
-                        "test-consumer-id/test-consumer-group?timeout=2000&limit=20",\r
-                actualURI.toString());\r
-    }\r
-\r
-    @Test(expected = DCAEAnalyticsRuntimeException.class)\r
-    public void testCreateSubscribeURIWithURISyntaxException() {\r
-        DMaaPMRSubscriberConfig badSubscriberConfig = new DMaaPMRSubscriberConfig\r
-                .Builder(" dav /gh. ss/ asd ", "")\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setContentType(CONTENT_TYPE).build();\r
-\r
-        URI actualURI = BaseDMaaPMRComponent.createSubscriberURI(badSubscriberConfig);\r
-    }\r
-\r
-    @Test\r
-    public void testConvertToJsonStringGoodJsonStringList() {\r
-        List<String> jsonMessage = Arrays.asList(\r
-                "{\"message\":\"I'm Object 1 Message\"}",\r
-                "{\"message\":\"I'm Object 2 Message\"}");\r
-\r
-        String actualJSONMsg = BaseDMaaPMRComponent.convertToJsonString(jsonMessage);\r
-\r
-        String expectedJSONMsg = "[{\"message\":\"I'm Object 1 Message\"}," +\r
-                "{\"message\":\"I'm Object 2 Message\"}]";\r
-        assertEquals("Convert a List of Strings to JSON is working fine", expectedJSONMsg, actualJSONMsg);\r
-\r
-    }\r
-\r
-    @Rule\r
-    public ExpectedException expectedJsonProcessingException = ExpectedException.none();\r
-\r
-    @Test\r
-    public void testConvertToJsonStringBadJsonStringList() {\r
-        expectedJsonProcessingException.expect(DCAEAnalyticsRuntimeException.class);\r
-        expectedJsonProcessingException.expectCause(isA(JsonProcessingException.class));\r
-\r
-        List<String> jsonMessage = Arrays.asList(\r
-                "{\"message\":\"I'm Object 1 Message\"",\r
-                "\"message\":\"I'm Object 2 Message\"");\r
-\r
-        BaseDMaaPMRComponent.convertToJsonString(jsonMessage);\r
-    }\r
-\r
-    @Test\r
-    public void testConvertToJsonStringWithEmptyList() {\r
-        List<String> jsonMessage = Arrays.asList();\r
-        String actualJSONMsg = BaseDMaaPMRComponent.convertToJsonString(jsonMessage);\r
-        String expectedJSONMsg = "[]";\r
-        assertEquals("Convert a List of Strings to JSON is working fine", expectedJSONMsg, actualJSONMsg);\r
-    }\r
-\r
-    @Test\r
-    public void testConvertToJsonStringWithNullList() {\r
-        String actualJSONMsg = BaseDMaaPMRComponent.convertToJsonString(null);\r
-        String expectedJSONMsg = "[]";\r
-        assertEquals("Convert a List of Strings to JSON is working fine", expectedJSONMsg, actualJSONMsg);\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testConvertJsonToStringMessagesGoodValues() {\r
-        String inputJSONMsg = "[{\"message\":\"I'm Object 1 Message\"}," +\r
-                "{\"message\":\"I'm Object 2 Message\"}]";\r
-        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(inputJSONMsg);\r
-        assertThat(actualList, hasSize(2));\r
-        assertThat(actualList, containsInAnyOrder(\r
-                "{\"message\":\"I'm Object 1 Message\"}",\r
-                "{\"message\":\"I'm Object 2 Message\"}"\r
-        ));\r
-    }\r
-\r
-    @Test\r
-    public void testConvertJsonToStringMessagesNoValues() {\r
-        String inputJSONMsg = "[]";\r
-        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(inputJSONMsg);\r
-        assertThat(actualList, hasSize(0));\r
-    }\r
-\r
-    @Test\r
-    public void testConvertJsonToStringMessagesNullValues() {\r
-        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(null);\r
-        assertThat(actualList, hasSize(0));\r
-    }\r
-\r
-    @Test\r
-    public void testConvertJsonToStringMessagesEmptyValues() {\r
-        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages("  ");\r
-        assertThat(actualList, hasSize(0));\r
-    }\r
-\r
-    @Rule\r
-    public ExpectedException convertToJSONIOException = ExpectedException.none();\r
-\r
-    @Test\r
-    public void testConvertJsonToStringMessagesException() {\r
-        convertToJSONIOException.expect(DCAEAnalyticsRuntimeException.class);\r
-        convertToJSONIOException.expectCause(isA(IOException.class));\r
-\r
-        String inputJSONMsg = "[\"{\"message\":\"I'm Object 1 Message\"}\"," +\r
-                "\"{\"message\":\"I'm Object 2 Message\"}\"]";\r
-        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(inputJSONMsg);\r
-        assertThat(actualList, hasSize(2));\r
-        assertThat(actualList, containsInAnyOrder(\r
-                "{\"message\":\"I'm Object 1 Message\"}",\r
-                "{\"message\":\"I'm Object 2 Message\"}"\r
-        ));\r
-    }\r
-\r
-    @Test\r
-    public void testAddMessagesToRecoveryQueueAllGood() {\r
-        DMaaPMRPublisherQueue dmaapMRPublisherQueue = mock(DMaaPMRPublisherQueue.class);\r
-        given(dmaapMRPublisherQueue.addRecoverableMessages(Mockito.<String>anyList())).willReturn(0);\r
-        given(dmaapMRPublisherQueue.getBatchQueueRemainingSize()).willReturn(0);\r
-        List<String> messages = new ArrayList<String>();\r
-        BaseDMaaPMRComponent.addMessagesToRecoveryQueue(dmaapMRPublisherQueue, messages);\r
-    }\r
-\r
-    @Rule\r
-    public ExpectedException addQueueIllegalException = ExpectedException.none();\r
-\r
-    @Test\r
-    public void testAddMessagesToRecoveryQueueException() {\r
-        addQueueIllegalException.expect(isA(DCAEAnalyticsRuntimeException.class));\r
-        addQueueIllegalException.expectCause(isA(IllegalStateException.class));\r
-\r
-        DMaaPMRPublisherQueue dmaapMRPublisherQueue = mock(DMaaPMRPublisherQueue.class);\r
-\r
-        given(dmaapMRPublisherQueue.addRecoverableMessages(Mockito.<String>anyList()))\r
-                .willThrow(IllegalStateException.class);\r
-        List<String> messages = new ArrayList<String>();\r
-\r
-        BaseDMaaPMRComponent.addMessagesToRecoveryQueue(dmaapMRPublisherQueue, messages);\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testResponseHandler() {\r
-        HttpResponse mockHttpResponse = mock(HttpResponse.class);\r
-        StatusLine mockStatusLine = mock(StatusLine.class);\r
-        HttpEntity mockHttpEntity = mock(HttpEntity.class);\r
-        // Could not mock EntityUtils as it's final class\r
-        //EntityUtils mockEntityUtils = mock(EntityUtils.class);\r
-\r
-        given(mockHttpResponse.getStatusLine()).willReturn(mockStatusLine);\r
-        given(mockStatusLine.getStatusCode()).willReturn(200);\r
-        given(mockHttpResponse.getEntity()).willReturn(null);\r
-        //given(mockEntityUtils.toString()).willReturn("Test value");\r
-\r
-        ResponseHandler<Pair<Integer, String>> responseHandler = BaseDMaaPMRComponent.responseHandler();\r
-        try {\r
-            Pair<Integer, String> mappedResponse = responseHandler.handleResponse(mockHttpResponse);\r
-            assertTrue("Http response code returned properly ", mappedResponse.getLeft().equals(200));\r
-            assertTrue("Http response body returned properly ", mappedResponse.getRight().equals(""));\r
-        } catch (IOException e) {\r
-            e.printStackTrace();\r
-        }\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCreateSubscriberResponse() {\r
-        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse =\r
-                BaseDMaaPMRComponent.createSubscriberResponse(200, "Test Message", getTwoSampleMessages());\r
-\r
-        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));\r
-        assertEquals(dmaapMRSubscriberResponse.getResponseMessage(), "Test Message");\r
-        assertThat(dmaapMRSubscriberResponse.getFetchedMessages().size(), is(2));\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testCreateSubscriberResponse_no_message() {\r
-        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse =\r
-                BaseDMaaPMRComponent.createSubscriberResponse(200, "Test Message", null);\r
-\r
-        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));\r
-        assertEquals(dmaapMRSubscriberResponse.getResponseMessage(), "Test Message");\r
-        assertThat(dmaapMRSubscriberResponse.getFetchedMessages().size(), is(0));\r
-\r
-    }\r
-\r
-}\r
-\r
-\r
-\r
-\r
-\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.common.base.Optional;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.StatusLine;
+import org.apache.http.client.ResponseHandler;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisherQueue;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.isA;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
+/**
+ * @author Manjesh Gowda. Creation Date: 11/4/2016.
+ */
+public class BaseDMaaPMRComponentTest extends BaseAnalyticsDMaaPUnitTest {
+
+    @Test
+    public void testGetAuthHeaderWithGoodValues() {
+        String expectedEncodedString = "Basic bTAwNTAyQHRjYS5hZi5kY2FlLmNvbTpUZTUwMjFhYmM=";
+        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader("USER", "PASSWORD");
+        assertTrue(" Authentication Header has value ", actualOutput.isPresent());
+//        assertEquals(" Authentication Header has value ", expectedEncodedString, actualOutput.get());
+    }
+
+    @Test
+    public void testGetAuthHeaderWithNullValues() {
+        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader(null, null);
+        assertFalse(" Authentication Header has value ", actualOutput.isPresent());
+    }
+
+    @Test
+    public void testGetAuthHeaderWithUserNullValue() {
+        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader("USER", null);
+        assertFalse(" Authentication Header has value ", actualOutput.isPresent());
+    }
+
+    @Test
+    public void testGetAuthHeaderWithPasswordNullValue() {
+        Optional<String> actualOutput = BaseDMaaPMRComponent.getAuthHeader(null, "PASSWORD");
+        assertFalse(" Authentication Header has value ", actualOutput.isPresent());
+    }
+
+    @Test
+    public void testCreatePublishURIWithGoodValues() {
+        URI actualURI = BaseDMaaPMRComponent.createPublisherURI(getPublisherConfig());
+        String test = actualURI.toString();
+        assertEquals("Generated Publisher URL is correct",
+                "https://testHostName:8080/events/testTopicName", actualURI.toString());
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testCreatePublishURIWithURISyntaxException() {
+        DMaaPMRPublisherConfig badPublisherConfig = new DMaaPMRPublisherConfig
+                .Builder(" dav /gh. ss/ asd ", "///@$%#-htps:<>!##")
+                .setPortNumber(0)
+                .setProtocol("https").build();
+
+      BaseDMaaPMRComponent.createPublisherURI(badPublisherConfig);
+    }
+
+    @Test
+    public void testCreateSubscribeURIWithGoodValues() {
+        URI actualURI = BaseDMaaPMRComponent.createSubscriberURI(
+                getSubscriberConfig("test-consumer-group", "test-consumer-id"));
+        assertEquals("Generated Subscriber URL is correct",
+                "https://testHostName:8080/events/testTopicName/" +
+                        "test-consumer-id/test-consumer-group?timeout=2000&limit=20",
+                actualURI.toString());
+    }
+
+    @Test(expected = DCAEAnalyticsRuntimeException.class)
+    public void testCreateSubscribeURIWithURISyntaxException() {
+        DMaaPMRSubscriberConfig badSubscriberConfig = new DMaaPMRSubscriberConfig
+                .Builder(" dav /gh. ss/ asd ", "")
+                .setPortNumber(PORT_NUMBER)
+                .setProtocol(HTTP_PROTOCOL)
+                .setContentType(CONTENT_TYPE).build();
+
+        URI actualURI = BaseDMaaPMRComponent.createSubscriberURI(badSubscriberConfig);
+    }
+
+    @Test
+    public void testConvertToJsonStringGoodJsonStringList() {
+        List<String> jsonMessage = Arrays.asList(
+                "{\"message\":\"I'm Object 1 Message\"}",
+                "{\"message\":\"I'm Object 2 Message\"}");
+
+        String actualJSONMsg = BaseDMaaPMRComponent.convertToJsonString(jsonMessage);
+
+        String expectedJSONMsg = "[{\"message\":\"I'm Object 1 Message\"}," +
+                "{\"message\":\"I'm Object 2 Message\"}]";
+        assertEquals("Convert a List of Strings to JSON is working fine", expectedJSONMsg, actualJSONMsg);
+
+    }
+
+    @Rule
+    public ExpectedException expectedJsonProcessingException = ExpectedException.none();
+
+    @Test
+    public void testConvertToJsonStringBadJsonStringList() {
+        expectedJsonProcessingException.expect(DCAEAnalyticsRuntimeException.class);
+        expectedJsonProcessingException.expectCause(isA(JsonProcessingException.class));
+
+        List<String> jsonMessage = Arrays.asList(
+                "{\"message\":\"I'm Object 1 Message\"",
+                "\"message\":\"I'm Object 2 Message\"");
+
+        BaseDMaaPMRComponent.convertToJsonString(jsonMessage);
+    }
+
+    @Test
+    public void testConvertToJsonStringWithEmptyList() {
+        List<String> jsonMessage = Arrays.asList();
+        String actualJSONMsg = BaseDMaaPMRComponent.convertToJsonString(jsonMessage);
+        String expectedJSONMsg = "[]";
+        assertEquals("Convert a List of Strings to JSON is working fine", expectedJSONMsg, actualJSONMsg);
+    }
+
+    @Test
+    public void testConvertToJsonStringWithNullList() {
+        String actualJSONMsg = BaseDMaaPMRComponent.convertToJsonString(null);
+        String expectedJSONMsg = "[]";
+        assertEquals("Convert a List of Strings to JSON is working fine", expectedJSONMsg, actualJSONMsg);
+    }
+
+
+    @Test
+    public void testConvertJsonToStringMessagesGoodValues() {
+        String inputJSONMsg = "[{\"message\":\"I'm Object 1 Message\"}," +
+                "{\"message\":\"I'm Object 2 Message\"}]";
+        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(inputJSONMsg);
+        assertThat(actualList, hasSize(2));
+        assertThat(actualList, containsInAnyOrder(
+                "{\"message\":\"I'm Object 1 Message\"}",
+                "{\"message\":\"I'm Object 2 Message\"}"
+        ));
+    }
+
+    @Test
+    public void testConvertJsonToStringMessagesNoValues() {
+        String inputJSONMsg = "[]";
+        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(inputJSONMsg);
+        assertThat(actualList, hasSize(0));
+    }
+
+    @Test
+    public void testConvertJsonToStringMessagesNullValues() {
+        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(null);
+        assertThat(actualList, hasSize(0));
+    }
+
+    @Test
+    public void testConvertJsonToStringMessagesEmptyValues() {
+        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages("  ");
+        assertThat(actualList, hasSize(0));
+    }
+
+    @Rule
+    public ExpectedException convertToJSONIOException = ExpectedException.none();
+
+    @Test
+    public void testConvertJsonToStringMessagesException() {
+        convertToJSONIOException.expect(DCAEAnalyticsRuntimeException.class);
+        convertToJSONIOException.expectCause(isA(IOException.class));
+
+        String inputJSONMsg = "[\"{\"message\":\"I'm Object 1 Message\"}\"," +
+                "\"{\"message\":\"I'm Object 2 Message\"}\"]";
+        List<String> actualList = BaseDMaaPMRComponent.convertJsonToStringMessages(inputJSONMsg);
+        assertThat(actualList, hasSize(2));
+        assertThat(actualList, containsInAnyOrder(
+                "{\"message\":\"I'm Object 1 Message\"}",
+                "{\"message\":\"I'm Object 2 Message\"}"
+        ));
+    }
+
+    @Test
+    public void testAddMessagesToRecoveryQueueAllGood() {
+        DMaaPMRPublisherQueue dmaapMRPublisherQueue = mock(DMaaPMRPublisherQueue.class);
+        given(dmaapMRPublisherQueue.addRecoverableMessages(Mockito.<String>anyList())).willReturn(0);
+        given(dmaapMRPublisherQueue.getBatchQueueRemainingSize()).willReturn(0);
+        List<String> messages = new ArrayList<String>();
+        BaseDMaaPMRComponent.addMessagesToRecoveryQueue(dmaapMRPublisherQueue, messages);
+    }
+
+    @Rule
+    public ExpectedException addQueueIllegalException = ExpectedException.none();
+
+    @Test
+    public void testAddMessagesToRecoveryQueueException() {
+        addQueueIllegalException.expect(isA(DCAEAnalyticsRuntimeException.class));
+        addQueueIllegalException.expectCause(isA(IllegalStateException.class));
+
+        DMaaPMRPublisherQueue dmaapMRPublisherQueue = mock(DMaaPMRPublisherQueue.class);
+
+        given(dmaapMRPublisherQueue.addRecoverableMessages(Mockito.<String>anyList()))
+                .willThrow(IllegalStateException.class);
+        List<String> messages = new ArrayList<String>();
+
+        BaseDMaaPMRComponent.addMessagesToRecoveryQueue(dmaapMRPublisherQueue, messages);
+    }
+
+
+    @Test
+    public void testResponseHandler() {
+        HttpResponse mockHttpResponse = mock(HttpResponse.class);
+        StatusLine mockStatusLine = mock(StatusLine.class);
+        HttpEntity mockHttpEntity = mock(HttpEntity.class);
+        // Could not mock EntityUtils as it's final class
+        //EntityUtils mockEntityUtils = mock(EntityUtils.class);
+
+        given(mockHttpResponse.getStatusLine()).willReturn(mockStatusLine);
+        given(mockStatusLine.getStatusCode()).willReturn(200);
+        given(mockHttpResponse.getEntity()).willReturn(null);
+        //given(mockEntityUtils.toString()).willReturn("Test value");
+
+        ResponseHandler<Pair<Integer, String>> responseHandler = BaseDMaaPMRComponent.responseHandler();
+        try {
+            Pair<Integer, String> mappedResponse = responseHandler.handleResponse(mockHttpResponse);
+            assertTrue("Http response code returned properly ", mappedResponse.getLeft().equals(200));
+            assertTrue("Http response body returned properly ", mappedResponse.getRight().equals(""));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    @Test
+    public void testCreateSubscriberResponse() {
+        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse =
+                BaseDMaaPMRComponent.createSubscriberResponse(200, "Test Message", getTwoSampleMessages());
+
+        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));
+        assertEquals(dmaapMRSubscriberResponse.getResponseMessage(), "Test Message");
+        assertThat(dmaapMRSubscriberResponse.getFetchedMessages().size(), is(2));
+
+    }
+
+    @Test
+    public void testCreateSubscriberResponse_no_message() {
+        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse =
+                BaseDMaaPMRComponent.createSubscriberResponse(200, "Test Message", null);
+
+        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));
+        assertEquals(dmaapMRSubscriberResponse.getResponseMessage(), "Test Message");
+        assertThat(dmaapMRSubscriberResponse.getFetchedMessages().size(), is(0));
+
+    }
+
+}
+
+
+
+
+
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import org.apache.commons.lang3.tuple.ImmutablePair;\r
-import org.apache.http.client.ResponseHandler;\r
-import org.apache.http.client.methods.HttpUriRequest;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.junit.After;\r
-import org.junit.Before;\r
-import org.junit.Rule;\r
-import org.junit.Test;\r
-import org.junit.rules.ExpectedException;\r
-import org.junit.runner.RunWith;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.junit.MockitoJUnitRunner;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
-\r
-import static org.hamcrest.CoreMatchers.isA;\r
-import static org.hamcrest.core.Is.is;\r
-import static org.junit.Assert.assertThat;\r
-import static org.mockito.BDDMockito.given;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/21/2016.\r
- */\r
-@RunWith(MockitoJUnitRunner.class)\r
-public class DMaaPMRPublisherImplTest extends BaseAnalyticsDMaaPUnitTest {\r
-\r
-    @Mock\r
-    private DMaaPMRPublisherQueueFactory dmaapMRPublisherQueueFactory;\r
-    @Mock\r
-    private CloseableHttpClient closeableHttpClient;\r
-    @Mock\r
-    private DMaaPMRPublisherQueue dmaapMRPublisherQueue;\r
-\r
-    @Before\r
-    public void setUp() throws Exception {\r
-        given(dmaapMRPublisherQueueFactory.create(Mockito.anyInt(), Mockito.anyInt()))\r
-                .willReturn(dmaapMRPublisherQueue);\r
-    }\r
-\r
-    @After\r
-    public void tearDown() throws Exception {\r
-    }\r
-\r
-    @Test\r
-    public void testPublishSmallMessageList() throws Exception {\r
-        given(dmaapMRPublisherQueue.getBatchQueueRemainingSize()).willReturn(10);\r
-        given(dmaapMRPublisherQueue.addBatchMessages(Mockito.<String>anyList())).willReturn(2);\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-\r
-        DMaaPMRPublisherResponse dmaapMRPublisherResponse = dmaapMRPublisherImpl.publish(getTwoSampleMessages());\r
-\r
-        assertThat(dmaapMRPublisherResponse.getResponseCode(), is(202));\r
-        assertThat(dmaapMRPublisherResponse.getPendingMessagesCount(), is(2));\r
-        assertThat(dmaapMRPublisherResponse.getResponseMessage(),\r
-                is("Accepted - Messages queued for batch publishing to MR Topic"));\r
-    }\r
-\r
-    @Test\r
-    public void testPublishBigMessageList() throws Exception {\r
-\r
-        given(dmaapMRPublisherQueue.getBatchQueueRemainingSize()).willReturn(0);\r
-        given(dmaapMRPublisherQueue.getMessageForPublishing()).willReturn(getTwoSampleMessages());\r
-        Mockito.when(\r
-                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-\r
-        DMaaPMRPublisherResponse dmaapMRPublisherResponse = dmaapMRPublisherImpl.publish(getTwoSampleMessages());\r
-\r
-        assertThat(dmaapMRPublisherResponse.getResponseCode(), is(200));\r
-        assertThat(dmaapMRPublisherResponse.getPendingMessagesCount(), is(200));\r
-        assertThat(dmaapMRPublisherResponse.getResponseMessage(), is("Message successfully posted"));\r
-    }\r
-\r
-    @Test\r
-    public void testForcePublishSuccessful() throws Exception {\r
-        DMaaPMRPublisherConfig dmaapMRPublisherConfig = new\r
-                DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setContentType(CONTENT_TYPE)\r
-                .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)\r
-                .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE).build();\r
-\r
-        Mockito.when(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                dmaapMRPublisherConfig, dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.forcePublish(getTwoSampleMessages());\r
-        assertThat(response.getResponseCode(), is(200));\r
-    }\r
-\r
-    @Test\r
-    public void testForcePublishFailure() throws Exception {\r
-        Mockito.when(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(503, "Message successfully posted"));\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.forcePublish(getTwoSampleMessages());\r
-        assertThat(response.getResponseCode(), is(503));\r
-    }\r
-\r
-    @Rule\r
-    public ExpectedException httpIOException = ExpectedException.none();\r
-\r
-    @Test\r
-    public void testForcePublishHttpFailure() throws Exception {\r
-\r
-        httpIOException.expect(DCAEAnalyticsRuntimeException.class);\r
-        httpIOException.expectCause(isA(IOException.class));\r
-\r
-        given(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class))).willThrow(IOException.class);\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        dmaapMRPublisherImpl.forcePublish(getTwoSampleMessages());\r
-    }\r
-\r
-    @Test\r
-    public void testFlushSuccessful() throws Exception {\r
-        Mockito.when(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));\r
-\r
-        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(getTwoSampleMessages());\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.flush();\r
-        assertThat(response.getResponseCode(), is(200));\r
-    }\r
-\r
-    @Test\r
-    public void testFlushEmptyList() throws Exception {\r
-        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(new ArrayList<String>());\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.flush();\r
-        assertThat(response.getResponseCode(), is(204));\r
-    }\r
-\r
-    @Test\r
-    public void testClose() throws Exception {\r
-        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(new ArrayList<String>());\r
-        Mockito.when(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));\r
-        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(getTwoSampleMessages());\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        dmaapMRPublisherImpl.close();\r
-        verify(closeableHttpClient).execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class));\r
-    }\r
-\r
-    @Test\r
-    public void testCloseUnsuccessful() throws Exception {\r
-        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(new ArrayList<String>());\r
-        Mockito.when(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(400, "Message successfully posted"));\r
-        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(getTwoSampleMessages());\r
-\r
-        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(\r
-                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);\r
-        dmaapMRPublisherImpl.close();\r
-        verify(closeableHttpClient, times(6)).execute(Mockito.any(HttpUriRequest.class),\r
-                Mockito.any(ResponseHandler.class));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import static org.hamcrest.CoreMatchers.isA;
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/21/2016.
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class DMaaPMRPublisherImplTest extends BaseAnalyticsDMaaPUnitTest {
+
+    @Mock
+    private DMaaPMRPublisherQueueFactory dmaapMRPublisherQueueFactory;
+    @Mock
+    private CloseableHttpClient closeableHttpClient;
+    @Mock
+    private DMaaPMRPublisherQueue dmaapMRPublisherQueue;
+
+    @Before
+    public void setUp() throws Exception {
+        given(dmaapMRPublisherQueueFactory.create(Mockito.anyInt(), Mockito.anyInt()))
+                .willReturn(dmaapMRPublisherQueue);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+    }
+
+    @Test
+    public void testPublishSmallMessageList() throws Exception {
+        given(dmaapMRPublisherQueue.getBatchQueueRemainingSize()).willReturn(10);
+        given(dmaapMRPublisherQueue.addBatchMessages(Mockito.<String>anyList())).willReturn(2);
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+
+        DMaaPMRPublisherResponse dmaapMRPublisherResponse = dmaapMRPublisherImpl.publish(getTwoSampleMessages());
+
+        assertThat(dmaapMRPublisherResponse.getResponseCode(), is(202));
+        assertThat(dmaapMRPublisherResponse.getPendingMessagesCount(), is(2));
+        assertThat(dmaapMRPublisherResponse.getResponseMessage(),
+                is("Accepted - Messages queued for batch publishing to MR Topic"));
+    }
+
+    @Test
+    public void testPublishBigMessageList() throws Exception {
+
+        given(dmaapMRPublisherQueue.getBatchQueueRemainingSize()).willReturn(0);
+        given(dmaapMRPublisherQueue.getMessageForPublishing()).willReturn(getTwoSampleMessages());
+        Mockito.when(
+                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+
+        DMaaPMRPublisherResponse dmaapMRPublisherResponse = dmaapMRPublisherImpl.publish(getTwoSampleMessages());
+
+        assertThat(dmaapMRPublisherResponse.getResponseCode(), is(200));
+        assertThat(dmaapMRPublisherResponse.getPendingMessagesCount(), is(200));
+        assertThat(dmaapMRPublisherResponse.getResponseMessage(), is("Message successfully posted"));
+    }
+
+    @Test
+    public void testForcePublishSuccessful() throws Exception {
+        DMaaPMRPublisherConfig dmaapMRPublisherConfig = new
+                DMaaPMRPublisherConfig.Builder(HOST_NAME, TOPIC_NAME)
+                .setPortNumber(PORT_NUMBER)
+                .setProtocol(HTTP_PROTOCOL)
+                .setContentType(CONTENT_TYPE)
+                .setMaxRecoveryQueueSize(PUBLISHER_MAX_RECOVERY_QUEUE_SIZE)
+                .setMaxBatchSize(PUBLISHER_MAX_BATCH_QUEUE_SIZE).build();
+
+        Mockito.when(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                dmaapMRPublisherConfig, dmaapMRPublisherQueueFactory, closeableHttpClient);
+        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.forcePublish(getTwoSampleMessages());
+        assertThat(response.getResponseCode(), is(200));
+    }
+
+    @Test
+    public void testForcePublishFailure() throws Exception {
+        Mockito.when(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(503, "Message successfully posted"));
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.forcePublish(getTwoSampleMessages());
+        assertThat(response.getResponseCode(), is(503));
+    }
+
+    @Rule
+    public ExpectedException httpIOException = ExpectedException.none();
+
+    @Test
+    public void testForcePublishHttpFailure() throws Exception {
+
+        httpIOException.expect(DCAEAnalyticsRuntimeException.class);
+        httpIOException.expectCause(isA(IOException.class));
+
+        given(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class))).willThrow(IOException.class);
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+        dmaapMRPublisherImpl.forcePublish(getTwoSampleMessages());
+    }
+
+    @Test
+    public void testFlushSuccessful() throws Exception {
+        Mockito.when(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));
+
+        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(getTwoSampleMessages());
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.flush();
+        assertThat(response.getResponseCode(), is(200));
+    }
+
+    @Test
+    public void testFlushEmptyList() throws Exception {
+        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(new ArrayList<String>());
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+        DMaaPMRPublisherResponse response = dmaapMRPublisherImpl.flush();
+        assertThat(response.getResponseCode(), is(204));
+    }
+
+    @Test
+    public void testClose() throws Exception {
+        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(new ArrayList<String>());
+        Mockito.when(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, "Message successfully posted"));
+        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(getTwoSampleMessages());
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+        dmaapMRPublisherImpl.close();
+        verify(closeableHttpClient).execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class));
+    }
+
+    @Test
+    public void testCloseUnsuccessful() throws Exception {
+        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(new ArrayList<String>());
+        Mockito.when(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(400, "Message successfully posted"));
+        Mockito.when(dmaapMRPublisherQueue.getMessageForPublishing()).thenReturn(getTwoSampleMessages());
+
+        DMaaPMRPublisherImpl dmaapMRPublisherImpl = new DMaaPMRPublisherImpl(
+                getPublisherConfig(), dmaapMRPublisherQueueFactory, closeableHttpClient);
+        dmaapMRPublisherImpl.close();
+        verify(closeableHttpClient, times(6)).execute(Mockito.any(HttpUriRequest.class),
+                Mockito.any(ResponseHandler.class));
+    }
+}
@@ -1,59 +1,59 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponseImpl;\r
-\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/21/2016.\r
- */\r
-public class DMaaPMRPublisherMockImpl implements  DMaaPMRPublisher {\r
-\r
-    @Override\r
-    public DMaaPMRPublisherResponse publish(List<String> messages) throws DCAEAnalyticsRuntimeException {\r
-        return new DMaaPMRPublisherResponseImpl(102, "Mock Response", 100);\r
-    }\r
-\r
-    @Override\r
-    public DMaaPMRPublisherResponse forcePublish(List<String> messages) throws DCAEAnalyticsRuntimeException {\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    public DMaaPMRPublisherResponse flush() {\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    public Date getPublisherCreationTime() {\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    public void close() throws Exception {\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponseImpl;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/21/2016.
+ */
+public class DMaaPMRPublisherMockImpl implements  DMaaPMRPublisher {
+
+    @Override
+    public DMaaPMRPublisherResponse publish(List<String> messages) throws DCAEAnalyticsRuntimeException {
+        return new DMaaPMRPublisherResponseImpl(102, "Mock Response", 100);
+    }
+
+    @Override
+    public DMaaPMRPublisherResponse forcePublish(List<String> messages) throws DCAEAnalyticsRuntimeException {
+        return null;
+    }
+
+    @Override
+    public DMaaPMRPublisherResponse flush() {
+        return null;
+    }
+
+    @Override
+    public Date getPublisherCreationTime() {
+        return null;
+    }
+
+    @Override
+    public void close() throws Exception {
+
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;\r
-\r
-import java.util.List;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/2/2016.\r
- */\r
-public class DMaaPMRPublisherQueueImplTest extends BaseAnalyticsDMaaPUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testAddBatchMessages() throws Exception {\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-        // add two more message to batch queue\r
-        final int batchMessagesSizeAfterSecondInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 4", batchMessagesSizeAfterSecondInsert == 4);\r
-        // Now get all messages which must drain out batch queue\r
-        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();\r
-        assertTrue("There must be 4 messages to publish", messagesToPublish.size() == 4);\r
-        assertTrue("Batch Queue must be empty", publisherQueue.getBatchQueueRemainingSize() == 10);\r
-\r
-    }\r
-\r
-    @Test(expected = IllegalStateException.class)\r
-    public void testAddBatchMessagesWhenQueueSizeIsFull() throws Exception {\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(2, 20);\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-        // add 2 more messages should now throw IllegalStateException\r
-        publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-    }\r
-\r
-    @Test\r
-    public void testAddRecoverableMessages() throws Exception {\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-        // add two recoverable messages\r
-        final int recoverableMessageSizeAfterFirstInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 2 after first insert",\r
-                recoverableMessageSizeAfterFirstInsert == 2);\r
-        // add two more recoverable messages\r
-        final int recoverableMessageSizeAfterSecondInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 4 after second insert",\r
-                recoverableMessageSizeAfterSecondInsert == 4);\r
-        // Now get all messages which must drain out batch queue\r
-        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();\r
-        assertTrue("There must be 6 messages to publish", messagesToPublish.size() == 6);\r
-        assertTrue("Batch Queue must be empty", publisherQueue.getBatchQueueRemainingSize() == 10);\r
-        assertTrue("Recovery Queue must be empty", publisherQueue.getRecoveryQueueRemainingSize() == 20);\r
-    }\r
-\r
-\r
-    @Test(expected = IllegalStateException.class)\r
-    public void testAddRecoverableMessagesWhenRecoveryQueueIsFull() throws Exception {\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 2);\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-        // add two recoverable messages\r
-        final int recoverableMessageSizeAfterFirstInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 2 after first insert",\r
-                recoverableMessageSizeAfterFirstInsert == 2);\r
-        // add two more recoverable messages which should throw IllegalStateException\r
-        publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-    }\r
-\r
-    @Test\r
-    public void testGetMessageForPublishing() throws Exception {\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-        // add two recoverable messages\r
-        final int recoverableMessageSizeAfterFirstInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 2 after first insert",\r
-                recoverableMessageSizeAfterFirstInsert == 2);\r
-        // add two more recoverable messages\r
-        final int recoverableMessageSizeAfterSecondInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 4 after second insert",\r
-                recoverableMessageSizeAfterSecondInsert == 4);\r
-        // Now get all messages which must drain out batch queue\r
-        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();\r
-        assertTrue("There must be 6 messages to publish", messagesToPublish.size() == 6);\r
-        // add two more batch and recovery messages\r
-        final int batchQueueSize = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        final int recoveryQueueSize = publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        final int messagePublishCount = publisherQueue.getMessageForPublishing().size();\r
-        assertTrue("Batch Queue + Recovery Queue message total must batch publish message count",\r
-                messagePublishCount == (batchQueueSize + recoveryQueueSize));\r
-        assertTrue("Batch Queue must be empty", publisherQueue.getBatchQueueRemainingSize() == 10);\r
-        assertTrue("Recovery Queue must be empty", publisherQueue.getRecoveryQueueRemainingSize() == 20);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testGetBatchQueueRemainingSize() throws Exception {\r
-\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-        assertTrue("Batch remaining capacity should be reduced by 2",\r
-                publisherQueue.getBatchQueueRemainingSize() == 8);\r
-\r
-        // add two recoverable messages\r
-        final int recoverableMessageSizeAfterFirstInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 2 after first insert",\r
-                recoverableMessageSizeAfterFirstInsert == 2);\r
-\r
-        // recoverable message should not change batch queue capacity\r
-        assertTrue("Adding recoverable Message must not have any impact on batch queue remaining capacity ",\r
-                publisherQueue.getBatchQueueRemainingSize() == 8);\r
-        // Now get all messages which must drain out batch queue\r
-        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();\r
-        assertTrue("There must be exactly 4 messages to publish", messagesToPublish.size() == 4);\r
-\r
-        // Batch queue remaining capacity should now match original batch size\r
-        assertTrue("Batch Queue remaining capacity must match original batch queue size", publisherQueue\r
-                .getBatchQueueRemainingSize() == 10);\r
-    }\r
-\r
-    @Test\r
-    public void testGetRecoveryQueueRemainingSize() throws Exception {\r
-        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);\r
-\r
-        // add two recoverable messages\r
-        final int recoverableMessageSizeAfterFirstInsert =\r
-                publisherQueue.addRecoverableMessages(getTwoSampleMessages());\r
-        assertTrue("Recovery Message Queue size must be 2 after first insert",\r
-                recoverableMessageSizeAfterFirstInsert == 2);\r
-        assertTrue("Recovery Queue remaining capacity should be reduced by 2",\r
-                publisherQueue.getRecoveryQueueRemainingSize() == 18);\r
-\r
-        // add two messages to batch queue\r
-        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());\r
-        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);\r
-\r
-        // batch message should not change recoverable queue capacity\r
-        assertTrue("Adding batch queue Message must not have any impact on recovery queue remaining capacity ",\r
-                publisherQueue.getRecoveryQueueRemainingSize() == 18);\r
-\r
-        // Now get all messages which must drain out recovery queue\r
-        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();\r
-        assertTrue("There must be exactly 4 messages to publish", messagesToPublish.size() == 4);\r
-\r
-        // Recoverable queue remaining capacity should now match original recovery queue size\r
-        assertTrue("Recoverable Queue remaining capacity must match original batch queue size", publisherQueue\r
-                .getRecoveryQueueRemainingSize() == 20);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;
+
+import java.util.List;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/2/2016.
+ */
+public class DMaaPMRPublisherQueueImplTest extends BaseAnalyticsDMaaPUnitTest {
+
+
+    @Test
+    public void testAddBatchMessages() throws Exception {
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+        // add two more message to batch queue
+        final int batchMessagesSizeAfterSecondInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 4", batchMessagesSizeAfterSecondInsert == 4);
+        // Now get all messages which must drain out batch queue
+        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();
+        assertTrue("There must be 4 messages to publish", messagesToPublish.size() == 4);
+        assertTrue("Batch Queue must be empty", publisherQueue.getBatchQueueRemainingSize() == 10);
+
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testAddBatchMessagesWhenQueueSizeIsFull() throws Exception {
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(2, 20);
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+        // add 2 more messages should now throw IllegalStateException
+        publisherQueue.addBatchMessages(getTwoSampleMessages());
+    }
+
+    @Test
+    public void testAddRecoverableMessages() throws Exception {
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+        // add two recoverable messages
+        final int recoverableMessageSizeAfterFirstInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 2 after first insert",
+                recoverableMessageSizeAfterFirstInsert == 2);
+        // add two more recoverable messages
+        final int recoverableMessageSizeAfterSecondInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 4 after second insert",
+                recoverableMessageSizeAfterSecondInsert == 4);
+        // Now get all messages which must drain out batch queue
+        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();
+        assertTrue("There must be 6 messages to publish", messagesToPublish.size() == 6);
+        assertTrue("Batch Queue must be empty", publisherQueue.getBatchQueueRemainingSize() == 10);
+        assertTrue("Recovery Queue must be empty", publisherQueue.getRecoveryQueueRemainingSize() == 20);
+    }
+
+
+    @Test(expected = IllegalStateException.class)
+    public void testAddRecoverableMessagesWhenRecoveryQueueIsFull() throws Exception {
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 2);
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+        // add two recoverable messages
+        final int recoverableMessageSizeAfterFirstInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 2 after first insert",
+                recoverableMessageSizeAfterFirstInsert == 2);
+        // add two more recoverable messages which should throw IllegalStateException
+        publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+    }
+
+    @Test
+    public void testGetMessageForPublishing() throws Exception {
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+        // add two recoverable messages
+        final int recoverableMessageSizeAfterFirstInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 2 after first insert",
+                recoverableMessageSizeAfterFirstInsert == 2);
+        // add two more recoverable messages
+        final int recoverableMessageSizeAfterSecondInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 4 after second insert",
+                recoverableMessageSizeAfterSecondInsert == 4);
+        // Now get all messages which must drain out batch queue
+        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();
+        assertTrue("There must be 6 messages to publish", messagesToPublish.size() == 6);
+        // add two more batch and recovery messages
+        final int batchQueueSize = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        final int recoveryQueueSize = publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        final int messagePublishCount = publisherQueue.getMessageForPublishing().size();
+        assertTrue("Batch Queue + Recovery Queue message total must batch publish message count",
+                messagePublishCount == (batchQueueSize + recoveryQueueSize));
+        assertTrue("Batch Queue must be empty", publisherQueue.getBatchQueueRemainingSize() == 10);
+        assertTrue("Recovery Queue must be empty", publisherQueue.getRecoveryQueueRemainingSize() == 20);
+
+    }
+
+    @Test
+    public void testGetBatchQueueRemainingSize() throws Exception {
+
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+        assertTrue("Batch remaining capacity should be reduced by 2",
+                publisherQueue.getBatchQueueRemainingSize() == 8);
+
+        // add two recoverable messages
+        final int recoverableMessageSizeAfterFirstInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 2 after first insert",
+                recoverableMessageSizeAfterFirstInsert == 2);
+
+        // recoverable message should not change batch queue capacity
+        assertTrue("Adding recoverable Message must not have any impact on batch queue remaining capacity ",
+                publisherQueue.getBatchQueueRemainingSize() == 8);
+        // Now get all messages which must drain out batch queue
+        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();
+        assertTrue("There must be exactly 4 messages to publish", messagesToPublish.size() == 4);
+
+        // Batch queue remaining capacity should now match original batch size
+        assertTrue("Batch Queue remaining capacity must match original batch queue size", publisherQueue
+                .getBatchQueueRemainingSize() == 10);
+    }
+
+    @Test
+    public void testGetRecoveryQueueRemainingSize() throws Exception {
+        DMaaPMRPublisherQueue publisherQueue = new DMaaPMRPublisherQueueImpl(10, 20);
+
+        // add two recoverable messages
+        final int recoverableMessageSizeAfterFirstInsert =
+                publisherQueue.addRecoverableMessages(getTwoSampleMessages());
+        assertTrue("Recovery Message Queue size must be 2 after first insert",
+                recoverableMessageSizeAfterFirstInsert == 2);
+        assertTrue("Recovery Queue remaining capacity should be reduced by 2",
+                publisherQueue.getRecoveryQueueRemainingSize() == 18);
+
+        // add two messages to batch queue
+        final int batchMessagesSizeAfterFirstInsert = publisherQueue.addBatchMessages(getTwoSampleMessages());
+        assertTrue("Batch Message Queue size must be 2", batchMessagesSizeAfterFirstInsert == 2);
+
+        // batch message should not change recoverable queue capacity
+        assertTrue("Adding batch queue Message must not have any impact on recovery queue remaining capacity ",
+                publisherQueue.getRecoveryQueueRemainingSize() == 18);
+
+        // Now get all messages which must drain out recovery queue
+        final List<String> messagesToPublish = publisherQueue.getMessageForPublishing();
+        assertTrue("There must be exactly 4 messages to publish", messagesToPublish.size() == 4);
+
+        // Recoverable queue remaining capacity should now match original recovery queue size
+        assertTrue("Recoverable Queue remaining capacity must match original batch queue size", publisherQueue
+                .getRecoveryQueueRemainingSize() == 20);
+    }
+
+}
@@ -1,53 +1,53 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.publisher;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * @author Manjesh Gowda. Creation Date: 11/7/2016.\r
- */\r
-public class DMaaPMRPublisherQueueMockImpl implements DMaaPMRPublisherQueue {\r
-    @Override\r
-    public int addBatchMessages(List<String> batchMessages) throws IllegalStateException {\r
-        return 100;\r
-    }\r
-\r
-    @Override\r
-    public int addRecoverableMessages(List<String> recoverableMessages) throws IllegalStateException {\r
-        return 0;\r
-    }\r
-\r
-    @Override\r
-    public List<String> getMessageForPublishing() {\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    public int getBatchQueueRemainingSize() {\r
-        return 0;\r
-    }\r
-\r
-    @Override\r
-    public int getRecoveryQueueRemainingSize() {\r
-        return 0;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.publisher;
+
+import java.util.List;
+
+/**
+ * @author Manjesh Gowda. Creation Date: 11/7/2016.
+ */
+public class DMaaPMRPublisherQueueMockImpl implements DMaaPMRPublisherQueue {
+    @Override
+    public int addBatchMessages(List<String> batchMessages) throws IllegalStateException {
+        return 100;
+    }
+
+    @Override
+    public int addRecoverableMessages(List<String> recoverableMessages) throws IllegalStateException {
+        return 0;
+    }
+
+    @Override
+    public List<String> getMessageForPublishing() {
+        return null;
+    }
+
+    @Override
+    public int getBatchQueueRemainingSize() {
+        return 0;
+    }
+
+    @Override
+    public int getRecoveryQueueRemainingSize() {
+        return 0;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.subscriber;\r
-\r
-import com.jayway.jsonassert.impl.matcher.IsCollectionWithSize;\r
-import org.apache.commons.lang3.tuple.ImmutablePair;\r
-import org.apache.http.client.ResponseHandler;\r
-import org.apache.http.client.methods.HttpUriRequest;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.junit.After;\r
-import org.junit.Before;\r
-import org.junit.Rule;\r
-import org.junit.Test;\r
-import org.junit.rules.ExpectedException;\r
-import org.junit.runner.RunWith;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.junit.MockitoJUnitRunner;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-\r
-import java.io.IOException;\r
-import java.util.Random;\r
-import java.util.UUID;\r
-\r
-import static org.hamcrest.CoreMatchers.isA;\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.hamcrest.core.Is.is;\r
-import static org.mockito.BDDMockito.given;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/21/2016.\r
- */\r
-@RunWith(MockitoJUnitRunner.class)\r
-public class DMaaPMRSubscriberImplTest extends BaseAnalyticsDMaaPUnitTest {\r
-\r
-    @Mock\r
-    private CloseableHttpClient closeableHttpClient;\r
-\r
-    private String consumerGroup, consumerId;\r
-\r
-    @Before\r
-    public void setUp() throws Exception {\r
-        Random random = new Random(10000L);\r
-        consumerGroup = "Test-Consumer-Group" + Long.toString(random.nextLong());\r
-        consumerId = UUID.randomUUID().toString();\r
-    }\r
-\r
-    @After\r
-    public void tearDown() throws Exception {\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testSubscriberSuccessfullyReceiveDmaapMessage() throws Exception {\r
-\r
-        String testMessages = "[{\"message\":\"I'm Object 1 Message\"}," +\r
-                "{\"message\":\"I'm Object 2 Message\"}]";\r
-        Mockito.when(\r
-                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, testMessages));\r
-\r
-        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(\r
-                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);\r
-        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();\r
-        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));\r
-        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(2));\r
-    }\r
-\r
-    @Test\r
-    public void testSubscriberSuccessfullyReceiveDmaapMessageWithNoUsername() throws Exception {\r
-\r
-        DMaaPMRSubscriberConfig dmaapMRSubscriberConfig = new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)\r
-                .setPortNumber(PORT_NUMBER)\r
-                .setProtocol(HTTP_PROTOCOL)\r
-                .setContentType(CONTENT_TYPE)\r
-                .setConsumerGroup(consumerGroup != null ? consumerGroup : SUBSCRIBER_CONSUMER_GROUP_NAME)\r
-                .setConsumerId(consumerId != null ? consumerId : SUBSCRIBER_CONSUMER_ID)\r
-                .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)\r
-                .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT).build();\r
-\r
-        String testMessages = "[{\"message\":\"I'm Object 1 Message\"}," +\r
-                "{\"message\":\"I'm Object 2 Message\"}]";\r
-        Mockito.when(\r
-                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, testMessages));\r
-\r
-        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(\r
-                dmaapMRSubscriberConfig, closeableHttpClient);\r
-        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();\r
-        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));\r
-        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(2));\r
-    }\r
-\r
-    @Test\r
-    public void testSubscriberSuccessfullyReceiveNoDmaapMessage() throws Exception {\r
-        Mockito.when(\r
-                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(200, null));\r
-\r
-        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(\r
-                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);\r
-        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();\r
-        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));\r
-        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(0));\r
-    }\r
-\r
-    @Test\r
-    public void testSubscriberSuccessfullyReceiveErrorMessage() throws Exception {\r
-        Mockito.when(\r
-                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))\r
-                .thenReturn(new ImmutablePair<>(400, "Bad Request"));\r
-\r
-        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(\r
-                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);\r
-        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();\r
-        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(400));\r
-        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(0));\r
-    }\r
-\r
-    @Rule\r
-    public ExpectedException httpIOException = ExpectedException.none();\r
-\r
-    @Test\r
-    public void testSubscriberSuccessfullyReceiveException() throws Exception {\r
-\r
-        httpIOException.expect(DCAEAnalyticsRuntimeException.class);\r
-        httpIOException.expectCause(isA(IOException.class));\r
-\r
-        given(closeableHttpClient.execute(\r
-                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class))).willThrow(IOException.class);\r
-\r
-        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(\r
-                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);\r
-        dmaapMRSubscriberImpl.fetchMessages();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.subscriber;
+
+import com.jayway.jsonassert.impl.matcher.IsCollectionWithSize;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.BaseAnalyticsDMaaPUnitTest;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+
+import java.io.IOException;
+import java.util.Random;
+import java.util.UUID;
+
+import static org.hamcrest.CoreMatchers.isA;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+import static org.mockito.BDDMockito.given;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/21/2016.
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class DMaaPMRSubscriberImplTest extends BaseAnalyticsDMaaPUnitTest {
+
+    @Mock
+    private CloseableHttpClient closeableHttpClient;
+
+    private String consumerGroup, consumerId;
+
+    @Before
+    public void setUp() throws Exception {
+        Random random = new Random(10000L);
+        consumerGroup = "Test-Consumer-Group" + Long.toString(random.nextLong());
+        consumerId = UUID.randomUUID().toString();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+
+    }
+
+    @Test
+    public void testSubscriberSuccessfullyReceiveDmaapMessage() throws Exception {
+
+        String testMessages = "[{\"message\":\"I'm Object 1 Message\"}," +
+                "{\"message\":\"I'm Object 2 Message\"}]";
+        Mockito.when(
+                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, testMessages));
+
+        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(
+                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);
+        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();
+        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));
+        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(2));
+    }
+
+    @Test
+    public void testSubscriberSuccessfullyReceiveDmaapMessageWithNoUsername() throws Exception {
+
+        DMaaPMRSubscriberConfig dmaapMRSubscriberConfig = new DMaaPMRSubscriberConfig.Builder(HOST_NAME, TOPIC_NAME)
+                .setPortNumber(PORT_NUMBER)
+                .setProtocol(HTTP_PROTOCOL)
+                .setContentType(CONTENT_TYPE)
+                .setConsumerGroup(consumerGroup != null ? consumerGroup : SUBSCRIBER_CONSUMER_GROUP_NAME)
+                .setConsumerId(consumerId != null ? consumerId : SUBSCRIBER_CONSUMER_ID)
+                .setTimeoutMS(SUBSCRIBER_TIMEOUT_MS)
+                .setMessageLimit(SUBSCRIBER_MESSAGE_LIMIT).build();
+
+        String testMessages = "[{\"message\":\"I'm Object 1 Message\"}," +
+                "{\"message\":\"I'm Object 2 Message\"}]";
+        Mockito.when(
+                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, testMessages));
+
+        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(
+                dmaapMRSubscriberConfig, closeableHttpClient);
+        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();
+        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));
+        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(2));
+    }
+
+    @Test
+    public void testSubscriberSuccessfullyReceiveNoDmaapMessage() throws Exception {
+        Mockito.when(
+                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(200, null));
+
+        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(
+                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);
+        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();
+        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(200));
+        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(0));
+    }
+
+    @Test
+    public void testSubscriberSuccessfullyReceiveErrorMessage() throws Exception {
+        Mockito.when(
+                closeableHttpClient.execute(Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class)))
+                .thenReturn(new ImmutablePair<>(400, "Bad Request"));
+
+        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(
+                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);
+        DMaaPMRSubscriberResponse dmaapMRSubscriberResponse = dmaapMRSubscriberImpl.fetchMessages();
+        assertThat(dmaapMRSubscriberResponse.getResponseCode(), is(400));
+        assertThat(dmaapMRSubscriberResponse.getFetchedMessages(), IsCollectionWithSize.hasSize(0));
+    }
+
+    @Rule
+    public ExpectedException httpIOException = ExpectedException.none();
+
+    @Test
+    public void testSubscriberSuccessfullyReceiveException() throws Exception {
+
+        httpIOException.expect(DCAEAnalyticsRuntimeException.class);
+        httpIOException.expectCause(isA(IOException.class));
+
+        given(closeableHttpClient.execute(
+                Mockito.any(HttpUriRequest.class), Mockito.any(ResponseHandler.class))).willThrow(IOException.class);
+
+        DMaaPMRSubscriberImpl dmaapMRSubscriberImpl = new DMaaPMRSubscriberImpl(
+                getSubscriberConfig(consumerId, consumerGroup), closeableHttpClient);
+        dmaapMRSubscriberImpl.fetchMessages();
+    }
+
+}
@@ -1,48 +1,48 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.dmaap.service.subscriber;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;\r
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponseImpl;\r
-\r
-import java.util.Date;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/21/2016.\r
- */\r
-public class DMaaPMRSubscriberMockImpl implements DMaaPMRSubscriber {\r
-\r
-    @Override\r
-    public DMaaPMRSubscriberResponse fetchMessages() throws DCAEAnalyticsRuntimeException {\r
-        return new DMaaPMRSubscriberResponseImpl(102, "Mock Response", null);\r
-    }\r
-\r
-    @Override\r
-    public Date getSubscriberCreationTime() {\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    public void close() throws Exception {\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.dmaap.service.subscriber;
+
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponseImpl;
+
+import java.util.Date;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/21/2016.
+ */
+public class DMaaPMRSubscriberMockImpl implements DMaaPMRSubscriber {
+
+    @Override
+    public DMaaPMRSubscriberResponse fetchMessages() throws DCAEAnalyticsRuntimeException {
+        return new DMaaPMRSubscriberResponseImpl(102, "Mock Response", null);
+    }
+
+    @Override
+    public Date getSubscriberCreationTime() {
+        return null;
+    }
+
+    @Override
+    public void close() throws Exception {
+
+    }
+}
index 4857522..78cbdfa 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration debug="false">\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration debug="false">
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.cucumber;
+package org.onap.dcae.apod.analytics.it.cucumber;
 
 import cucumber.api.CucumberOptions;
 import cucumber.api.SnippetType;
@@ -33,7 +33,7 @@ import org.junit.runner.RunWith;
 @CucumberOptions(
         plugin = {"pretty", "json:target/cucumber/cucumber.json", "html:target/cucumber"},
         features = {"src/test/resources/cucumber/features/dmaap"},
-        glue = {"org.openecomp.dcae.apod.analytics.it.cucumber.steps"},
+        glue = {"org.onap.dcae.apod.analytics.it.cucumber.steps"},
         snippets = SnippetType.CAMELCASE
 )
 public class CucumberRunnerIT {
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.cucumber.steps;
+package org.onap.dcae.apod.analytics.it.cucumber.steps;
 
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
@@ -26,14 +26,14 @@ import cucumber.api.java.en.And;
 import cucumber.api.java.en.Given;
 import cucumber.api.java.en.Then;
 import cucumber.api.java.en.When;
-import org.openecomp.dcae.apod.analytics.common.utils.HTTPUtils;
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
-import org.openecomp.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
-import org.openecomp.dcae.apod.analytics.it.dmaap.DMaaPMRCreator;
-import org.openecomp.dcae.apod.analytics.it.util.StepUtils;
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;
+import org.onap.dcae.apod.analytics.common.utils.HTTPUtils;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRPublisherResponse;
+import org.onap.dcae.apod.analytics.dmaap.domain.response.DMaaPMRSubscriberResponse;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.it.dmaap.DMaaPMRCreator;
+import org.onap.dcae.apod.analytics.it.util.StepUtils;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsIT;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.dmaap;
+package org.onap.dcae.apod.analytics.it.dmaap;
 
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
 
 import java.util.Map;
 
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.dmaap;
+package org.onap.dcae.apod.analytics.it.dmaap;
 
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
-import org.openecomp.dcae.apod.analytics.dmaap.DMaaPMRFactory;
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
-import org.openecomp.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
-import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
-import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
+import org.onap.dcae.apod.analytics.dmaap.DMaaPMRFactory;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRPublisherConfig;
+import org.onap.dcae.apod.analytics.dmaap.domain.config.DMaaPMRSubscriberConfig;
+import org.onap.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
+import org.onap.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
 
 import java.util.HashMap;
 import java.util.Map;
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.module;
+package org.onap.dcae.apod.analytics.it.module;
 
 import com.google.inject.Binder;
 import com.google.inject.Module;
 import com.google.inject.name.Names;
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
-import org.openecomp.dcae.apod.analytics.it.dmaap.DMaaPMRCreator;
-import org.openecomp.dcae.apod.analytics.it.dmaap.DMaaPMRCreatorImpl;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.it.dmaap.DMaaPMRCreator;
+import org.onap.dcae.apod.analytics.it.dmaap.DMaaPMRCreatorImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.plugins;
+package org.onap.dcae.apod.analytics.it.plugins;
 
 import co.cask.cdap.api.data.format.StructuredRecord;
 import co.cask.cdap.api.dataset.table.Table;
@@ -46,11 +46,11 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
-import org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap.DMaaPMRReceiver;
-import org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap.DMaaPMRSource;
-import org.openecomp.dcae.apod.analytics.it.dmaap.DMaaPMRCreator;
-import org.openecomp.dcae.apod.analytics.it.module.AnalyticsITInjectorSource;
+import org.onap.dcae.apod.analytics.cdap.plugins.domain.config.dmaap.DMaaPMRSourcePluginConfig;
+import org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap.DMaaPMRReceiver;
+import org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap.DMaaPMRSource;
+import org.onap.dcae.apod.analytics.it.dmaap.DMaaPMRCreator;
+import org.onap.dcae.apod.analytics.it.module.AnalyticsITInjectorSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -18,7 +18,7 @@
  *  ============================LICENSE_END===========================================
  */
 
-package org.openecomp.dcae.apod.analytics.it.util;
+package org.onap.dcae.apod.analytics.it.util;
 
 /**
  * @author Rajiv Singla . Creation Date: 2/2/2017.
index 0773e97..be4ab61 100644 (file)
@@ -18,4 +18,4 @@
 #  ============================LICENSE_END===========================================
 #
 
-guice.injector-source=org.openecomp.dcae.apod.analytics.it.module.AnalyticsITInjectorSource
+guice.injector-source=org.onap.dcae.apod.analytics.it.module.AnalyticsITInjectorSource
index 255532f..54c8fef 100644 (file)
@@ -38,7 +38,7 @@
 
     <logger name="org.apache.twill" level="WARN"/>
     <logger name="co.cask.cdap" level="WARN"/>
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
 
     <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
         <encoder>
index 0e54923..e130edd 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-model</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS MODELS COMMON FOR ALL DCAE ANALYTICS MODULES.\r
-     NOTE: THIS MODULE MUST NOT DEPEND ON ANY OTHER ANALYTICS MODULE IN COMPILE SCOPE. -->\r
-    <name>DCAE Analytics Model</name>\r
-    <description>Contains models (e.g. Common Event Format) which are common to DCAE Analytics</description>\r
-\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-        <sonar.sources>target/generated-sources/delombok</sonar.sources>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <!-- UTILITIES -->\r
-        <dependency>\r
-            <groupId>com.google.guava</groupId>\r
-            <artifactId>guava</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-        </dependency>\r
-\r
-        <!-- CODE GENERATION -->\r
-        <!-- NOTE: Lombok must remain in provided scope. Use delomok to generate code -->\r
-        <dependency>\r
-            <groupId>org.projectlombok</groupId>\r
-            <artifactId>lombok</artifactId>\r
-        </dependency>\r
-\r
-        <!-- JACKSON JSON -->\r
-        <dependency>\r
-            <groupId>com.fasterxml.jackson.core</groupId>\r
-            <artifactId>jackson-core</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.fasterxml.jackson.core</groupId>\r
-            <artifactId>jackson-databind</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.fasterxml.jackson.core</groupId>\r
-            <artifactId>jackson-annotations</artifactId>\r
-        </dependency>\r
-\r
-\r
-        <!-- JSON PATH -->\r
-        <dependency>\r
-            <groupId>com.jayway.jsonpath</groupId>\r
-            <artifactId>json-path</artifactId>\r
-        </dependency>\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-\r
-    <build>\r
-        <sourceDirectory>${project.build.directory}/generated-sources/delombok</sourceDirectory>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.projectlombok</groupId>\r
-                <artifactId>lombok-maven-plugin</artifactId>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>dcae-analytics</artifactId>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-model</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS MODELS COMMON FOR ALL DCAE ANALYTICS MODULES.
+     NOTE: THIS MODULE MUST NOT DEPEND ON ANY OTHER ANALYTICS MODULE IN COMPILE SCOPE. -->
+    <name>DCAE Analytics Model</name>
+    <description>Contains models (e.g. Common Event Format) which are common to DCAE Analytics</description>
+
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+        <sonar.sources>target/generated-sources/delombok</sonar.sources>
+    </properties>
+
+    <dependencies>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- UTILITIES -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+        </dependency>
+
+        <!-- CODE GENERATION -->
+        <!-- NOTE: Lombok must remain in provided scope. Use delomok to generate code -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
+        <!-- JACKSON JSON -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+
+
+        <!-- JSON PATH -->
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path</artifactId>
+        </dependency>
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <sourceDirectory>${project.build.directory}/generated-sources/delombok</sourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.projectlombok</groupId>
+                <artifactId>lombok-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>
@@ -1,69 +1,69 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model;\r
-\r
-import lombok.Data;\r
-\r
-import java.util.LinkedHashMap;\r
-import java.util.Map;\r
-\r
-/**\r
- * <p>\r
- *     Base Dynamic Provider provide functionality so that all the\r
- *     additional dynamic Properties can be accumalated in a map.\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-@Data\r
-public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider {\r
-\r
-    /**\r
-     * All non-required properties should be captured in additional properties\r
-     *\r
-     * @param dynamicProperties Dynamic properties\r
-     * @return dynamic properties\r
-     */\r
-    private Map<String, Object> dynamicProperties = new LinkedHashMap<>();\r
-\r
-\r
-    /**\r
-     * Add a dynamic property to Common Event Format Entity\r
-     *\r
-     * @param propertyName property name\r
-     * @param propertyValue property value\r
-     */\r
-    @Override\r
-    public void addDynamicProperties(String propertyName, Object propertyValue) {\r
-        dynamicProperties.put(propertyName, propertyValue);\r
-    }\r
-\r
-    /**\r
-     * Determines if dynamic properties are present for the CEF Entity\r
-     *\r
-     * @return return true if Dynamic Properties are present\r
-     */\r
-    public boolean isDynamicPropertiesPresent() {\r
-        return dynamicProperties.size() == 0;\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model;
+
+import lombok.Data;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * <p>
+ *     Base Dynamic Provider provide functionality so that all the
+ *     additional dynamic Properties can be accumalated in a map.
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider {
+
+    /**
+     * All non-required properties should be captured in additional properties
+     *
+     * @param dynamicProperties Dynamic properties
+     * @return dynamic properties
+     */
+    private Map<String, Object> dynamicProperties = new LinkedHashMap<>();
+
+
+    /**
+     * Add a dynamic property to Common Event Format Entity
+     *
+     * @param propertyName property name
+     * @param propertyValue property value
+     */
+    @Override
+    public void addDynamicProperties(String propertyName, Object propertyValue) {
+        dynamicProperties.put(propertyName, propertyValue);
+    }
+
+    /**
+     * Determines if dynamic properties are present for the CEF Entity
+     *
+     * @return return true if Dynamic Properties are present
+     */
+    public boolean isDynamicPropertiesPresent() {
+        return dynamicProperties.size() == 0;
+    }
+
+
+}
@@ -1,32 +1,32 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * <p>\r
- *     Marker Interface for all DCAE Analytics Model implementations\r
- * </p>\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public interface DCAEAnalyticsModel extends Serializable {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *     Marker Interface for all DCAE Analytics Model implementations
+ * </p>
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public interface DCAEAnalyticsModel extends Serializable {
+}
@@ -1,56 +1,56 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model;\r
-\r
-import java.util.Map;\r
-\r
-/**\r
- * <p>\r
- *      Problem: Many Entities have dynamic properties as well as known properties.\r
- *      Known properites can be binded explicitly with all dynamic properties need\r
- *      to be captured also ensuring that there must not be any loss in information\r
- *      during deserialization / serialization process.\r
- * </p>\r
- * <p>\r
- *     This contract allows the deserialization mechanism to catch those dynamic properties\r
- *     in a Map so that deserialization mechanism will not loose any information and\r
- *     can be serialized back with no loss in dynamic properties information\r
- * </p>\r
- * @author Rajiv Singla . Creation Date: 10/18/2016.\r
- */\r
-public interface DynamicPropertiesProvider extends DCAEAnalyticsModel {\r
-\r
-\r
-    /**\r
-     * Adds dynamic properties in a Map object\r
-     *\r
-     * @param propertyName property name\r
-     * @param propertyValue property value\r
-     */\r
-    void addDynamicProperties(String propertyName, Object propertyValue);\r
-\r
-    /**\r
-     * Provides dynamic properties map\r
-     *\r
-     * @return dynamic properties map object\r
-     */\r
-    Map<String, Object> getDynamicProperties();\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model;
+
+import java.util.Map;
+
+/**
+ * <p>
+ *      Problem: Many Entities have dynamic properties as well as known properties.
+ *      Known properites can be binded explicitly with all dynamic properties need
+ *      to be captured also ensuring that there must not be any loss in information
+ *      during deserialization / serialization process.
+ * </p>
+ * <p>
+ *     This contract allows the deserialization mechanism to catch those dynamic properties
+ *     in a Map so that deserialization mechanism will not loose any information and
+ *     can be serialized back with no loss in dynamic properties information
+ * </p>
+ * @author Rajiv Singla . Creation Date: 10/18/2016.
+ */
+public interface DynamicPropertiesProvider extends DCAEAnalyticsModel {
+
+
+    /**
+     * Adds dynamic properties in a Map object
+     *
+     * @param propertyName property name
+     * @param propertyValue property value
+     */
+    void addDynamicProperties(String propertyName, Object propertyValue);
+
+    /**
+     * Provides dynamic properties map
+     *
+     * @return dynamic properties map object
+     */
+    Map<String, Object> getDynamicProperties();
+}
@@ -1,33 +1,33 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;\r
-\r
-/**\r
- * <p>\r
- *     Marker Interface for all Configuration Model Objects\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 08/25/2017.\r
- */\r
-public interface ConfigModel extends DCAEAnalyticsModel {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config;
+
+import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel;
+
+/**
+ * <p>
+ *     Marker Interface for all Configuration Model Objects
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 08/25/2017.
+ */
+public interface ConfigModel extends DCAEAnalyticsModel {
+}
@@ -1,37 +1,37 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;\r
-\r
-/**\r
- * <p>\r
- *     Base TCA App Config model class\r
- * </p>\r
- *\r
- * @author  Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public abstract class BaseTCAAppConfigModel extends BaseDynamicPropertiesProvider implements TCAAppConfigModel {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
+
+/**
+ * <p>
+ *     Base TCA App Config model class
+ * </p>
+ *
+ * @author  Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public abstract class BaseTCAAppConfigModel extends BaseDynamicPropertiesProvider implements TCAAppConfigModel {
+}
@@ -1,38 +1,38 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public abstract class BaseTCAHandle extends BaseTCAAppConfigModel {\r
-\r
-    private String aafPassword;\r
-    private String aafUserName;\r
-    private DMAAPInfo dmaapInfo;\r
-    private String type;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public abstract class BaseTCAHandle extends BaseTCAAppConfigModel {
+
+    private String aafPassword;
+    private String aafUserName;
+    private DMAAPInfo dmaapInfo;
+    private String type;
+
+}
@@ -1,45 +1,45 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * DMaaP Information nested inside DMaaP Controller config\r
- *\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class DMAAPInfo extends BaseTCAAppConfigModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * DMaaP Topic URL\r
-     *\r
-     * @param topicUrl new value for DMaaP topic URL\r
-     * @return DMaaP Topic URL\r
-     */\r
-    private String topicUrl;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * DMaaP Information nested inside DMaaP Controller config
+ *
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class DMAAPInfo extends BaseTCAAppConfigModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * DMaaP Topic URL
+     *
+     * @param topicUrl new value for DMaaP topic URL
+     * @return DMaaP Topic URL
+     */
+    private String topicUrl;
+
+}
@@ -1,37 +1,37 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class StreamsPublishes extends BaseTCAAppConfigModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private TCAHandleOut tcaHandleOut;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class StreamsPublishes extends BaseTCAAppConfigModel {
+
+    private static final long serialVersionUID = 1L;
+
+    private TCAHandleOut tcaHandleOut;
+
+}
@@ -1,37 +1,37 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class StreamsSubscribes extends BaseTCAAppConfigModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private TCAHandleIn tcaHandleIn;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class StreamsSubscribes extends BaseTCAAppConfigModel {
+
+    private static final long serialVersionUID = 1L;
+
+    private TCAHandleIn tcaHandleIn;
+
+}
@@ -1,34 +1,34 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.config.ConfigModel;\r
-\r
-/**\r
- * <p>\r
- *      Marker Interface for all TCA Facade Models\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public interface TCAAppConfigModel extends ConfigModel {\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import org.onap.dcae.apod.analytics.model.config.ConfigModel;
+
+/**
+ * <p>
+ *      Marker Interface for all TCA Facade Models
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public interface TCAAppConfigModel extends ConfigModel {
+
+}
@@ -1,42 +1,42 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Model Object Representing the App Config passed in by the controller\r
- *\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class TCAControllerAppConfig extends BaseTCAAppConfigModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private String appName;\r
-    private String appDescription;\r
-    private StreamsPublishes streamsPublishes;\r
-    private StreamsSubscribes streamsSubscribes;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Model Object Representing the App Config passed in by the controller
+ *
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TCAControllerAppConfig extends BaseTCAAppConfigModel {
+
+    private static final long serialVersionUID = 1L;
+
+    private String appName;
+    private String appDescription;
+    private StreamsPublishes streamsPublishes;
+    private StreamsSubscribes streamsSubscribes;
+
+}
@@ -1,39 +1,39 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * <p>\r
- *    TCA Controller App Config - TCA Handle In\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class TCAHandleIn extends BaseTCAHandle {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ *    TCA Controller App Config - TCA Handle In
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TCAHandleIn extends BaseTCAHandle {
+
+    private static final long serialVersionUID = 1L;
+
+}
@@ -1,39 +1,39 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.config.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * <p>\r
- *     TCA Controller App Config - TCA Handle Out\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class TCAHandleOut extends BaseTCAHandle {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.config.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ *     TCA Controller App Config - TCA Handle Out
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TCAHandleOut extends BaseTCAHandle {
+
+    private static final long serialVersionUID = 1L;
+
+}
@@ -1,32 +1,32 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-/**\r
- *  Common Event Format Alert Action\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public enum AlertAction implements CEFModel {\r
-\r
-    CLEAR, CONT, SET\r
-\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+/**
+ *  Common Event Format Alert Action
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public enum AlertAction implements CEFModel {
+
+    CLEAR, CONT, SET
+
 }
@@ -1,44 +1,44 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public enum AlertType implements CEFModel {\r
-\r
-    CARD_ANOMALY("CARD-ANOMALY"),\r
-    ELEMENT_ANOMALY("ELEMENT-ANOMALY"),\r
-    INTERFACE_ANOMALY("INTERFACE-ANOMALY"),\r
-    SERVICE_ANOMALY("SERVICE-ANOMALY"),\r
-    UNKNOWN(null);\r
-\r
-    private final String name;\r
-\r
-    AlertType(String name) {\r
-        this.name = name;\r
-    }\r
-\r
-    public String getName() {\r
-        return name;\r
-    }\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+/**
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public enum AlertType implements CEFModel {
+
+    CARD_ANOMALY("CARD-ANOMALY"),
+    ELEMENT_ANOMALY("ELEMENT-ANOMALY"),
+    INTERFACE_ANOMALY("INTERFACE-ANOMALY"),
+    SERVICE_ANOMALY("SERVICE-ANOMALY"),
+    UNKNOWN(null);
+
+    private final String name;
+
+    AlertType(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}
@@ -1,39 +1,39 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;\r
-\r
-/**\r
- * <p>\r
- *     Base CEF Model should be extended by all CEF Model Entities.\r
- *     By extending CEF Model all the additional dynamic Properties\r
- *     can be accumalated in a map.\r
- * </p>\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel {\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
+
+/**
+ * <p>
+ *     Base CEF Model should be extended by all CEF Model Entities.
+ *     By extending CEF Model all the additional dynamic Properties
+ *     can be accumalated in a map.
+ * </p>
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel {
+}
@@ -1,32 +1,32 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;\r
-\r
-/**\r
- * <p>\r
- *      Marker interface for all DCAE Analytics Common Event Format Model implementations\r
- * </p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public interface CEFModel extends DCAEAnalyticsModel {\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel;
+
+/**
+ * <p>
+ *      Marker interface for all DCAE Analytics Common Event Format Model implementations
+ * </p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public interface CEFModel extends DCAEAnalyticsModel {
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Fields common to all Events\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class CommonEventHeader extends BaseCEFModel {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * The eventing domain associated with this event\r
-     *\r
-     * @param domain New value for domain\r
-     * @return The eventing domain associated with this event\r
-     */\r
-    private Domain domain;\r
-\r
-    /**\r
-     * Event key that is unique to the event source\r
-     *\r
-     * @param eventId New value for event key\r
-     * @return Event key that is unique to the event source\r
-     */\r
-    private String eventId;\r
-\r
-    /**\r
-     * Unique event name\r
-     *\r
-     * @param eventName New value for event name\r
-     * @return Unique event name\r
-     */\r
-    private String eventName;\r
-\r
-\r
-    /**\r
-     * Event type e.g. applicationVnf, guestOS, hostOS, platform\r
-     *\r
-     * @param eventType New value for event type\r
-     * @return Event type e.g. applicationVnf, guestOS, hostOS, platform\r
-     */\r
-    private String eventType;\r
-\r
-\r
-    /**\r
-     * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources\r
-     *\r
-     * @param internalHeaderFields new value for internal Header Fields\r
-     * @return Enrichment fields for internal VES Event Listener service use only, not supplied by event sources\r
-     */\r
-    private InternalHeaderFields internalHeaderFields;\r
-\r
-\r
-    /**\r
-     * The latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since\r
-     * 1 Jan 1970 not including leap seconds\r
-     *\r
-     * @param lastEpochMicrosec New value for last Epoc Microsec\r
-     * @return The latest unix time associated with the event from any component\r
-     */\r
-    private Long lastEpochMicrosec;\r
-\r
-\r
-    /**\r
-     * Three character network function component type as aligned with vfc naming standards\r
-     *\r
-     * @param nfcNamingCode New value for nfc naming code\r
-     * @return Three character network function component type as aligned with vfc naming standards\r
-     */\r
-    private String nfcNamingCode;\r
-\r
-\r
-    /**\r
-     * Four character network function type as aligned with vnf naming standards\r
-     *\r
-     * @param nfNamingCode New value for nf naming code\r
-     * @return Four character network function type as aligned with vnf naming standards\r
-     */\r
-    private String nfNamingCode;\r
-\r
-\r
-    /**\r
-     * Processing Priority\r
-     *\r
-     * @param priority New value for processing Priority\r
-     * @return Processing Priority\r
-     */\r
-    private Priority priority;\r
-\r
-\r
-    /**\r
-     * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the\r
-     * enrichment process\r
-     *\r
-     * @param reportingEntityId New value for reporting entity Id. Must be populated by the enrichment process\r
-     * @return UUID identifying the entity reporting the event populated by the enrichment process\r
-     */\r
-    private String reportingEntityId;\r
-\r
-\r
-    /**\r
-     * Name of the entity reporting the event, for example, an EMS name; may be the same as sourceName\r
-     *\r
-     * @param reportingEntityName New value for reporting Entity Name\r
-     * @return Name of the entity reporting the event, may be the same as sourceName\r
-     */\r
-    private String reportingEntityName;\r
-\r
-\r
-    /**\r
-     * Ordering of events communicated by an event source instance or 0 if not needed\r
-     *\r
-     * @param sequence New value for Sequence\r
-     * @return Ordering of events communicated by an event source instance or 0 if not needed\r
-     */\r
-    private Integer sequence;\r
-\r
-\r
-    /**\r
-     * UUID identifying the entity experiencing the event issue; must be populated by the enrichment process\r
-     *\r
-     * @param sourceId New value for source id. Must be populated by the enrichment process\r
-     * @return UUID identifying the entity experiencing the event issue\r
-     */\r
-    private String sourceId;\r
-\r
-\r
-    /**\r
-     * Name of the entity experiencing the event issue\r
-     *\r
-     * @param sourceName New value for source name\r
-     * @return Name of the entity experiencing the event issue\r
-     */\r
-    private String sourceName;\r
-\r
-\r
-    /**\r
-     * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed\r
-     * since 1 Jan 1970 not including leap seconds\r
-     *\r
-     * @param startEpochMicrosec New value for start Epoc Microsec\r
-     * @return The earliest unix time associated with the event from any component\r
-     */\r
-    private Long startEpochMicrosec;\r
-\r
-\r
-    /**\r
-     * Version of the event header\r
-     *\r
-     * @param version New value for version of the event header\r
-     * @return Version of the event header\r
-     */\r
-    private Float version;\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Fields common to all Events
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CommonEventHeader extends BaseCEFModel {
+
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * The eventing domain associated with this event
+     *
+     * @param domain New value for domain
+     * @return The eventing domain associated with this event
+     */
+    private Domain domain;
+
+    /**
+     * Event key that is unique to the event source
+     *
+     * @param eventId New value for event key
+     * @return Event key that is unique to the event source
+     */
+    private String eventId;
+
+    /**
+     * Unique event name
+     *
+     * @param eventName New value for event name
+     * @return Unique event name
+     */
+    private String eventName;
+
+
+    /**
+     * Event type e.g. applicationVnf, guestOS, hostOS, platform
+     *
+     * @param eventType New value for event type
+     * @return Event type e.g. applicationVnf, guestOS, hostOS, platform
+     */
+    private String eventType;
+
+
+    /**
+     * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources
+     *
+     * @param internalHeaderFields new value for internal Header Fields
+     * @return Enrichment fields for internal VES Event Listener service use only, not supplied by event sources
+     */
+    private InternalHeaderFields internalHeaderFields;
+
+
+    /**
+     * The latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since
+     * 1 Jan 1970 not including leap seconds
+     *
+     * @param lastEpochMicrosec New value for last Epoc Microsec
+     * @return The latest unix time associated with the event from any component
+     */
+    private Long lastEpochMicrosec;
+
+
+    /**
+     * Three character network function component type as aligned with vfc naming standards
+     *
+     * @param nfcNamingCode New value for nfc naming code
+     * @return Three character network function component type as aligned with vfc naming standards
+     */
+    private String nfcNamingCode;
+
+
+    /**
+     * Four character network function type as aligned with vnf naming standards
+     *
+     * @param nfNamingCode New value for nf naming code
+     * @return Four character network function type as aligned with vnf naming standards
+     */
+    private String nfNamingCode;
+
+
+    /**
+     * Processing Priority
+     *
+     * @param priority New value for processing Priority
+     * @return Processing Priority
+     */
+    private Priority priority;
+
+
+    /**
+     * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the
+     * enrichment process
+     *
+     * @param reportingEntityId New value for reporting entity Id. Must be populated by the enrichment process
+     * @return UUID identifying the entity reporting the event populated by the enrichment process
+     */
+    private String reportingEntityId;
+
+
+    /**
+     * Name of the entity reporting the event, for example, an EMS name; may be the same as sourceName
+     *
+     * @param reportingEntityName New value for reporting Entity Name
+     * @return Name of the entity reporting the event, may be the same as sourceName
+     */
+    private String reportingEntityName;
+
+
+    /**
+     * Ordering of events communicated by an event source instance or 0 if not needed
+     *
+     * @param sequence New value for Sequence
+     * @return Ordering of events communicated by an event source instance or 0 if not needed
+     */
+    private Integer sequence;
+
+
+    /**
+     * UUID identifying the entity experiencing the event issue; must be populated by the enrichment process
+     *
+     * @param sourceId New value for source id. Must be populated by the enrichment process
+     * @return UUID identifying the entity experiencing the event issue
+     */
+    private String sourceId;
+
+
+    /**
+     * Name of the entity experiencing the event issue
+     *
+     * @param sourceName New value for source name
+     * @return Name of the entity experiencing the event issue
+     */
+    private String sourceName;
+
+
+    /**
+     * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed
+     * since 1 Jan 1970 not including leap seconds
+     *
+     * @param startEpochMicrosec New value for start Epoc Microsec
+     * @return The earliest unix time associated with the event from any component
+     */
+    private Long startEpochMicrosec;
+
+
+    /**
+     * Version of the event header
+     *
+     * @param version New value for version of the event header
+     * @return Version of the event header
+     */
+    private Float version;
+}
@@ -1,31 +1,31 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-/**\r
- * Performance Criticality\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public enum Criticality implements CEFModel {\r
-\r
-    CRIT, MAJ, UNKNOWN\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+/**
+ * Performance Criticality
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public enum Criticality implements CEFModel {
+
+    CRIT, MAJ, UNKNOWN
+}
@@ -1,41 +1,41 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-/**\r
- * Eventing domain associated with the event\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 08/15/2017.\r
- */\r
-public enum Domain implements CEFModel {\r
-\r
-    fault,\r
-    heartbeat,\r
-    measurementsForVfScaling,\r
-    mobileFlow,\r
-    other,\r
-    sipSignaling,\r
-    stateChange,\r
-    syslog,\r
-    thresholdCrossingAlert,\r
-    voiceQuality;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+/**
+ * Eventing domain associated with the event
+ * <p>
+ * @author Rajiv Singla . Creation Date: 08/15/2017.
+ */
+public enum Domain implements CEFModel {
+
+    fault,
+    heartbeat,
+    measurementsForVfScaling,
+    mobileFlow,
+    other,
+    sipSignaling,
+    stateChange,
+    syslog,
+    thresholdCrossingAlert,
+    voiceQuality;
+
+}
@@ -1,61 +1,61 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Generic Event Format\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class Event extends BaseCEFModel {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Fields common to all Events\r
-     *\r
-     * @param commonEventHeader New value for common Event Header\r
-     * @return Fields common to all Events\r
-     */\r
-    private CommonEventHeader commonEventHeader;\r
-\r
-    /**\r
-     * Measurements for Vf scaling fields\r
-     *\r
-     * @param measurementsForVfScalingFields New value for MeasurementsForVfScaling\r
-     * @return MeasurementsForVfScaling fields\r
-     */\r
-    private MeasurementsForVfScalingFields measurementsForVfScalingFields;\r
-\r
-    /**\r
-     * Threshold crossing alert Fields.\r
-     *\r
-     * @param thresholdCrossingAlertFields New value for Threshold crossing Fields\r
-     * @return Threshold crossing Fields\r
-     */\r
-    private ThresholdCrossingAlertFields thresholdCrossingAlertFields;\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Generic Event Format
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Event extends BaseCEFModel {
+
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Fields common to all Events
+     *
+     * @param commonEventHeader New value for common Event Header
+     * @return Fields common to all Events
+     */
+    private CommonEventHeader commonEventHeader;
+
+    /**
+     * Measurements for Vf scaling fields
+     *
+     * @param measurementsForVfScalingFields New value for MeasurementsForVfScaling
+     * @return MeasurementsForVfScaling fields
+     */
+    private MeasurementsForVfScalingFields measurementsForVfScalingFields;
+
+    /**
+     * Threshold crossing alert Fields.
+     *
+     * @param thresholdCrossingAlertFields New value for Threshold crossing Fields
+     * @return Threshold crossing Fields
+     */
+    private ThresholdCrossingAlertFields thresholdCrossingAlertFields;
+}
@@ -1,45 +1,45 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Common Event Format - Base Event Listener\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class EventListener extends BaseCEFModel {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-  /**\r
-     * Common Event Format - Event\r
-     *\r
-     * @param event New value for Event\r
-     * @return Common Event Format Event\r
-     */\r
-    private Event event;\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Common Event Format - Base Event Listener
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EventListener extends BaseCEFModel {
+
+
+    private static final long serialVersionUID = 1L;
+
+  /**
+     * Common Event Format - Event
+     *
+     * @param event New value for Event
+     * @return Common Event Format Event
+     */
+    private Event event;
+}
@@ -1,36 +1,36 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-/**\r
- * CEF Event severity or priority\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public enum EventSeverity implements CEFModel {\r
-\r
-    //NOTE: enum order must not be changed. Events severity is ordered from high to low\r
-    CRITICAL,\r
-    MAJOR,\r
-    MINOR,\r
-    WARNING,\r
-    NORMAL\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+/**
+ * CEF Event severity or priority
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public enum EventSeverity implements CEFModel {
+
+    //NOTE: enum order must not be changed. Events severity is ordered from high to low
+    CRITICAL,
+    MAJOR,
+    MINOR,
+    WARNING,
+    NORMAL
+}
@@ -1,53 +1,53 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Name Value Pair\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class Field extends BaseCEFModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Name of the Field\r
-     *\r
-     * @param name New name for the Field\r
-     * @return Name of the Field\r
-     */\r
-    private String name;\r
-\r
-    /**\r
-     * Value of the Field\r
-     *\r
-     * @param value New value for the Field\r
-     * @return Value of the Field\r
-     */\r
-    private String value;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Name Value Pair
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Field extends BaseCEFModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Name of the Field
+     *
+     * @param name New name for the Field
+     * @return Name of the Field
+     */
+    private String name;
+
+    /**
+     * Value of the Field
+     *
+     * @param value New value for the Field
+     * @return Value of the Field
+     */
+    private String value;
+
+}
@@ -1,38 +1,38 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources\r
- * <p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class InternalHeaderFields extends BaseCEFModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources
+ * <p>
+ *
+ * @author Rajiv Singla . Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class InternalHeaderFields extends BaseCEFModel {
+
+    private static final long serialVersionUID = 1L;
+
+}
@@ -1,81 +1,81 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * Common Event Format - MeasurementsForVfScaling fields\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class MeasurementsForVfScalingFields extends BaseCEFModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Additional name-value-pair fields\r
-     *\r
-     * @param additionalFields New value for additional name-value-pair fields\r
-     * @return Additional name-value-pair fields\r
-     */\r
-    private List<Field> additionalFields;\r
-\r
-\r
-    /**\r
-     * Array of named name-value-pair arrays for additional Measurements\r
-     *\r
-     * @param additionalMeasurements New value for array of named name-value-pair arrays for additional Measurements\r
-     * @return Array of named name-value-pair arrays for additional Measurements\r
-     */\r
-    private List<NamedArrayOfFields> additionalMeasurements;\r
-\r
-    /**\r
-     * Interval over which measurements are being reported in seconds\r
-     *\r
-     * @param measurementInterval New value for measurement Interval\r
-     * @return Interval over which measurements are being reported in seconds\r
-     */\r
-    private Long measurementInterval;\r
-\r
-    /**\r
-     * Version of the measurementsForVfScaling block\r
-     *\r
-     * @param measurementsForVfScalingVersion New value for measurementsForVfScaling block\r
-     * @return Version of the measurementsForVfScaling block\r
-     */\r
-    private Float measurementsForVfScalingVersion;\r
-\r
-    /**\r
-     * Usage of an array of virtual network interface cards\r
-     *\r
-     * @param vNicPerformanceArray New value for Usage of an array of virtual network interface cards\r
-     * @return Usage of an array of virtual network interface cards\r
-     */\r
-    private List<VNicPerformance> vNicPerformanceArray;\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * Common Event Format - MeasurementsForVfScaling fields
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MeasurementsForVfScalingFields extends BaseCEFModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Additional name-value-pair fields
+     *
+     * @param additionalFields New value for additional name-value-pair fields
+     * @return Additional name-value-pair fields
+     */
+    private List<Field> additionalFields;
+
+
+    /**
+     * Array of named name-value-pair arrays for additional Measurements
+     *
+     * @param additionalMeasurements New value for array of named name-value-pair arrays for additional Measurements
+     * @return Array of named name-value-pair arrays for additional Measurements
+     */
+    private List<NamedArrayOfFields> additionalMeasurements;
+
+    /**
+     * Interval over which measurements are being reported in seconds
+     *
+     * @param measurementInterval New value for measurement Interval
+     * @return Interval over which measurements are being reported in seconds
+     */
+    private Long measurementInterval;
+
+    /**
+     * Version of the measurementsForVfScaling block
+     *
+     * @param measurementsForVfScalingVersion New value for measurementsForVfScaling block
+     * @return Version of the measurementsForVfScaling block
+     */
+    private Float measurementsForVfScalingVersion;
+
+    /**
+     * Usage of an array of virtual network interface cards
+     *
+     * @param vNicPerformanceArray New value for Usage of an array of virtual network interface cards
+     * @return Usage of an array of virtual network interface cards
+     */
+    private List<VNicPerformance> vNicPerformanceArray;
+
+
+}
@@ -1,55 +1,55 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * An array of name value pairs along with a name for the array\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class NamedArrayOfFields extends BaseCEFModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Name of the NamedArrayOfFields\r
-     *\r
-     * @param name New name for the Field\r
-     * @return Name of the Field\r
-     */\r
-    private String name;\r
-\r
-    /**\r
-     * Array of name value pairs\r
-     *\r
-     * @param arrayOfFields New value for array of name value pairs\r
-     * @return Array of name value pairs\r
-     */\r
-    private List<Field> arrayOfFields;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * An array of name value pairs along with a name for the array
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class NamedArrayOfFields extends BaseCEFModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Name of the NamedArrayOfFields
+     *
+     * @param name New name for the Field
+     * @return Name of the Field
+     */
+    private String name;
+
+    /**
+     * Array of name value pairs
+     *
+     * @param arrayOfFields New value for array of name value pairs
+     * @return Array of name value pairs
+     */
+    private List<Field> arrayOfFields;
+
+}
@@ -1,68 +1,68 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Common Event Format - Performance PerformanceCounter\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class PerformanceCounter extends BaseCEFModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Performance Counter Criticality.\r
-     *\r
-     * @param criticality New value for Criticality\r
-     * @return Performance Counter Criticality\r
-     */\r
-    private Criticality criticality;\r
-\r
-    /**\r
-     * Performance Counter Name\r
-     *\r
-     * @param name New value for Performance counter name\r
-     * @return Performance Counter Name\r
-     */\r
-    private String name;\r
-\r
-   /**\r
-     * Performance Counter for Threshold Crossed.\r
-     *\r
-     * @param thresholdCrossed New value for Performance Counter Threshold Crossed\r
-     * @return Performance Counter Threshold Crossed\r
-     */\r
-    private String thresholdCrossed;\r
-\r
-    /**\r
-     * Performance Counter Value.\r
-     *\r
-     * @param value New Performance Counter Value\r
-     * @return Performance Counter Value\r
-     */\r
-    private String value;\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Common Event Format - Performance PerformanceCounter
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PerformanceCounter extends BaseCEFModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Performance Counter Criticality.
+     *
+     * @param criticality New value for Criticality
+     * @return Performance Counter Criticality
+     */
+    private Criticality criticality;
+
+    /**
+     * Performance Counter Name
+     *
+     * @param name New value for Performance counter name
+     * @return Performance Counter Name
+     */
+    private String name;
+
+   /**
+     * Performance Counter for Threshold Crossed.
+     *
+     * @param thresholdCrossed New value for Performance Counter Threshold Crossed
+     * @return Performance Counter Threshold Crossed
+     */
+    private String thresholdCrossed;
+
+    /**
+     * Performance Counter Value.
+     *
+     * @param value New Performance Counter Value
+     * @return Performance Counter Value
+     */
+    private String value;
+}
@@ -1,34 +1,34 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-/**\r
- * Common Event Format - Event processing priority\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public enum Priority implements CEFModel {\r
-\r
-    High,\r
-    Medium,\r
-    Normal,\r
-    Low\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+/**
+ * Common Event Format - Event processing priority
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public enum Priority implements CEFModel {
+
+    High,
+    Medium,
+    Normal,
+    Low
+}
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import java.util.List;\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Common Event Format - Fields Specific to threshold crossing alert events\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class ThresholdCrossingAlertFields extends BaseCEFModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Additional Performance counters parameters.\r
-     *\r
-     * @param additionalParameters New value for Additional Performance counters\r
-     * @return Additional Performance counters\r
-     */\r
-    private List<PerformanceCounter> additionalParameters;\r
-\r
-    /**\r
-     *  Event alert action\r
-     *\r
-     *  @param alertAction New Event Action\r
-     *  @return Event alert action\r
-     */\r
-    private AlertAction alertAction;\r
-\r
-    /**\r
-     * Unique short alert description such as IF-SHUB-ERRDROP\r
-     *\r
-     * @param alertDescription New value for Unique short alert description\r
-     * @return Unique short alert description\r
-     */\r
-    private String alertDescription;\r
-\r
-    /**\r
-     * Alert type\r
-     *\r
-     * @param alertType New value for Alert Type\r
-     * @return Alert Type\r
-     */\r
-    private AlertType alertType;\r
-\r
-    /**\r
-     * Calculated API value (if applicable)\r
-     *\r
-     * @param alertValue New Calculated API value\r
-     * @return Calculated API value (if applicable)\r
-     */\r
-    private String alertValue;\r
-\r
-    /**\r
-     * List of eventIds associated with the event being reported\r
-     *\r
-     * @param associatedAlertIdList New value for eventIds associated with the event\r
-     * @return List of eventIds associated with the event being reported\r
-     */\r
-    private List<String> associatedAlertIdList;\r
-\r
-    /**\r
-     * Time when the performance collector picked up the data; with RFC 2822 compliant format:\r
-     * â€˜Sat, 13 Mar 2010 11:29:05 -0800’\r
-     *\r
-     * @param collectionTimestamp Set new value for time when the performance collector picked up the data\r
-     * @return Time when the performance collector picked up the data\r
-     */\r
-    private String collectionTimestamp;\r
-\r
-    /**\r
-     * Specific performance collector instance used\r
-     *\r
-     * @param dataCollector New value for specific performance collector instance used\r
-     * @return Specific performance collector instance used\r
-     */\r
-    private String dataCollector;\r
-\r
-    /**\r
-     * Type of network element\r
-     *\r
-     * @param elementType New value for type of network element\r
-     * @return Type of network element\r
-     */\r
-    private String elementType;\r
-\r
-    /**\r
-     * Event severity or priority\r
-     *\r
-     * @param eventSeverity New value for event severity or priority\r
-     * @return Event severity or priority\r
-     */\r
-    private EventSeverity eventSeverity;\r
-\r
-    /**\r
-     * Time closest to when the measurement was made; with RFC 2822 compliant format: â€˜Sat, 13 Mar 2010 11:29:05 -0800’\r
-     *\r
-     * @param eventStartTimestamp New value for time closest to when the measurement was made\r
-     * @return Time closest to when the measurement was made\r
-     */\r
-    private String eventStartTimestamp;\r
-\r
-    /**\r
-     * Physical or logical port or card (if applicable)\r
-     *\r
-     * @param interfaceName New value for Physical or logical port or card (if applicable)\r
-     * @return Physical or logical port or card (if applicable)\r
-     */\r
-    private String interfaceName;\r
-\r
-    /**\r
-     * Network name\r
-     *\r
-     * @param networkService New value for network name\r
-     * @return Network name\r
-     */\r
-    private String networkService;\r
-\r
-    /**\r
-     * Possible Root Cause (reserved for future use)\r
-     *\r
-     * @param possibleRootCause New value for possible root cause (reserved for future)\r
-     * @return Possible Root Cause (reserved for future use)\r
-     */\r
-    private String possibleRootCause;\r
-\r
-    /**\r
-     * Version of the thresholdCrossingAlertFields block\r
-     *\r
-     * @param thresholdCrossingFieldsVersion New value for version of the thresholdCrossingAlertFields block\r
-     * @return Version of the thresholdCrossingAlertFields block\r
-     */\r
-    private Integer thresholdCrossingFieldsVersion;\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import java.util.List;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Common Event Format - Fields Specific to threshold crossing alert events
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ThresholdCrossingAlertFields extends BaseCEFModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Additional Performance counters parameters.
+     *
+     * @param additionalParameters New value for Additional Performance counters
+     * @return Additional Performance counters
+     */
+    private List<PerformanceCounter> additionalParameters;
+
+    /**
+     *  Event alert action
+     *
+     *  @param alertAction New Event Action
+     *  @return Event alert action
+     */
+    private AlertAction alertAction;
+
+    /**
+     * Unique short alert description such as IF-SHUB-ERRDROP
+     *
+     * @param alertDescription New value for Unique short alert description
+     * @return Unique short alert description
+     */
+    private String alertDescription;
+
+    /**
+     * Alert type
+     *
+     * @param alertType New value for Alert Type
+     * @return Alert Type
+     */
+    private AlertType alertType;
+
+    /**
+     * Calculated API value (if applicable)
+     *
+     * @param alertValue New Calculated API value
+     * @return Calculated API value (if applicable)
+     */
+    private String alertValue;
+
+    /**
+     * List of eventIds associated with the event being reported
+     *
+     * @param associatedAlertIdList New value for eventIds associated with the event
+     * @return List of eventIds associated with the event being reported
+     */
+    private List<String> associatedAlertIdList;
+
+    /**
+     * Time when the performance collector picked up the data; with RFC 2822 compliant format:
+     * â€˜Sat, 13 Mar 2010 11:29:05 -0800’
+     *
+     * @param collectionTimestamp Set new value for time when the performance collector picked up the data
+     * @return Time when the performance collector picked up the data
+     */
+    private String collectionTimestamp;
+
+    /**
+     * Specific performance collector instance used
+     *
+     * @param dataCollector New value for specific performance collector instance used
+     * @return Specific performance collector instance used
+     */
+    private String dataCollector;
+
+    /**
+     * Type of network element
+     *
+     * @param elementType New value for type of network element
+     * @return Type of network element
+     */
+    private String elementType;
+
+    /**
+     * Event severity or priority
+     *
+     * @param eventSeverity New value for event severity or priority
+     * @return Event severity or priority
+     */
+    private EventSeverity eventSeverity;
+
+    /**
+     * Time closest to when the measurement was made; with RFC 2822 compliant format: â€˜Sat, 13 Mar 2010 11:29:05 -0800’
+     *
+     * @param eventStartTimestamp New value for time closest to when the measurement was made
+     * @return Time closest to when the measurement was made
+     */
+    private String eventStartTimestamp;
+
+    /**
+     * Physical or logical port or card (if applicable)
+     *
+     * @param interfaceName New value for Physical or logical port or card (if applicable)
+     * @return Physical or logical port or card (if applicable)
+     */
+    private String interfaceName;
+
+    /**
+     * Network name
+     *
+     * @param networkService New value for network name
+     * @return Network name
+     */
+    private String networkService;
+
+    /**
+     * Possible Root Cause (reserved for future use)
+     *
+     * @param possibleRootCause New value for possible root cause (reserved for future)
+     * @return Possible Root Cause (reserved for future use)
+     */
+    private String possibleRootCause;
+
+    /**
+     * Version of the thresholdCrossingAlertFields block
+     *
+     * @param thresholdCrossingFieldsVersion New value for version of the thresholdCrossingAlertFields block
+     * @return Version of the thresholdCrossingAlertFields block
+     */
+    private Integer thresholdCrossingFieldsVersion;
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-/**\r
- * Describes the performance and errors of an identified virtual network interface card\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class VNicPerformance extends BaseCEFModel {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Cumulative count of broadcast packets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets received as\r
-     * read at the end of the measurement interval\r
-     * @return Cumulative count of broadcast packets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedBroadcastPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of broadcast packets received within the measurement interval\r
-     *\r
-     * @param receivedBroadcastPacketsDelta New value for count of broadcast packets received within the measurement\r
-     * interval\r
-     * @return Count of broadcast packets received within the measurement interval\r
-     */\r
-    private Long receivedBroadcastPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of discarded packets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedDiscardedPacketsAccumulated New value for cumulative count of discarded packets received as read\r
-     * at the end of the measurement interval\r
-     * @return  Cumulative count of discarded packets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedDiscardedPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of discarded packets received within the measurement interval\r
-     *\r
-     * @param receivedDiscardedPacketsDelta New value for count of discarded packets received within the measurement\r
-     * interval\r
-     * @return Count of discarded packets received within the measurement interval\r
-     */\r
-    private Long receivedDiscardedPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of error packets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedErrorPacketsAccumulated New value for cumulative count of error packets received as read at the\r
-     * end of the measurement interval\r
-     * @return Cumulative count of error packets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedErrorPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of error packets received within the measurement interval\r
-     *\r
-     * @param receivedErrorPacketsDelta New value for count of error packets received within the measurement interval\r
-     * @return Count of error packets received within the measurement interval\r
-     */\r
-    private Long receivedErrorPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of multicast packets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedMulticastPacketsAccumulated New value for cumulative count of multicast packets received as\r
-     * read at the end of the measurement interval\r
-     * @return Cumulative count of multicast packets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedMulticastPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of multicast packets received within the measurement interval\r
-     *\r
-     * @param receivedMulticastPacketsDelta New value for count of multicast packets received within the measurement\r
-     * interval\r
-     * @return Count of multicast packets received within the measurement interval\r
-     */\r
-    private Long receivedMulticastPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of octets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedOctetsAccumulated New value for cumulative count of octets received as read at the end of the\r
-     * measurement interval\r
-     * @return Cumulative count of octets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedOctetsAccumulated;\r
-\r
-    /**\r
-     * Count of octets received within the measurement interval\r
-     *\r
-     * @param receivedOctetsDelta New value for count of octets received within the measurement interval\r
-     * @return Count of octets received within the measurement interval\r
-     */\r
-    private Long receivedOctetsDelta;\r
-\r
-    /**\r
-     * Cumulative count of all packets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedTotalPacketsAccumulated New value for cumulative count of all packets received as read at the\r
-     * end of the measurement interval\r
-     * @return Cumulative count of all packets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedTotalPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of all packets received within the measurement interval\r
-     *\r
-     * @param receivedTotalPacketsDelta New value for count of all packets received within the measurement interval\r
-     * @return Count of all packets received within the measurement interval\r
-     */\r
-    private Long receivedTotalPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of unicast packets received as read at the end of the measurement interval\r
-     *\r
-     * @param receivedUnicastPacketsAccumulated New value for cumulative count of unicast packets received as read at\r
-     * the end of the measurement interval\r
-     * @return Cumulative count of unicast packets received as read at the end of the measurement interval\r
-     */\r
-    private Long receivedUnicastPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of unicast packets received within the measurement interval\r
-     *\r
-     * @param receivedUnicastPacketsDelta New value for count of unicast packets received within the measurement\r
-     * interval\r
-     * @return Count of unicast packets received within the measurement interval\r
-     */\r
-    private Long receivedUnicastPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of broadcast packets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets transmitted\r
-     * as read at the end of the measurement interval\r
-     * @return Cumulative count of broadcast packets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedBroadcastPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of broadcast packets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedBroadcastPacketsDelta New value for count of broadcast packets transmitted within the\r
-     * measurement interval\r
-     * @return Count of broadcast packets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedBroadcastPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of discarded packets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedDiscardedPacketsAccumulated New value for cumulative count of discarded packets transmitted\r
-     * as read at the end of the measurement interval\r
-     * @return Cumulative count of discarded packets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedDiscardedPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of discarded packets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedDiscardedPacketsDelta New value for count of discarded packets transmitted within the\r
-     * measurement interval\r
-     * @return Count of discarded packets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedDiscardedPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of error packets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedErrorPacketsAccumulated New value for cumulative count of error packets transmitted as read\r
-     * at the end of the measurement interval\r
-     * @return Cumulative count of error packets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedErrorPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of error packets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedErrorPacketsDelta New value for count of error packets transmitted within the measurement\r
-     * interval\r
-     * @return Count of error packets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedErrorPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of multicast packets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedMulticastPacketsAccumulated New value for cumulative count of multicast packets transmitted\r
-     * as read at the end of the measurement interval\r
-     * @return Cumulative count of multicast packets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedMulticastPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of multicast packets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedMulticastPacketsDelta New value for count of multicast packets transmitted within the\r
-     * measurement interval\r
-     * @return Count of multicast packets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedMulticastPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of octets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedOctetsAccumulated New value for cumulative count of octets transmitted as read at the end of\r
-     * the measurement interval\r
-     * @return Cumulative count of octets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedOctetsAccumulated;\r
-\r
-    /**\r
-     * Count of octets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedOctetsDelta New value for count of octets transmitted within the measurement interval\r
-     * @return Count of octets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedOctetsDelta;\r
-\r
-    /**\r
-     * Cumulative count of all packets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedTotalPacketsAccumulated New value for cumulative count of all packets transmitted as read at\r
-     * the end of the measurement interval\r
-     * @return Cumulative count of all packets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedTotalPacketsAccumulated;\r
-\r
-    /**\r
-     * Count of all packets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedTotalPacketsDelta New value for count of all packets transmitted within the measurement\r
-     * interval\r
-     * @return Count of all packets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedTotalPacketsDelta;\r
-\r
-    /**\r
-     * Cumulative count of unicast packets transmitted as read at the end of the measurement interval\r
-     *\r
-     * @param transmittedUnicastPacketsAccumulated New value for cumulative count of unicast packets transmitted as\r
-     * read at the end of the measurement interval\r
-     * @return Cumulative count of unicast packets transmitted as read at the end of the measurement interval\r
-     */\r
-    private Long transmittedUnicastPacketsAccumulated;\r
-\r
-\r
-    /**\r
-     * Count of unicast packets transmitted within the measurement interval\r
-     *\r
-     * @param transmittedUnicastPacketsDelta New value for count of unicast packets transmitted within the\r
-     * measurement interval\r
-     * @return Count of unicast packets transmitted within the measurement interval\r
-     */\r
-    private Long transmittedUnicastPacketsDelta;\r
-\r
-\r
-    /**\r
-     * Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other conditions\r
-     *\r
-     * @param valuesAreSuspect New value to indicate whether vNicPerformance values are likely inaccurate due to\r
-     * counter overflow or other conditions\r
-     * @return Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other\r
-     * conditions\r
-     */\r
-    private Boolean valuesAreSuspect;\r
-\r
-\r
-    /**\r
-     * Virtual Network Card Identifier\r
-     *\r
-     * @param vNicIdentifier New value for Virtual Network Card Identifier\r
-     * @return Virtual Network Card Identifier\r
-     */\r
-    private String vNicIdentifier;\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Describes the performance and errors of an identified virtual network interface card
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class VNicPerformance extends BaseCEFModel {
+
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Cumulative count of broadcast packets received as read at the end of the measurement interval
+     *
+     * @param receivedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets received as
+     * read at the end of the measurement interval
+     * @return Cumulative count of broadcast packets received as read at the end of the measurement interval
+     */
+    private Long receivedBroadcastPacketsAccumulated;
+
+    /**
+     * Count of broadcast packets received within the measurement interval
+     *
+     * @param receivedBroadcastPacketsDelta New value for count of broadcast packets received within the measurement
+     * interval
+     * @return Count of broadcast packets received within the measurement interval
+     */
+    private Long receivedBroadcastPacketsDelta;
+
+    /**
+     * Cumulative count of discarded packets received as read at the end of the measurement interval
+     *
+     * @param receivedDiscardedPacketsAccumulated New value for cumulative count of discarded packets received as read
+     * at the end of the measurement interval
+     * @return  Cumulative count of discarded packets received as read at the end of the measurement interval
+     */
+    private Long receivedDiscardedPacketsAccumulated;
+
+    /**
+     * Count of discarded packets received within the measurement interval
+     *
+     * @param receivedDiscardedPacketsDelta New value for count of discarded packets received within the measurement
+     * interval
+     * @return Count of discarded packets received within the measurement interval
+     */
+    private Long receivedDiscardedPacketsDelta;
+
+    /**
+     * Cumulative count of error packets received as read at the end of the measurement interval
+     *
+     * @param receivedErrorPacketsAccumulated New value for cumulative count of error packets received as read at the
+     * end of the measurement interval
+     * @return Cumulative count of error packets received as read at the end of the measurement interval
+     */
+    private Long receivedErrorPacketsAccumulated;
+
+    /**
+     * Count of error packets received within the measurement interval
+     *
+     * @param receivedErrorPacketsDelta New value for count of error packets received within the measurement interval
+     * @return Count of error packets received within the measurement interval
+     */
+    private Long receivedErrorPacketsDelta;
+
+    /**
+     * Cumulative count of multicast packets received as read at the end of the measurement interval
+     *
+     * @param receivedMulticastPacketsAccumulated New value for cumulative count of multicast packets received as
+     * read at the end of the measurement interval
+     * @return Cumulative count of multicast packets received as read at the end of the measurement interval
+     */
+    private Long receivedMulticastPacketsAccumulated;
+
+    /**
+     * Count of multicast packets received within the measurement interval
+     *
+     * @param receivedMulticastPacketsDelta New value for count of multicast packets received within the measurement
+     * interval
+     * @return Count of multicast packets received within the measurement interval
+     */
+    private Long receivedMulticastPacketsDelta;
+
+    /**
+     * Cumulative count of octets received as read at the end of the measurement interval
+     *
+     * @param receivedOctetsAccumulated New value for cumulative count of octets received as read at the end of the
+     * measurement interval
+     * @return Cumulative count of octets received as read at the end of the measurement interval
+     */
+    private Long receivedOctetsAccumulated;
+
+    /**
+     * Count of octets received within the measurement interval
+     *
+     * @param receivedOctetsDelta New value for count of octets received within the measurement interval
+     * @return Count of octets received within the measurement interval
+     */
+    private Long receivedOctetsDelta;
+
+    /**
+     * Cumulative count of all packets received as read at the end of the measurement interval
+     *
+     * @param receivedTotalPacketsAccumulated New value for cumulative count of all packets received as read at the
+     * end of the measurement interval
+     * @return Cumulative count of all packets received as read at the end of the measurement interval
+     */
+    private Long receivedTotalPacketsAccumulated;
+
+    /**
+     * Count of all packets received within the measurement interval
+     *
+     * @param receivedTotalPacketsDelta New value for count of all packets received within the measurement interval
+     * @return Count of all packets received within the measurement interval
+     */
+    private Long receivedTotalPacketsDelta;
+
+    /**
+     * Cumulative count of unicast packets received as read at the end of the measurement interval
+     *
+     * @param receivedUnicastPacketsAccumulated New value for cumulative count of unicast packets received as read at
+     * the end of the measurement interval
+     * @return Cumulative count of unicast packets received as read at the end of the measurement interval
+     */
+    private Long receivedUnicastPacketsAccumulated;
+
+    /**
+     * Count of unicast packets received within the measurement interval
+     *
+     * @param receivedUnicastPacketsDelta New value for count of unicast packets received within the measurement
+     * interval
+     * @return Count of unicast packets received within the measurement interval
+     */
+    private Long receivedUnicastPacketsDelta;
+
+    /**
+     * Cumulative count of broadcast packets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets transmitted
+     * as read at the end of the measurement interval
+     * @return Cumulative count of broadcast packets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedBroadcastPacketsAccumulated;
+
+    /**
+     * Count of broadcast packets transmitted within the measurement interval
+     *
+     * @param transmittedBroadcastPacketsDelta New value for count of broadcast packets transmitted within the
+     * measurement interval
+     * @return Count of broadcast packets transmitted within the measurement interval
+     */
+    private Long transmittedBroadcastPacketsDelta;
+
+    /**
+     * Cumulative count of discarded packets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedDiscardedPacketsAccumulated New value for cumulative count of discarded packets transmitted
+     * as read at the end of the measurement interval
+     * @return Cumulative count of discarded packets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedDiscardedPacketsAccumulated;
+
+    /**
+     * Count of discarded packets transmitted within the measurement interval
+     *
+     * @param transmittedDiscardedPacketsDelta New value for count of discarded packets transmitted within the
+     * measurement interval
+     * @return Count of discarded packets transmitted within the measurement interval
+     */
+    private Long transmittedDiscardedPacketsDelta;
+
+    /**
+     * Cumulative count of error packets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedErrorPacketsAccumulated New value for cumulative count of error packets transmitted as read
+     * at the end of the measurement interval
+     * @return Cumulative count of error packets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedErrorPacketsAccumulated;
+
+    /**
+     * Count of error packets transmitted within the measurement interval
+     *
+     * @param transmittedErrorPacketsDelta New value for count of error packets transmitted within the measurement
+     * interval
+     * @return Count of error packets transmitted within the measurement interval
+     */
+    private Long transmittedErrorPacketsDelta;
+
+    /**
+     * Cumulative count of multicast packets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedMulticastPacketsAccumulated New value for cumulative count of multicast packets transmitted
+     * as read at the end of the measurement interval
+     * @return Cumulative count of multicast packets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedMulticastPacketsAccumulated;
+
+    /**
+     * Count of multicast packets transmitted within the measurement interval
+     *
+     * @param transmittedMulticastPacketsDelta New value for count of multicast packets transmitted within the
+     * measurement interval
+     * @return Count of multicast packets transmitted within the measurement interval
+     */
+    private Long transmittedMulticastPacketsDelta;
+
+    /**
+     * Cumulative count of octets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedOctetsAccumulated New value for cumulative count of octets transmitted as read at the end of
+     * the measurement interval
+     * @return Cumulative count of octets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedOctetsAccumulated;
+
+    /**
+     * Count of octets transmitted within the measurement interval
+     *
+     * @param transmittedOctetsDelta New value for count of octets transmitted within the measurement interval
+     * @return Count of octets transmitted within the measurement interval
+     */
+    private Long transmittedOctetsDelta;
+
+    /**
+     * Cumulative count of all packets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedTotalPacketsAccumulated New value for cumulative count of all packets transmitted as read at
+     * the end of the measurement interval
+     * @return Cumulative count of all packets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedTotalPacketsAccumulated;
+
+    /**
+     * Count of all packets transmitted within the measurement interval
+     *
+     * @param transmittedTotalPacketsDelta New value for count of all packets transmitted within the measurement
+     * interval
+     * @return Count of all packets transmitted within the measurement interval
+     */
+    private Long transmittedTotalPacketsDelta;
+
+    /**
+     * Cumulative count of unicast packets transmitted as read at the end of the measurement interval
+     *
+     * @param transmittedUnicastPacketsAccumulated New value for cumulative count of unicast packets transmitted as
+     * read at the end of the measurement interval
+     * @return Cumulative count of unicast packets transmitted as read at the end of the measurement interval
+     */
+    private Long transmittedUnicastPacketsAccumulated;
+
+
+    /**
+     * Count of unicast packets transmitted within the measurement interval
+     *
+     * @param transmittedUnicastPacketsDelta New value for count of unicast packets transmitted within the
+     * measurement interval
+     * @return Count of unicast packets transmitted within the measurement interval
+     */
+    private Long transmittedUnicastPacketsDelta;
+
+
+    /**
+     * Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other conditions
+     *
+     * @param valuesAreSuspect New value to indicate whether vNicPerformance values are likely inaccurate due to
+     * counter overflow or other conditions
+     * @return Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other
+     * conditions
+     */
+    private Boolean valuesAreSuspect;
+
+
+    /**
+     * Virtual Network Card Identifier
+     *
+     * @param vNicIdentifier New value for Virtual Network Card Identifier
+     * @return Virtual Network Card Identifier
+     */
+    private String vNicIdentifier;
+
+
+}
@@ -1,33 +1,33 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;\r
-\r
-/**\r
- * <p>\r
- *     Marker Interface all DCAE Analytics Policy Model implementations\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public interface PolicyModel extends DCAEAnalyticsModel {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy;
+
+import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel;
+
+/**
+ * <p>
+ *     Marker Interface all DCAE Analytics Policy Model implementations
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public interface PolicyModel extends DCAEAnalyticsModel {
+}
@@ -1,37 +1,37 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;\r
-\r
-/**\r
- * <p>\r
- *     A Base TCA Policy Model which accumulates all dynamic properties in a dynamicProperties Map\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public abstract class BaseTCAPolicyModel extends BaseDynamicPropertiesProvider implements TCAPolicyModel {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
+
+/**
+ * <p>
+ *     A Base TCA Policy Model which accumulates all dynamic properties in a dynamicProperties Map
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public abstract class BaseTCAPolicyModel extends BaseDynamicPropertiesProvider implements TCAPolicyModel {
+}
@@ -1,34 +1,34 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-/**\r
- * TCA Policy Closed Loop Event Status\r
- *\r
- * @author Rajiv Singla . Creation Date: 9/11/2017.\r
- */\r
-public enum ClosedLoopEventStatus implements TCAPolicyModel {\r
-\r
-    ONSET,\r
-    ABATED,\r
-    CONTINUE;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+/**
+ * TCA Policy Closed Loop Event Status
+ *
+ * @author Rajiv Singla . Creation Date: 9/11/2017.
+ */
+public enum ClosedLoopEventStatus implements TCAPolicyModel {
+
+    ONSET,
+    ABATED,
+    CONTINUE;
+
+}
@@ -1,33 +1,33 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.PolicyModel;\r
-\r
-/**\r
- * Control Loop Schema Type\r
- *\r
- * @author Rajiv Singla . Creation Date: 8/24/2017.\r
- */\r
-public enum ControlLoopSchemaType implements PolicyModel {\r
-\r
-    VNF, VM;\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import org.onap.dcae.apod.analytics.model.domain.policy.PolicyModel;
+
+/**
+ * Control Loop Schema Type
+ *
+ * @author Rajiv Singla . Creation Date: 8/24/2017.
+ */
+public enum ControlLoopSchemaType implements PolicyModel {
+
+    VNF, VM;
+}
@@ -1,76 +1,76 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import java.math.BigDecimal;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * <p>\r
- *     Enum for Threshold Direction\r
- * </p>\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public enum Direction implements TCAPolicyModel {\r
-\r
-    EQUAL {\r
-        @Override\r
-        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {\r
-            return value1.compareTo(value2) == 0;\r
-        }\r
-    },\r
-    LESS {\r
-        @Override\r
-        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {\r
-            return value1.compareTo(value2) < 0;\r
-        }\r
-    },\r
-    LESS_OR_EQUAL {\r
-        @Override\r
-        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {\r
-            return value1.compareTo(value2) <= 0;\r
-        }\r
-    },\r
-    GREATER {\r
-        @Override\r
-        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {\r
-            return value1.compareTo(value2) > 0;\r
-        }\r
-    },\r
-    GREATER_OR_EQUAL {\r
-        @Override\r
-        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {\r
-            return value1.compareTo(value2) >= 0;\r
-        }\r
-    };\r
-\r
-    /**\r
-     * Configure logic for a particular Direction\r
-     *\r
-     * @param value1 left operand for Direction operation\r
-     * @param value2 right operand for Direction operation\r
-     *\r
-     * @return result of operation for the direction logic\r
-     */\r
-    public abstract Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2);\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import java.math.BigDecimal;
+
+import javax.annotation.Nonnull;
+
+/**
+ * <p>
+ *     Enum for Threshold Direction
+ * </p>
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public enum Direction implements TCAPolicyModel {
+
+    EQUAL {
+        @Override
+        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
+            return value1.compareTo(value2) == 0;
+        }
+    },
+    LESS {
+        @Override
+        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
+            return value1.compareTo(value2) < 0;
+        }
+    },
+    LESS_OR_EQUAL {
+        @Override
+        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
+            return value1.compareTo(value2) <= 0;
+        }
+    },
+    GREATER {
+        @Override
+        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
+            return value1.compareTo(value2) > 0;
+        }
+    },
+    GREATER_OR_EQUAL {
+        @Override
+        public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
+            return value1.compareTo(value2) >= 0;
+        }
+    };
+
+    /**
+     * Configure logic for a particular Direction
+     *
+     * @param value1 left operand for Direction operation
+     * @param value2 right operand for Direction operation
+     *
+     * @return result of operation for the direction logic
+     */
+    public abstract Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2);
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-/**\r
- * TCA Metrics that need to applied to each Event Name\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class MetricsPerEventName extends BaseTCAPolicyModel{\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Event Name to which TCA Policy needs to applied.\r
-     *\r
-     * @param eventName New value for eventName to which TCA Policy needs to applied\r
-     * @return Event Name to which TCA Policy needs to applied\r
-     */\r
-    private String eventName;\r
-\r
-    /**\r
-     * Control Loop Schema Type\r
-     *\r
-     * @param controlLoopSchemaType New value for Control Loop Schema Type\r
-     * @return Control Loop Schema Type\r
-     */\r
-    private ControlLoopSchemaType controlLoopSchemaType;\r
-\r
-    /**\r
-     * Policy Scope\r
-     *\r
-     * @param policyScope New value for Policy Scope\r
-     * @return Policy Scope\r
-     */\r
-    private String policyScope;\r
-\r
-    /**\r
-     * Policy Name\r
-     *\r
-     * @param policyName New value for Policy Name\r
-     * @return Policy Name\r
-     */\r
-    private String policyName;\r
-\r
-    /**\r
-     * Policy Version\r
-     *\r
-     * @param policyVersion New value for Policy Version\r
-     * @return Policy Version\r
-     */\r
-    private String policyVersion;\r
-\r
-    /**\r
-     * Policy Thresholds\r
-     *\r
-     * @param thresholds New value for Policy Thresholds\r
-     * @return Policy Thresholds\r
-     */\r
-    private List<Threshold> thresholds;\r
-\r
-\r
-    /**\r
-     * Creates a deep copy of given {@link MetricsPerEventName}\r
-     *\r
-     * @param metricsPerEventName metrics Per Event Name that need to copied\r
-     *\r
-     * @return copy of new metrics per event Name with values copied from given metrics per Event Name\r
-     */\r
-    public static MetricsPerEventName copy(final MetricsPerEventName metricsPerEventName) {\r
-        final MetricsPerEventName newMetricsPerEventName = new MetricsPerEventName();\r
-        newMetricsPerEventName.setEventName(metricsPerEventName.getEventName());\r
-        newMetricsPerEventName.setControlLoopSchemaType(metricsPerEventName.getControlLoopSchemaType());\r
-        newMetricsPerEventName.setPolicyScope(metricsPerEventName.getPolicyScope());\r
-        newMetricsPerEventName.setPolicyName(metricsPerEventName.getPolicyName());\r
-        newMetricsPerEventName.setPolicyVersion(metricsPerEventName.getPolicyVersion());\r
-        if (metricsPerEventName.getThresholds() != null) {\r
-            List<Threshold> newThresholds = new ArrayList<>(metricsPerEventName.getThresholds().size());\r
-            for( Threshold threshold : metricsPerEventName.getThresholds()) {\r
-                newThresholds.add(Threshold.copy(threshold));\r
-            }\r
-            newMetricsPerEventName.setThresholds(newThresholds);\r
-        }\r
-        return newMetricsPerEventName;\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * TCA Metrics that need to applied to each Event Name
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MetricsPerEventName extends BaseTCAPolicyModel{
+
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Event Name to which TCA Policy needs to applied.
+     *
+     * @param eventName New value for eventName to which TCA Policy needs to applied
+     * @return Event Name to which TCA Policy needs to applied
+     */
+    private String eventName;
+
+    /**
+     * Control Loop Schema Type
+     *
+     * @param controlLoopSchemaType New value for Control Loop Schema Type
+     * @return Control Loop Schema Type
+     */
+    private ControlLoopSchemaType controlLoopSchemaType;
+
+    /**
+     * Policy Scope
+     *
+     * @param policyScope New value for Policy Scope
+     * @return Policy Scope
+     */
+    private String policyScope;
+
+    /**
+     * Policy Name
+     *
+     * @param policyName New value for Policy Name
+     * @return Policy Name
+     */
+    private String policyName;
+
+    /**
+     * Policy Version
+     *
+     * @param policyVersion New value for Policy Version
+     * @return Policy Version
+     */
+    private String policyVersion;
+
+    /**
+     * Policy Thresholds
+     *
+     * @param thresholds New value for Policy Thresholds
+     * @return Policy Thresholds
+     */
+    private List<Threshold> thresholds;
+
+
+    /**
+     * Creates a deep copy of given {@link MetricsPerEventName}
+     *
+     * @param metricsPerEventName metrics Per Event Name that need to copied
+     *
+     * @return copy of new metrics per event Name with values copied from given metrics per Event Name
+     */
+    public static MetricsPerEventName copy(final MetricsPerEventName metricsPerEventName) {
+        final MetricsPerEventName newMetricsPerEventName = new MetricsPerEventName();
+        newMetricsPerEventName.setEventName(metricsPerEventName.getEventName());
+        newMetricsPerEventName.setControlLoopSchemaType(metricsPerEventName.getControlLoopSchemaType());
+        newMetricsPerEventName.setPolicyScope(metricsPerEventName.getPolicyScope());
+        newMetricsPerEventName.setPolicyName(metricsPerEventName.getPolicyName());
+        newMetricsPerEventName.setPolicyVersion(metricsPerEventName.getPolicyVersion());
+        if (metricsPerEventName.getThresholds() != null) {
+            List<Threshold> newThresholds = new ArrayList<>(metricsPerEventName.getThresholds().size());
+            for( Threshold threshold : metricsPerEventName.getThresholds()) {
+                newThresholds.add(Threshold.copy(threshold));
+            }
+            newMetricsPerEventName.setThresholds(newThresholds);
+        }
+        return newMetricsPerEventName;
+    }
+
+
+}
@@ -1,58 +1,58 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * <p>\r
- *     TCA (Threshold Crossing Alert) Root\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class TCAPolicy extends BaseTCAPolicyModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * TCA Policy domain which is associated with TCA incoming CEF message domain\r
-     *\r
-     * @param domain New value for domain\r
-     * @return Policy domain which is associated with incoming CEF message\r
-     */\r
-    private String domain;\r
-\r
-    /**\r
-     * Contains TCA Policy metrics that needs to be applied to each Functional Role\r
-     *\r
-     * @param metricsPerEventName New value for metrics that needs to be applied to each Functional Role\r
-     * @return Contains TCA Policy metrics that needs to be applied to each Functional Role\r
-     */\r
-    private List<MetricsPerEventName> metricsPerEventName;\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * <p>
+ *     TCA (Threshold Crossing Alert) Root
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TCAPolicy extends BaseTCAPolicyModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * TCA Policy domain which is associated with TCA incoming CEF message domain
+     *
+     * @param domain New value for domain
+     * @return Policy domain which is associated with incoming CEF message
+     */
+    private String domain;
+
+    /**
+     * Contains TCA Policy metrics that needs to be applied to each Functional Role
+     *
+     * @param metricsPerEventName New value for metrics that needs to be applied to each Functional Role
+     * @return Contains TCA Policy metrics that needs to be applied to each Functional Role
+     */
+    private List<MetricsPerEventName> metricsPerEventName;
+
+
+}
@@ -1,35 +1,35 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.PolicyModel;\r
-\r
-/**\r
- * <p>\r
- *     Marker interface for all TCA Policy Models\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public interface TCAPolicyModel extends PolicyModel {\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import org.onap.dcae.apod.analytics.model.domain.policy.PolicyModel;
+
+/**
+ * <p>
+ *     Marker interface for all TCA Policy Models
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public interface TCAPolicyModel extends PolicyModel {
+
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
-\r
-import java.math.BigDecimal;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class Threshold extends BaseTCAPolicyModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    /**\r
-     * Closed Loop Control Name\r
-     *\r
-     * @param closedLoopControlName New value for Closed Loop Control Name\r
-     * @return Closed Loop Control Name\r
-     */\r
-    private String closedLoopControlName;\r
-\r
-\r
-    /**\r
-     * Closed Loop Event Status\r
-     *\r
-     * @param closedLoopEventStatus New value for Closed Loop Event Status\r
-     * @return Closed Loop Event Status\r
-     */\r
-    private ClosedLoopEventStatus closedLoopEventStatus;\r
-\r
-    /**\r
-     * Threshold Version\r
-     *\r
-     * @param version New value for Threshold Version\r
-     * @return Threshold Version\r
-     */\r
-    private String version;\r
-\r
-    /**\r
-     * Path of the field inside Common Event Format which needs to be monitored by TCA App\r
-     * for threshold crossing\r
-     *\r
-     * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA\r
-     * @return Path of the field inside Common Event Format which needs to be monitored by TCA App\r
-     */\r
-    private String fieldPath;\r
-\r
-    /**\r
-     * Threshold Value\r
-     *\r
-     * @param thresholdValue New value for Threshold Value\r
-     * @return Threshold Value\r
-     */\r
-    private Long thresholdValue;\r
-\r
-    /**\r
-     * Direction of threshold\r
-     *\r
-     * @param direction New value for Direction of threshold\r
-     * @return Direction of threshold\r
-     */\r
-    private Direction direction;\r
-\r
-    /**\r
-     * Severity of Event based on CEF Convention\r
-     *\r
-     * @param severity New value for Severity of Event based on CEF Convention\r
-     * @return Severity of Event based on CEF Convention\r
-     */\r
-    private EventSeverity severity;\r
-\r
-\r
-    /**\r
-     * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization\r
-     *\r
-     *\r
-     * @param actualFieldValue new value for actual Field value that caused the violation\r
-     * @return actual field value that caused the violation\r
-     */\r
-    private BigDecimal actualFieldValue;\r
-\r
-    /**\r
-     * Creates a deep copy of give {@link Threshold}\r
-     *\r
-     * @param threshold threshold that need to be copied\r
-     *\r
-     * @return new instance of threshold with copied value for give threshold\r
-     */\r
-    public static Threshold copy(final Threshold threshold) {\r
-        final Threshold newThreshold = new Threshold();\r
-        newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName());\r
-        newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus());\r
-        newThreshold.setFieldPath(threshold.getFieldPath());\r
-        newThreshold.setThresholdValue(threshold.getThresholdValue());\r
-        newThreshold.setDirection(threshold.getDirection());\r
-        newThreshold.setSeverity(threshold.getSeverity());\r
-        newThreshold.setVersion(threshold.getVersion());\r
-        newThreshold.setActualFieldValue(threshold.getActualFieldValue());\r
-        return newThreshold;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.policy.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Threshold extends BaseTCAPolicyModel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Closed Loop Control Name
+     *
+     * @param closedLoopControlName New value for Closed Loop Control Name
+     * @return Closed Loop Control Name
+     */
+    private String closedLoopControlName;
+
+
+    /**
+     * Closed Loop Event Status
+     *
+     * @param closedLoopEventStatus New value for Closed Loop Event Status
+     * @return Closed Loop Event Status
+     */
+    private ClosedLoopEventStatus closedLoopEventStatus;
+
+    /**
+     * Threshold Version
+     *
+     * @param version New value for Threshold Version
+     * @return Threshold Version
+     */
+    private String version;
+
+    /**
+     * Path of the field inside Common Event Format which needs to be monitored by TCA App
+     * for threshold crossing
+     *
+     * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA
+     * @return Path of the field inside Common Event Format which needs to be monitored by TCA App
+     */
+    private String fieldPath;
+
+    /**
+     * Threshold Value
+     *
+     * @param thresholdValue New value for Threshold Value
+     * @return Threshold Value
+     */
+    private Long thresholdValue;
+
+    /**
+     * Direction of threshold
+     *
+     * @param direction New value for Direction of threshold
+     * @return Direction of threshold
+     */
+    private Direction direction;
+
+    /**
+     * Severity of Event based on CEF Convention
+     *
+     * @param severity New value for Severity of Event based on CEF Convention
+     * @return Severity of Event based on CEF Convention
+     */
+    private EventSeverity severity;
+
+
+    /**
+     * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization
+     *
+     *
+     * @param actualFieldValue new value for actual Field value that caused the violation
+     * @return actual field value that caused the violation
+     */
+    private BigDecimal actualFieldValue;
+
+    /**
+     * Creates a deep copy of give {@link Threshold}
+     *
+     * @param threshold threshold that need to be copied
+     *
+     * @return new instance of threshold with copied value for give threshold
+     */
+    public static Threshold copy(final Threshold threshold) {
+        final Threshold newThreshold = new Threshold();
+        newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName());
+        newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus());
+        newThreshold.setFieldPath(threshold.getFieldPath());
+        newThreshold.setThresholdValue(threshold.getThresholdValue());
+        newThreshold.setDirection(threshold.getDirection());
+        newThreshold.setSeverity(threshold.getSeverity());
+        newThreshold.setVersion(threshold.getVersion());
+        newThreshold.setActualFieldValue(threshold.getActualFieldValue());
+        return newThreshold;
+    }
+
+}
@@ -1,33 +1,33 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.facade;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;\r
-\r
-/**\r
- * <p>\r
- *     Marker Interface for all Facade (outgoing) DCAE Analytics Model\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public interface FacadeModel extends DCAEAnalyticsModel {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.facade;
+
+import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel;
+
+/**
+ * <p>
+ *     Marker Interface for all Facade (outgoing) DCAE Analytics Model
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public interface FacadeModel extends DCAEAnalyticsModel {
+}
@@ -1,41 +1,41 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.facade.tca;\r
-\r
-import lombok.Data;\r
-import lombok.EqualsAndHashCode;\r
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-@Data\r
-@EqualsAndHashCode(callSuper = true)\r
-public class AAI extends BaseDynamicPropertiesProvider implements TCAFacadeModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private String genericVNFName;\r
-\r
-    private String genericServerName;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.facade.tca;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AAI extends BaseDynamicPropertiesProvider implements TCAFacadeModel {
+
+    private static final long serialVersionUID = 1L;
+
+    private String genericVNFName;
+
+    private String genericServerName;
+
+}
@@ -1,31 +1,31 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.facade.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.facade.FacadeModel;\r
-\r
-/**\r
- * Marker Interface for all TCA Facade Models\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public interface TCAFacadeModel extends FacadeModel {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.facade.tca;
+
+import org.onap.dcae.apod.analytics.model.facade.FacadeModel;
+
+/**
+ * Marker Interface for all TCA Facade Models
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public interface TCAFacadeModel extends FacadeModel {
+}
@@ -1,50 +1,50 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.facade.tca;\r
-\r
-import lombok.Data;\r
-\r
-/**\r
- * Response generated by TCA for VES Message\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-@Data\r
-public class TCAVESResponse implements TCAFacadeModel {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private AAI aai;\r
-    private Long closedLoopAlarmEnd;\r
-    private Long closedLoopAlarmStart;\r
-    private String closedLoopControlName;\r
-    private String closedLoopEventClient;\r
-    private String closedLoopEventStatus;\r
-    private String from;\r
-    private String policyName;\r
-    private String policyScope;\r
-    private String policyVersion;\r
-    private String requestID;\r
-    private String target;\r
-    private String targetType;\r
-    private String version;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.facade.tca;
+
+import lombok.Data;
+
+/**
+ * Response generated by TCA for VES Message
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+@Data
+public class TCAVESResponse implements TCAFacadeModel {
+
+    private static final long serialVersionUID = 1L;
+
+    private AAI aai;
+    private Long closedLoopAlarmEnd;
+    private Long closedLoopAlarmStart;
+    private String closedLoopControlName;
+    private String closedLoopEventClient;
+    private String closedLoopEventStatus;
+    private String from;
+    private String policyName;
+    private String policyScope;
+    private String policyVersion;
+    private String requestID;
+    private String target;
+    private String targetType;
+    private String version;
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util;\r
-\r
-import com.fasterxml.jackson.core.JsonParseException;\r
-import com.fasterxml.jackson.databind.JsonMappingException;\r
-import java.io.FileNotFoundException;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.InputStreamReader;\r
-import java.nio.charset.Charset;\r
-import java.util.Properties;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * Utility class containing methods for IO related operations\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/17/2016.\r
- */\r
-public abstract class AnalyticsModelIOUtils extends AnalyticsModelJsonUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(AnalyticsModelIOUtils.class);\r
-\r
-    /**\r
-     * Parses given valid JSON file Location to object of given binding class type.\r
-     *\r
-     * @param fileLocation valid JSON File Location\r
-     * @param bindingClass class Type of Binding object\r
-     *\r
-     * @param <T>  binding Class Type\r
-     *\r
-     * @return binding Class Object which properties populated from JSON File Location\r
-     * @throws IOException when fails to do IO operations\r
-     */\r
-    public static final <T> T convertToJsonObject(String fileLocation, Class<T> bindingClass) throws IOException {\r
-\r
-        // Load Resource from give path\r
-        final InputStream resourceAsStream = loadResourceAsStream(fileLocation);\r
-\r
-        // If resource is null throw an exception\r
-        if (resourceAsStream == null) {\r
-            final String errorMessage = String.format("Invalid File location: %s", fileLocation);\r
-            throw new IOException(errorMessage, new FileNotFoundException(errorMessage));\r
-        }\r
-\r
-        // Parse input stream\r
-        try (InputStreamReader inputStreamReader = new InputStreamReader(resourceAsStream, Charset.forName("UTF-8"))) {\r
-\r
-            return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStreamReader, bindingClass);\r
-        } catch (JsonMappingException | JsonParseException e) {\r
-\r
-            // If parsing fails due to Invalid Json or Json IO Issues throw an exception\r
-            final String errorMessage = String.format("Json parsing error while parsing Json File location: %s",\r
-                    fileLocation);\r
-\r
-            LOG.error(errorMessage);\r
-            throw new IOException(errorMessage, e);\r
-        } catch (IOException e) {\r
-\r
-            // If parsing fails due to IO Issues throw an exception\r
-            final String errorMessage = String.format("IO Error while parsing Json File location: %s", fileLocation);\r
-            LOG.error(errorMessage);\r
-            throw new IOException(errorMessage, e);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Loads properties from a given file location. Throws {@link RuntimeException} if file location is invalid\r
-     * or there were exception when loading properties\r
-     *\r
-     * @param propertiesFileLocation path string for properties file\r
-     * @param properties properties object that needs to be populated with give file properties\r
-     *\r
-     * @return properties object with populated properties from properties file\r
-     *\r
-     */\r
-    public static Properties loadPropertiesFile(String propertiesFileLocation, final Properties properties) {\r
-\r
-        // Load Resource from give properties file path\r
-        final InputStream propertiesFileInputStream = loadResourceAsStream(propertiesFileLocation);\r
-\r
-        // If properties file is not present throw an exception\r
-        if (propertiesFileInputStream == null) {\r
-            final String errorMessage = String.format("Invalid Properties File at location: %s",\r
-                propertiesFileLocation);\r
-            //TODO: discuss and change this excpeiton as well.\r
-            throw new RuntimeException(errorMessage, new FileNotFoundException(errorMessage));\r
-        }\r
-\r
-        try {\r
-            properties.load(propertiesFileInputStream);\r
-        } catch (IOException e) {\r
-            final String errorMessage = String.format("IO Exception while reading Properties File at location: %s",\r
-                    propertiesFileLocation);\r
-            throw new RuntimeException(errorMessage, e);\r
-        }\r
-\r
-        return properties;\r
-\r
-    }\r
-\r
-    /**\r
-     * Loads Input file from the given classpath file location and returns file InputStream\r
-     *\r
-     * @param fileLocation classpath file location\r
-     *\r
-     * @return {@link InputStream} for classpath file\r
-     */\r
-    public static InputStream loadResourceAsStream(String fileLocation) {\r
-        // Load Resource from give path\r
-        return Thread.currentThread().getContextClassLoader().getResourceAsStream(fileLocation);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.util.Properties;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Utility class containing methods for IO related operations
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+public abstract class AnalyticsModelIOUtils extends AnalyticsModelJsonUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(AnalyticsModelIOUtils.class);
+
+    /**
+     * Parses given valid JSON file Location to object of given binding class type.
+     *
+     * @param fileLocation valid JSON File Location
+     * @param bindingClass class Type of Binding object
+     *
+     * @param <T>  binding Class Type
+     *
+     * @return binding Class Object which properties populated from JSON File Location
+     * @throws IOException when fails to do IO operations
+     */
+    public static final <T> T convertToJsonObject(String fileLocation, Class<T> bindingClass) throws IOException {
+
+        // Load Resource from give path
+        final InputStream resourceAsStream = loadResourceAsStream(fileLocation);
+
+        // If resource is null throw an exception
+        if (resourceAsStream == null) {
+            final String errorMessage = String.format("Invalid File location: %s", fileLocation);
+            throw new IOException(errorMessage, new FileNotFoundException(errorMessage));
+        }
+
+        // Parse input stream
+        try (InputStreamReader inputStreamReader = new InputStreamReader(resourceAsStream, Charset.forName("UTF-8"))) {
+
+            return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStreamReader, bindingClass);
+        } catch (JsonMappingException | JsonParseException e) {
+
+            // If parsing fails due to Invalid Json or Json IO Issues throw an exception
+            final String errorMessage = String.format("Json parsing error while parsing Json File location: %s",
+                    fileLocation);
+
+            LOG.error(errorMessage);
+            throw new IOException(errorMessage, e);
+        } catch (IOException e) {
+
+            // If parsing fails due to IO Issues throw an exception
+            final String errorMessage = String.format("IO Error while parsing Json File location: %s", fileLocation);
+            LOG.error(errorMessage);
+            throw new IOException(errorMessage, e);
+        }
+    }
+
+    /**
+     * Loads properties from a given file location. Throws {@link RuntimeException} if file location is invalid
+     * or there were exception when loading properties
+     *
+     * @param propertiesFileLocation path string for properties file
+     * @param properties properties object that needs to be populated with give file properties
+     *
+     * @return properties object with populated properties from properties file
+     *
+     */
+    public static Properties loadPropertiesFile(String propertiesFileLocation, final Properties properties) {
+
+        // Load Resource from give properties file path
+        final InputStream propertiesFileInputStream = loadResourceAsStream(propertiesFileLocation);
+
+        // If properties file is not present throw an exception
+        if (propertiesFileInputStream == null) {
+            final String errorMessage = String.format("Invalid Properties File at location: %s",
+                propertiesFileLocation);
+            //TODO: discuss and change this excpeiton as well.
+            throw new RuntimeException(errorMessage, new FileNotFoundException(errorMessage));
+        }
+
+        try {
+            properties.load(propertiesFileInputStream);
+        } catch (IOException e) {
+            final String errorMessage = String.format("IO Exception while reading Properties File at location: %s",
+                    propertiesFileLocation);
+            throw new RuntimeException(errorMessage, e);
+        }
+
+        return properties;
+
+    }
+
+    /**
+     * Loads Input file from the given classpath file location and returns file InputStream
+     *
+     * @param fileLocation classpath file location
+     *
+     * @return {@link InputStream} for classpath file
+     */
+    public static InputStream loadResourceAsStream(String fileLocation) {
+        // Load Resource from give path
+        return Thread.currentThread().getContextClassLoader().getResourceAsStream(fileLocation);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public abstract class AnalyticsModelJsonUtils {\r
-\r
-    /**\r
-     * Object mapper to be used for all TCA Json Parsing\r
-     */\r
-    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =\r
-            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();\r
-\r
-\r
-    /**\r
-     * Converts Input Stream to given type reference object\r
-     *\r
-     * @param inputStream input stream\r
-     * @param valueTypeRef type reference\r
-     * @param <T> type of type reference\r
-     *\r
-     * @return parsed json object\r
-     *\r
-     * @throws IOException IO Exception\r
-     */\r
-    public static <T> T readValue(InputStream inputStream, TypeReference<T> valueTypeRef) throws IOException {\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, valueTypeRef);\r
-    }\r
-\r
-\r
-    /**\r
-     * Converts Input Stream to given target class object\r
-     *\r
-     * @param inputStream input stream\r
-     * @param targetClass target class type\r
-     * @param <T> type of class\r
-     *\r
-     * @return parsed json object\r
-     *\r
-     * @throws IOException IO Exception\r
-     */\r
-    public static <T> T readValue(InputStream inputStream, Class<T> targetClass) throws IOException {\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, targetClass);\r
-    }\r
-\r
-\r
-    /**\r
-     * Converts given object to JSON string\r
-     *\r
-     * @param value object that needs to converted to json string\r
-     *\r
-     * @return json string\r
-     * @throws JsonProcessingException Json Processing exception\r
-     */\r
-    public static String writeValueAsString(Object value) throws JsonProcessingException {\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(value);\r
-    }\r
-\r
-\r
-    /**\r
-     *  Method to deserialize JSON content from given JSON content String.\r
-     *\r
-     * @param jsonString JSON String\r
-     * @param objectClass target object class\r
-     * @param <T> object class type\r
-     *\r
-     * @return converted Object from JSON String\r
-     *\r
-     * @throws IOException IO Exception\r
-     */\r
-    public static <T> T readValue(final String jsonString, final Class<T> objectClass) throws IOException {\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonString, objectClass);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public abstract class AnalyticsModelJsonUtils {
+
+    /**
+     * Object mapper to be used for all TCA Json Parsing
+     */
+    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =
+            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();
+
+
+    /**
+     * Converts Input Stream to given type reference object
+     *
+     * @param inputStream input stream
+     * @param valueTypeRef type reference
+     * @param <T> type of type reference
+     *
+     * @return parsed json object
+     *
+     * @throws IOException IO Exception
+     */
+    public static <T> T readValue(InputStream inputStream, TypeReference<T> valueTypeRef) throws IOException {
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, valueTypeRef);
+    }
+
+
+    /**
+     * Converts Input Stream to given target class object
+     *
+     * @param inputStream input stream
+     * @param targetClass target class type
+     * @param <T> type of class
+     *
+     * @return parsed json object
+     *
+     * @throws IOException IO Exception
+     */
+    public static <T> T readValue(InputStream inputStream, Class<T> targetClass) throws IOException {
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, targetClass);
+    }
+
+
+    /**
+     * Converts given object to JSON string
+     *
+     * @param value object that needs to converted to json string
+     *
+     * @return json string
+     * @throws JsonProcessingException Json Processing exception
+     */
+    public static String writeValueAsString(Object value) throws JsonProcessingException {
+        return ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(value);
+    }
+
+
+    /**
+     *  Method to deserialize JSON content from given JSON content String.
+     *
+     * @param jsonString JSON String
+     * @param objectClass target object class
+     * @param <T> object class type
+     *
+     * @return converted Object from JSON String
+     *
+     * @throws IOException IO Exception
+     */
+    public static <T> T readValue(final String jsonString, final Class<T> objectClass) throws IOException {
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonString, objectClass);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-import com.fasterxml.jackson.databind.DeserializationFeature;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Supplier;\r
-import com.jayway.jsonpath.Configuration;\r
-import com.jayway.jsonpath.JsonPath;\r
-import com.jayway.jsonpath.Option;\r
-import com.jayway.jsonpath.spi.json.JacksonJsonProvider;\r
-import com.jayway.jsonpath.spi.json.JsonProvider;\r
-import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider;\r
-import com.jayway.jsonpath.spi.mapper.MappingProvider;\r
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\r
-\r
-import java.util.EnumSet;\r
-import java.util.Set;\r
-\r
-/**\r
- *<p>\r
- *     {@link Supplier} that can be used by clients to get Object Mapper which specializes\r
- *     in serialize and deserialize - DCAE Analytics Model JSON Objects. Clients can\r
- *     choose to memoize this Supplier for performance enhancements\r
- *     <br>\r
- *     NOTE: This supplier also setups up {@link JsonPath} default\r
- *     config to make use of this Supplier object mapper\r
- *</p>\r
- * @author Rajiv Singla . Creation Date: 11/10/2016.\r
- */\r
-@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON")\r
-public class AnalyticsModelObjectMapperSupplier implements Supplier<ObjectMapper> {\r
-\r
-    @Override\r
-    public ObjectMapper get() {\r
-\r
-        final ObjectMapper objectMapper = new ObjectMapper();\r
-\r
-        // Serialize null values\r
-        objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\r
-\r
-        // Don't fail on unknown properties\r
-        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\r
-\r
-        // Register Common Event Format Module\r
-        objectMapper.registerModule(new CommonEventFormatModule());\r
-        // Register TCA Policy Module\r
-        objectMapper.registerModule(new TCAPolicyModule());\r
-        // Register TCA Facade Module\r
-        objectMapper.registerModule(new TCAFacadeModelModule());\r
-        // Register TCA Controller App Config Module\r
-        objectMapper.registerModule(new TCAControllerConfigModule());\r
-\r
-\r
-        // Setup JsonPath default config\r
-        setupJsonPathDefaultConfig(objectMapper);\r
-\r
-        return objectMapper;\r
-    }\r
-\r
-\r
-    /**\r
-     * Setups up default Config for {@link JsonPath}\r
-     *\r
-     * @param objectMapper Jackson object mapper\r
-     */\r
-    private void setupJsonPathDefaultConfig(final ObjectMapper objectMapper) {\r
-\r
-        Configuration.setDefaults(new Configuration.Defaults() {\r
-\r
-            private final JsonProvider jsonProvider = new JacksonJsonProvider(objectMapper);\r
-            private final MappingProvider mappingProvider = new JacksonMappingProvider(objectMapper);\r
-\r
-            @Override\r
-            public JsonProvider jsonProvider() {\r
-                return jsonProvider;\r
-            }\r
-\r
-            @Override\r
-            public MappingProvider mappingProvider() {\r
-                return mappingProvider;\r
-            }\r
-\r
-            @Override\r
-            public Set<Option> options() {\r
-\r
-                // Json Path exceptions are suppressed, also missing properties are tolerated\r
-                return EnumSet.of(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,\r
-                        Option.ALWAYS_RETURN_LIST);\r
-            }\r
-        });\r
-\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Supplier;
+import com.jayway.jsonpath.Configuration;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.Option;
+import com.jayway.jsonpath.spi.json.JacksonJsonProvider;
+import com.jayway.jsonpath.spi.json.JsonProvider;
+import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider;
+import com.jayway.jsonpath.spi.mapper.MappingProvider;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+import java.util.EnumSet;
+import java.util.Set;
+
+/**
+ *<p>
+ *     {@link Supplier} that can be used by clients to get Object Mapper which specializes
+ *     in serialize and deserialize - DCAE Analytics Model JSON Objects. Clients can
+ *     choose to memoize this Supplier for performance enhancements
+ *     <br>
+ *     NOTE: This supplier also setups up {@link JsonPath} default
+ *     config to make use of this Supplier object mapper
+ *</p>
+ * @author Rajiv Singla . Creation Date: 11/10/2016.
+ */
+@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON")
+public class AnalyticsModelObjectMapperSupplier implements Supplier<ObjectMapper> {
+
+    @Override
+    public ObjectMapper get() {
+
+        final ObjectMapper objectMapper = new ObjectMapper();
+
+        // Serialize null values
+        objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+
+        // Don't fail on unknown properties
+        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+        // Register Common Event Format Module
+        objectMapper.registerModule(new CommonEventFormatModule());
+        // Register TCA Policy Module
+        objectMapper.registerModule(new TCAPolicyModule());
+        // Register TCA Facade Module
+        objectMapper.registerModule(new TCAFacadeModelModule());
+        // Register TCA Controller App Config Module
+        objectMapper.registerModule(new TCAControllerConfigModule());
+
+
+        // Setup JsonPath default config
+        setupJsonPathDefaultConfig(objectMapper);
+
+        return objectMapper;
+    }
+
+
+    /**
+     * Setups up default Config for {@link JsonPath}
+     *
+     * @param objectMapper Jackson object mapper
+     */
+    private void setupJsonPathDefaultConfig(final ObjectMapper objectMapper) {
+
+        Configuration.setDefaults(new Configuration.Defaults() {
+
+            private final JsonProvider jsonProvider = new JacksonJsonProvider(objectMapper);
+            private final MappingProvider mappingProvider = new JacksonMappingProvider(objectMapper);
+
+            @Override
+            public JsonProvider jsonProvider() {
+                return jsonProvider;
+            }
+
+            @Override
+            public MappingProvider mappingProvider() {
+                return mappingProvider;
+            }
+
+            @Override
+            public Set<Option> options() {
+
+                // Json Path exceptions are suppressed, also missing properties are tolerated
+                return EnumSet.of(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,
+                        Option.ALWAYS_RETURN_LIST);
+            }
+        });
+
+
+    }
+
+}
@@ -1,96 +1,96 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json;\r
-\r
-import com.fasterxml.jackson.core.Version;\r
-import com.fasterxml.jackson.databind.module.SimpleModule;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertAction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.BaseCEFModel;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.CommonEventHeader;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Criticality;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Event;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Field;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.InternalHeaderFields;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.MeasurementsForVfScalingFields;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.PerformanceCounter;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Priority;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.ThresholdCrossingAlertFields;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.VNicPerformance;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.AlertActionMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.AlertTypeMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.BaseCEFModelMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.CommonEventHeaderMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.CriticalityMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.DomainMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.EventListenerMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.EventMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.EventSeverityMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.FieldMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.InternalHeaderFieldsMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.MeasurementsForVfScalingFieldsMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.NamedArrayOfFieldsMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.PerformanceCounterMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.PriorityMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.ThresholdCrossingAlertFieldsMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.VNicUsageArrayMixin;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/18/2016.\r
- */\r
-public class CommonEventFormatModule extends SimpleModule {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    public CommonEventFormatModule() {\r
-        super("Common Event Format",\r
-                new Version(28, 3, 0, null, " org.openecomp.dcae.apod.analytics.model", "dcae-analytics-model"));\r
-    }\r
-\r
-    @Override\r
-    public void setupModule(final SetupContext setupContext) {\r
-\r
-        setupContext.setMixInAnnotations(AlertAction.class, AlertActionMixin.class);\r
-        setupContext.setMixInAnnotations(AlertType.class, AlertTypeMixin.class);\r
-        setupContext.setMixInAnnotations(BaseCEFModel.class, BaseCEFModelMixin.class);\r
-        setupContext.setMixInAnnotations(CommonEventHeader.class, CommonEventHeaderMixin.class);\r
-        setupContext.setMixInAnnotations(Domain.class, DomainMixin.class);\r
-        setupContext.setMixInAnnotations(InternalHeaderFields.class, InternalHeaderFieldsMixin.class);\r
-        setupContext.setMixInAnnotations(Field.class, FieldMixin.class);\r
-        setupContext.setMixInAnnotations(NamedArrayOfFields.class, NamedArrayOfFieldsMixin.class);\r
-        setupContext.setMixInAnnotations(Criticality.class, CriticalityMixin.class);\r
-        setupContext.setMixInAnnotations(EventListener.class, EventListenerMixin.class);\r
-        setupContext.setMixInAnnotations(Event.class, EventMixin.class);\r
-        setupContext.setMixInAnnotations(EventSeverity.class, EventSeverityMixin.class);\r
-        setupContext.setMixInAnnotations(MeasurementsForVfScalingFields.class,\r
-                MeasurementsForVfScalingFieldsMixin.class);\r
-        setupContext.setMixInAnnotations(PerformanceCounter.class, PerformanceCounterMixin.class);\r
-        setupContext.setMixInAnnotations(Priority.class, PriorityMixin.class);\r
-        setupContext.setMixInAnnotations(ThresholdCrossingAlertFields.class, ThresholdCrossingAlertFieldsMixin.class);\r
-        setupContext.setMixInAnnotations(VNicPerformance.class, VNicUsageArrayMixin.class);\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json;
+
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.onap.dcae.apod.analytics.model.domain.cef.AlertAction;
+import org.onap.dcae.apod.analytics.model.domain.cef.AlertType;
+import org.onap.dcae.apod.analytics.model.domain.cef.BaseCEFModel;
+import org.onap.dcae.apod.analytics.model.domain.cef.CommonEventHeader;
+import org.onap.dcae.apod.analytics.model.domain.cef.Criticality;
+import org.onap.dcae.apod.analytics.model.domain.cef.Domain;
+import org.onap.dcae.apod.analytics.model.domain.cef.Event;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity;
+import org.onap.dcae.apod.analytics.model.domain.cef.Field;
+import org.onap.dcae.apod.analytics.model.domain.cef.InternalHeaderFields;
+import org.onap.dcae.apod.analytics.model.domain.cef.MeasurementsForVfScalingFields;
+import org.onap.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields;
+import org.onap.dcae.apod.analytics.model.domain.cef.PerformanceCounter;
+import org.onap.dcae.apod.analytics.model.domain.cef.Priority;
+import org.onap.dcae.apod.analytics.model.domain.cef.ThresholdCrossingAlertFields;
+import org.onap.dcae.apod.analytics.model.domain.cef.VNicPerformance;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.AlertActionMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.AlertTypeMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.BaseCEFModelMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.CommonEventHeaderMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.CriticalityMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.DomainMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.EventListenerMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.EventMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.EventSeverityMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.FieldMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.InternalHeaderFieldsMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.MeasurementsForVfScalingFieldsMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.NamedArrayOfFieldsMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.PerformanceCounterMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.PriorityMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.ThresholdCrossingAlertFieldsMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.VNicUsageArrayMixin;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/18/2016.
+ */
+public class CommonEventFormatModule extends SimpleModule {
+
+    private static final long serialVersionUID = 1L;
+
+    public CommonEventFormatModule() {
+        super("Common Event Format",
+                new Version(28, 3, 0, null, " org.onap.dcae.apod.analytics.model", "dcae-analytics-model"));
+    }
+
+    @Override
+    public void setupModule(final SetupContext setupContext) {
+
+        setupContext.setMixInAnnotations(AlertAction.class, AlertActionMixin.class);
+        setupContext.setMixInAnnotations(AlertType.class, AlertTypeMixin.class);
+        setupContext.setMixInAnnotations(BaseCEFModel.class, BaseCEFModelMixin.class);
+        setupContext.setMixInAnnotations(CommonEventHeader.class, CommonEventHeaderMixin.class);
+        setupContext.setMixInAnnotations(Domain.class, DomainMixin.class);
+        setupContext.setMixInAnnotations(InternalHeaderFields.class, InternalHeaderFieldsMixin.class);
+        setupContext.setMixInAnnotations(Field.class, FieldMixin.class);
+        setupContext.setMixInAnnotations(NamedArrayOfFields.class, NamedArrayOfFieldsMixin.class);
+        setupContext.setMixInAnnotations(Criticality.class, CriticalityMixin.class);
+        setupContext.setMixInAnnotations(EventListener.class, EventListenerMixin.class);
+        setupContext.setMixInAnnotations(Event.class, EventMixin.class);
+        setupContext.setMixInAnnotations(EventSeverity.class, EventSeverityMixin.class);
+        setupContext.setMixInAnnotations(MeasurementsForVfScalingFields.class,
+                MeasurementsForVfScalingFieldsMixin.class);
+        setupContext.setMixInAnnotations(PerformanceCounter.class, PerformanceCounterMixin.class);
+        setupContext.setMixInAnnotations(Priority.class, PriorityMixin.class);
+        setupContext.setMixInAnnotations(ThresholdCrossingAlertFields.class, ThresholdCrossingAlertFieldsMixin.class);
+        setupContext.setMixInAnnotations(VNicPerformance.class, VNicUsageArrayMixin.class);
+
+    }
+
+}
@@ -1,59 +1,59 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json;\r
-\r
-import com.fasterxml.jackson.core.Version;\r
-import com.fasterxml.jackson.databind.module.SimpleModule;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.BaseTCAAppConfigModel;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.BaseTCAHandle;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsPublishes;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsSubscribes;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAAppConfigModelMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAHandleMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.DMAAPInfoMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsPublishesMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsSubscribesMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.TCAControllerAppConfigMixin;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public class TCAControllerConfigModule extends SimpleModule {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    public TCAControllerConfigModule() {\r
-        super("Threshold Crossing Alert Controller Config",\r
-                new Version(1, 0, 0, null, "org.openecomp.dace.apod.analytics.model", "dcae-analytics-model"));\r
-    }\r
-\r
-    @Override\r
-    public void setupModule(final SetupContext setupContext) {\r
-        setupContext.setMixInAnnotations(BaseTCAAppConfigModel.class, BaseTCAAppConfigModelMixin.class);\r
-        setupContext.setMixInAnnotations(BaseTCAHandle.class, BaseTCAHandleMixin.class);\r
-        setupContext.setMixInAnnotations(DMAAPInfo.class, DMAAPInfoMixin.class);\r
-        setupContext.setMixInAnnotations(StreamsPublishes.class, StreamsPublishesMixin.class);\r
-        setupContext.setMixInAnnotations(StreamsSubscribes.class, StreamsSubscribesMixin.class);\r
-        setupContext.setMixInAnnotations(TCAControllerAppConfig.class, TCAControllerAppConfigMixin.class);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json;
+
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.onap.dcae.apod.analytics.model.config.tca.BaseTCAAppConfigModel;
+import org.onap.dcae.apod.analytics.model.config.tca.BaseTCAHandle;
+import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo;
+import org.onap.dcae.apod.analytics.model.config.tca.StreamsPublishes;
+import org.onap.dcae.apod.analytics.model.config.tca.StreamsSubscribes;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAAppConfigModelMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAHandleMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.DMAAPInfoMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsPublishesMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsSubscribesMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.TCAControllerAppConfigMixin;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public class TCAControllerConfigModule extends SimpleModule {
+
+    private static final long serialVersionUID = 1L;
+
+    public TCAControllerConfigModule() {
+        super("Threshold Crossing Alert Controller Config",
+                new Version(1, 0, 0, null, "org.onap.dcae.apod.analytics.model", "dcae-analytics-model"));
+    }
+
+    @Override
+    public void setupModule(final SetupContext setupContext) {
+        setupContext.setMixInAnnotations(BaseTCAAppConfigModel.class, BaseTCAAppConfigModelMixin.class);
+        setupContext.setMixInAnnotations(BaseTCAHandle.class, BaseTCAHandleMixin.class);
+        setupContext.setMixInAnnotations(DMAAPInfo.class, DMAAPInfoMixin.class);
+        setupContext.setMixInAnnotations(StreamsPublishes.class, StreamsPublishesMixin.class);
+        setupContext.setMixInAnnotations(StreamsSubscribes.class, StreamsSubscribesMixin.class);
+        setupContext.setMixInAnnotations(TCAControllerAppConfig.class, TCAControllerAppConfigMixin.class);
+    }
+}
@@ -1,49 +1,49 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json;\r
-\r
-import com.fasterxml.jackson.core.Version;\r
-import com.fasterxml.jackson.databind.module.SimpleModule;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.AAI;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca.AAIMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca.VESCEFMessageResponseMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCAFacadeModelModule extends SimpleModule {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    public TCAFacadeModelModule() {\r
-        super("Threshold Crossing Alert Facade",\r
-                new Version(1, 0, 0, null, "org.openecomp.dace.apod.analytics.model", "dcae-analytics-model"));\r
-    }\r
-\r
-    @Override\r
-    public void setupModule(final SetupContext setupContext) {\r
-        setupContext.setMixInAnnotations(TCAVESResponse.class, VESCEFMessageResponseMixin.class);\r
-        setupContext.setMixInAnnotations(AAI.class, AAIMixin.class);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json;
+
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.onap.dcae.apod.analytics.model.facade.tca.AAI;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca.AAIMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca.VESCEFMessageResponseMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCAFacadeModelModule extends SimpleModule {
+
+    private static final long serialVersionUID = 1L;
+
+    public TCAFacadeModelModule() {
+        super("Threshold Crossing Alert Facade",
+                new Version(1, 0, 0, null, "org.onap.dcae.apod.analytics.model", "dcae-analytics-model"));
+    }
+
+    @Override
+    public void setupModule(final SetupContext setupContext) {
+        setupContext.setMixInAnnotations(TCAVESResponse.class, VESCEFMessageResponseMixin.class);
+        setupContext.setMixInAnnotations(AAI.class, AAIMixin.class);
+    }
+
+}
@@ -1,64 +1,64 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json;\r
-\r
-import com.fasterxml.jackson.core.Version;\r
-import com.fasterxml.jackson.databind.module.SimpleModule;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.BaseTCAPolicyModel;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ClosedLoopEventStatusMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ControlLoopSchemaTypeMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.DirectionMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.MetricsPerEventNameMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.TCAPolicyMixin;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ThresholdMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public class TCAPolicyModule extends SimpleModule {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    public TCAPolicyModule() {\r
-        super("Threshold Crossing Alert Policy",\r
-                new Version(1, 0, 0, null, " org.openecomp.dcae.apod.analytics.model", "dcae-analytics-model"));\r
-    }\r
-\r
-    @Override\r
-    public void setupModule(final SetupContext setupContext) {\r
-        setupContext.setMixInAnnotations(BaseTCAPolicyModel.class, BaseTCAPolicyModelMixin.class);\r
-        setupContext.setMixInAnnotations(ControlLoopSchemaType.class, ControlLoopSchemaTypeMixin.class);\r
-        setupContext.setMixInAnnotations(Direction.class, DirectionMixin.class);\r
-        setupContext.setMixInAnnotations(ClosedLoopEventStatus.class, ClosedLoopEventStatusMixin.class);\r
-        setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);\r
-        setupContext.setMixInAnnotations(MetricsPerEventName.class, MetricsPerEventNameMixin.class);\r
-        setupContext.setMixInAnnotations(Threshold.class, ThresholdMixin.class);\r
-        setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json;
+
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.BaseTCAPolicyModel;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.ClosedLoopEventStatusMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.ControlLoopSchemaTypeMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.DirectionMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.MetricsPerEventNameMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.TCAPolicyMixin;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.ThresholdMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public class TCAPolicyModule extends SimpleModule {
+
+    private static final long serialVersionUID = 1L;
+
+    public TCAPolicyModule() {
+        super("Threshold Crossing Alert Policy",
+                new Version(1, 0, 0, null, " org.onap.dcae.apod.analytics.model", "dcae-analytics-model"));
+    }
+
+    @Override
+    public void setupModule(final SetupContext setupContext) {
+        setupContext.setMixInAnnotations(BaseTCAPolicyModel.class, BaseTCAPolicyModelMixin.class);
+        setupContext.setMixInAnnotations(ControlLoopSchemaType.class, ControlLoopSchemaTypeMixin.class);
+        setupContext.setMixInAnnotations(Direction.class, DirectionMixin.class);
+        setupContext.setMixInAnnotations(ClosedLoopEventStatus.class, ClosedLoopEventStatusMixin.class);
+        setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);
+        setupContext.setMixInAnnotations(MetricsPerEventName.class, MetricsPerEventNameMixin.class);
+        setupContext.setMixInAnnotations(Threshold.class, ThresholdMixin.class);
+        setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);
+    }
+}
@@ -1,61 +1,61 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin;\r
-\r
-import com.fasterxml.jackson.annotation.JsonAnyGetter;\r
-import com.fasterxml.jackson.annotation.JsonAnySetter;\r
-import com.fasterxml.jackson.annotation.JsonIgnore;\r
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;\r
-\r
-import java.util.Map;\r
-\r
-/**\r
- * Json Mixin for {@link BaseDynamicPropertiesProvider}\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public abstract class BaseDynamicPropertiesProviderMixin implements JsonMixin {\r
-\r
-    /**\r
-     * Provides hint to Jackson Json Object mapper to bind any put all dynamic properties in a map\r
-     *\r
-     * @param propertyName dynamic property name\r
-     * @param propertyValue dynamic property value\r
-     */\r
-    @JsonAnySetter\r
-    public abstract void addDynamicProperties(String propertyName, Object propertyValue);\r
-\r
-    /**\r
-     * Provides hint to serialize dynamic properties as map\r
-     *\r
-     * @return dynamic properties map\r
-     */\r
-    @JsonAnyGetter\r
-    public abstract Map<String, Object> getDynamicProperties();\r
-\r
-    /**\r
-     * Ignores isDynamicPropertiesPresent for json serialization\r
-     *\r
-     * @return true if dynamic properties are present\r
-     */\r
-    @JsonIgnore\r
-    public abstract boolean isDynamicPropertiesPresent();\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
+
+import java.util.Map;
+
+/**
+ * Json Mixin for {@link BaseDynamicPropertiesProvider}
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public abstract class BaseDynamicPropertiesProviderMixin implements JsonMixin {
+
+    /**
+     * Provides hint to Jackson Json Object mapper to bind any put all dynamic properties in a map
+     *
+     * @param propertyName dynamic property name
+     * @param propertyValue dynamic property value
+     */
+    @JsonAnySetter
+    public abstract void addDynamicProperties(String propertyName, Object propertyValue);
+
+    /**
+     * Provides hint to serialize dynamic properties as map
+     *
+     * @return dynamic properties map
+     */
+    @JsonAnyGetter
+    public abstract Map<String, Object> getDynamicProperties();
+
+    /**
+     * Ignores isDynamicPropertiesPresent for json serialization
+     *
+     * @return true if dynamic properties are present
+     */
+    @JsonIgnore
+    public abstract boolean isDynamicPropertiesPresent();
+}
@@ -1,31 +1,31 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin;\r
-\r
-import java.io.Serializable;\r
-\r
-/**\r
- * Marker Interface for all Json Mixin classes\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public interface JsonMixin extends Serializable {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin;
+
+import java.io.Serializable;
+
+/**
+ * Marker Interface for all Json Mixin classes
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public interface JsonMixin extends Serializable {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class AlertActionMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class AlertActionMixin implements JsonMixin {
+}
@@ -1,61 +1,61 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import com.fasterxml.jackson.annotation.JsonCreator;\r
-import com.fasterxml.jackson.annotation.JsonValue;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- * Mixin for Alert Type\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class AlertTypeMixin implements JsonMixin {\r
-\r
-    private String name;\r
-\r
-    @JsonCreator\r
-    public static AlertType forValue(String name) {\r
-\r
-        switch (name) {\r
-            case "CARD-ANOMALY":\r
-                return AlertType.CARD_ANOMALY;\r
-            case "ELEMENT-ANOMALY":\r
-                return AlertType.ELEMENT_ANOMALY;\r
-            case "INTERFACE-ANOMALY":\r
-                return AlertType.INTERFACE_ANOMALY;\r
-            case "SERVICE-ANOMALY":\r
-                return AlertType.SERVICE_ANOMALY;\r
-            default:\r
-                return AlertType.UNKNOWN;\r
-        }\r
-\r
-    }\r
-\r
-    @JsonValue\r
-    public String getName() {\r
-        return name;\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onap.dcae.apod.analytics.model.domain.cef.AlertType;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ * Mixin for Alert Type
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class AlertTypeMixin implements JsonMixin {
+
+    private String name;
+
+    @JsonCreator
+    public static AlertType forValue(String name) {
+
+        switch (name) {
+            case "CARD-ANOMALY":
+                return AlertType.CARD_ANOMALY;
+            case "ELEMENT-ANOMALY":
+                return AlertType.ELEMENT_ANOMALY;
+            case "INTERFACE-ANOMALY":
+                return AlertType.INTERFACE_ANOMALY;
+            case "SERVICE-ANOMALY":
+                return AlertType.SERVICE_ANOMALY;
+            default:
+                return AlertType.UNKNOWN;
+        }
+
+    }
+
+    @JsonValue
+    public String getName() {
+        return name;
+    }
+
+
+}
@@ -1,31 +1,31 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;\r
-\r
-/**\r
- * Abstract Mixin for all CEF Model Mixins\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class BaseCEFModelMixin extends BaseDynamicPropertiesProviderMixin {\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
+
+/**
+ * Abstract Mixin for all CEF Model Mixins
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class BaseCEFModelMixin extends BaseDynamicPropertiesProviderMixin {
+}
@@ -1,27 +1,27 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class CommonEventHeaderMixin extends BaseCEFModelMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class CommonEventHeaderMixin extends BaseCEFModelMixin {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class CriticalityMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class CriticalityMixin implements JsonMixin {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 08/15/2017.\r
- */\r
-public abstract class DomainMixin implements JsonMixin {\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ * @author Rajiv Singla . Creation Date: 08/15/2017.
+ */
+public abstract class DomainMixin implements JsonMixin {
+
+}
@@ -1,29 +1,29 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * Event Listener Json Mixin class\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class EventListenerMixin extends BaseCEFModelMixin {\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * Event Listener Json Mixin class
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class EventListenerMixin extends BaseCEFModelMixin {
+}
@@ -1,29 +1,29 @@
-/*\r
- * ============LICENSE_START=========================================================\r
- * dcae-analytics\r
- * ================================================================================\r
- *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * Event Json Mixin class\r
- * <p>\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class EventMixin extends BaseCEFModelMixin {\r
-}\r
+/*
+ * ============LICENSE_START=========================================================
+ * dcae-analytics
+ * ================================================================================
+ *  Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * Event Json Mixin class
+ * <p>
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class EventMixin extends BaseCEFModelMixin {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class EventSeverityMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class EventSeverityMixin implements JsonMixin {
+}
@@ -1,28 +1,28 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 08/15/2017.\r
- */\r
-public abstract class FieldMixin extends BaseCEFModelMixin {\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * @author Rajiv Singla . Creation Date: 08/15/2017.
+ */
+public abstract class FieldMixin extends BaseCEFModelMixin {
+
+}
@@ -1,28 +1,28 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 08/15/2017.\r
- */\r
-public abstract class InternalHeaderFieldsMixin extends BaseCEFModelMixin {\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * @author Rajiv Singla . Creation Date: 08/15/2017.
+ */
+public abstract class InternalHeaderFieldsMixin extends BaseCEFModelMixin {
+
+}
@@ -1,39 +1,39 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import com.fasterxml.jackson.annotation.JsonGetter;\r
-import com.fasterxml.jackson.annotation.JsonSetter;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.VNicPerformance;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class MeasurementsForVfScalingFieldsMixin extends BaseCEFModelMixin {\r
-\r
-    @JsonSetter("vNicPerformanceArray")\r
-    public abstract void setVNicPerformanceArray(List<VNicPerformance> vNicPerformances);\r
-\r
-    @JsonGetter("vNicPerformanceArray")\r
-    public abstract List<VNicPerformance> getVNicPerformanceArray();\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import com.fasterxml.jackson.annotation.JsonGetter;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import org.onap.dcae.apod.analytics.model.domain.cef.VNicPerformance;
+
+import java.util.List;
+
+/**
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class MeasurementsForVfScalingFieldsMixin extends BaseCEFModelMixin {
+
+    @JsonSetter("vNicPerformanceArray")
+    public abstract void setVNicPerformanceArray(List<VNicPerformance> vNicPerformances);
+
+    @JsonGetter("vNicPerformanceArray")
+    public abstract List<VNicPerformance> getVNicPerformanceArray();
+}
@@ -1,28 +1,28 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 08/15/2017.\r
- */\r
-public abstract class NamedArrayOfFieldsMixin extends BaseCEFModelMixin {\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * @author Rajiv Singla . Creation Date: 08/15/2017.
+ */
+public abstract class NamedArrayOfFieldsMixin extends BaseCEFModelMixin {
+
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * CEF Performance Counter Mixin\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class PerformanceCounterMixin extends BaseCEFModelMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * CEF Performance Counter Mixin
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class PerformanceCounterMixin extends BaseCEFModelMixin {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class PriorityMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class PriorityMixin implements JsonMixin {
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-/**\r
- * Mixin class for ThresholdCrossingAlertFields\r
- *\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class ThresholdCrossingAlertFieldsMixin extends BaseCEFModelMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+/**
+ * Mixin class for ThresholdCrossingAlertFields
+ *
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class ThresholdCrossingAlertFieldsMixin extends BaseCEFModelMixin {
+}
@@ -1,36 +1,36 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import com.fasterxml.jackson.annotation.JsonSetter;\r
-\r
-/**\r
- * @author Rajiv Singla. Creation Date: 08/15/2017.\r
- */\r
-public abstract class VNicUsageArrayMixin extends BaseCEFModelMixin {\r
-\r
-    @JsonSetter("vNicIdentifier")\r
-    public abstract void setVNicIdentifier(String name);\r
-\r
-    @JsonSetter("vNicIdentifier")\r
-    public abstract String setVNicIdentifier();\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import com.fasterxml.jackson.annotation.JsonSetter;
+
+/**
+ * @author Rajiv Singla. Creation Date: 08/15/2017.
+ */
+public abstract class VNicUsageArrayMixin extends BaseCEFModelMixin {
+
+    @JsonSetter("vNicIdentifier")
+    public abstract void setVNicIdentifier(String name);
+
+    @JsonSetter("vNicIdentifier")
+    public abstract String setVNicIdentifier();
+
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public abstract class BaseTCAAppConfigModelMixin extends BaseDynamicPropertiesProviderMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public abstract class BaseTCAAppConfigModelMixin extends BaseDynamicPropertiesProviderMixin {
+}
@@ -1,40 +1,40 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public abstract class BaseTCAHandleMixin extends BaseTCAAppConfigModelMixin {\r
-\r
-    @JsonProperty("aaf_password")\r
-    String aafPassword;\r
-    @JsonProperty("aaf_username")\r
-    String aafUserName;\r
-    @JsonProperty("dmaap_info")\r
-    DMAAPInfo dmaapInfo;\r
-    @JsonProperty("type")\r
-    String type;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public abstract class BaseTCAHandleMixin extends BaseTCAAppConfigModelMixin {
+
+    @JsonProperty("aaf_password")
+    String aafPassword;
+    @JsonProperty("aaf_username")
+    String aafUserName;
+    @JsonProperty("dmaap_info")
+    DMAAPInfo dmaapInfo;
+    @JsonProperty("type")
+    String type;
+
+}
@@ -1,33 +1,33 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-\r
-public abstract class DMAAPInfoMixin extends BaseTCAAppConfigModelMixin {\r
-\r
-    @JsonProperty("topic_url")\r
-    String topicUrl;\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+
+public abstract class DMAAPInfoMixin extends BaseTCAAppConfigModelMixin {
+
+    @JsonProperty("topic_url")
+    String topicUrl;
+}
@@ -1,34 +1,34 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAHandleOut;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public abstract class StreamsPublishesMixin extends BaseTCAPolicyModelMixin {\r
-\r
-    @JsonProperty("tca_handle_out")\r
-    TCAHandleOut tcaHandleOut;\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAHandleOut;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public abstract class StreamsPublishesMixin extends BaseTCAPolicyModelMixin {
+
+    @JsonProperty("tca_handle_out")
+    TCAHandleOut tcaHandleOut;
+}
@@ -1,34 +1,34 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAHandleIn;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public abstract class StreamsSubscribesMixin extends BaseTCAAppConfigModelMixin {\r
-\r
-    @JsonProperty("tca_handle_in")\r
-    TCAHandleIn tcaHandleIn;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAHandleIn;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public abstract class StreamsSubscribesMixin extends BaseTCAAppConfigModelMixin {
+
+    @JsonProperty("tca_handle_in")
+    TCAHandleIn tcaHandleIn;
+
+}
@@ -1,37 +1,37 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsPublishes;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsSubscribes;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public abstract class TCAControllerAppConfigMixin extends BaseTCAAppConfigModelMixin {\r
-\r
-    @JsonProperty("streams_publishes")\r
-    StreamsPublishes streamsPublishes;\r
-    @JsonProperty("streams_subscribes")\r
-    StreamsSubscribes streamsSubscribes;\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.dcae.apod.analytics.model.config.tca.StreamsPublishes;
+import org.onap.dcae.apod.analytics.model.config.tca.StreamsSubscribes;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public abstract class TCAControllerAppConfigMixin extends BaseTCAAppConfigModelMixin {
+
+    @JsonProperty("streams_publishes")
+    StreamsPublishes streamsPublishes;
+    @JsonProperty("streams_subscribes")
+    StreamsSubscribes streamsSubscribes;
+
+}
@@ -1,55 +1,55 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonGetter;\r
-import com.fasterxml.jackson.annotation.JsonSetter;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public abstract class AAIMixin extends BaseDynamicPropertiesProviderMixin {\r
-\r
-    private String genericVNFName;\r
-    private String genericServerName;\r
-\r
-    @JsonGetter("generic-vnf.vnf-name")\r
-    public String getGenericVNFName() {\r
-        return genericVNFName;\r
-    }\r
-\r
-    @JsonSetter("generic-vnf.vnf-name")\r
-    public void setGenericVNFName(String genericVNFName) {\r
-        this.genericVNFName = genericVNFName;\r
-    }\r
-\r
-    @JsonGetter("vserver.vserver-name")\r
-    public String getGenericServerName() {\r
-        return genericServerName;\r
-    }\r
-\r
-    @JsonSetter("vserver.vserver-name")\r
-    public void setGenericServerName(String genericServerName) {\r
-        this.genericServerName = genericServerName;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca;
+
+import com.fasterxml.jackson.annotation.JsonGetter;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public abstract class AAIMixin extends BaseDynamicPropertiesProviderMixin {
+
+    private String genericVNFName;
+    private String genericServerName;
+
+    @JsonGetter("generic-vnf.vnf-name")
+    public String getGenericVNFName() {
+        return genericVNFName;
+    }
+
+    @JsonSetter("generic-vnf.vnf-name")
+    public void setGenericVNFName(String genericVNFName) {
+        this.genericVNFName = genericVNFName;
+    }
+
+    @JsonGetter("vserver.vserver-name")
+    public String getGenericServerName() {
+        return genericServerName;
+    }
+
+    @JsonSetter("vserver.vserver-name")
+    public void setGenericServerName(String genericServerName) {
+        this.genericServerName = genericServerName;
+    }
+}
@@ -1,56 +1,56 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonGetter;\r
-import com.fasterxml.jackson.annotation.JsonSetter;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.AAI;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public abstract class VESCEFMessageResponseMixin implements JsonMixin {\r
-\r
-    private String targetType;\r
-    private AAI aai;\r
-\r
-    @JsonGetter("target_type")\r
-    public String getTargetType() {\r
-        return targetType;\r
-    }\r
-\r
-    @JsonSetter("target_type")\r
-    public void setTargetType(String targetType) {\r
-        this.targetType = targetType;\r
-    }\r
-\r
-    @JsonGetter("AAI")\r
-    public AAI getAai() {\r
-        return aai;\r
-    }\r
-\r
-    @JsonSetter("AAI")\r
-    public void setAai(AAI aai) {\r
-        this.aai = aai;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca;
+
+import com.fasterxml.jackson.annotation.JsonGetter;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import org.onap.dcae.apod.analytics.model.facade.tca.AAI;
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public abstract class VESCEFMessageResponseMixin implements JsonMixin {
+
+    private String targetType;
+    private AAI aai;
+
+    @JsonGetter("target_type")
+    public String getTargetType() {
+        return targetType;
+    }
+
+    @JsonSetter("target_type")
+    public void setTargetType(String targetType) {
+        this.targetType = targetType;
+    }
+
+    @JsonGetter("AAI")
+    public AAI getAai() {
+        return aai;
+    }
+
+    @JsonSetter("AAI")
+    public void setAai(AAI aai) {
+        this.aai = aai;
+    }
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public abstract class BaseTCAPolicyModelMixin extends BaseDynamicPropertiesProviderMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public abstract class BaseTCAPolicyModelMixin extends BaseDynamicPropertiesProviderMixin {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 9/11/2017.\r
- */\r
-public abstract class ClosedLoopEventStatusMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 9/11/2017.
+ */
+public abstract class ClosedLoopEventStatusMixin implements JsonMixin {
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/24/2017.\r
- */\r
-public abstract class ControlLoopSchemaTypeMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/24/2017.
+ */
+public abstract class ControlLoopSchemaTypeMixin implements JsonMixin {
+}
@@ -1,30 +1,30 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public abstract class DirectionMixin implements JsonMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public abstract class DirectionMixin implements JsonMixin {
+}
@@ -1,28 +1,28 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public abstract class MetricsPerEventNameMixin extends BaseTCAPolicyModelMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public abstract class MetricsPerEventNameMixin extends BaseTCAPolicyModelMixin {
+}
@@ -1,28 +1,28 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public abstract class TCAPolicyMixin extends BaseTCAPolicyModelMixin {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public abstract class TCAPolicyMixin extends BaseTCAPolicyModelMixin {
+}
@@ -1,46 +1,46 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-import com.fasterxml.jackson.annotation.JsonIgnore;\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-\r
-import java.math.BigDecimal;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public abstract class ThresholdMixin extends BaseTCAPolicyModelMixin {\r
-\r
-    @JsonIgnore\r
-    private BigDecimal actualFieldValue;\r
-\r
-    @JsonIgnore\r
-    public BigDecimal getActualFieldValue() {\r
-        return actualFieldValue;\r
-    }\r
-\r
-    @JsonProperty\r
-    public void setActualFieldValue(BigDecimal actualFieldValue) {\r
-        this.actualFieldValue = actualFieldValue;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public abstract class ThresholdMixin extends BaseTCAPolicyModelMixin {
+
+    @JsonIgnore
+    private BigDecimal actualFieldValue;
+
+    @JsonIgnore
+    public BigDecimal getActualFieldValue() {
+        return actualFieldValue;
+    }
+
+    @JsonProperty
+    public void setActualFieldValue(BigDecimal actualFieldValue) {
+        this.actualFieldValue = actualFieldValue;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.json.JSONException;\r
-import org.junit.Assert;\r
-import org.junit.BeforeClass;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/17/2016.\r
- */\r
-public abstract class BaseAnalyticsModelUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-\r
-    protected static ObjectMapper objectMapper;\r
-\r
-    /**\r
-     * Before running test cases need to assign object mapper.\r
-     */\r
-    @BeforeClass\r
-    public static void beforeClass() {\r
-        final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =\r
-                new AnalyticsModelObjectMapperSupplier();\r
-        objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();\r
-    }\r
-\r
-\r
-    /**\r
-     * Deserialize given Json file location to given model class and returns it back without any validation check.\r
-     *\r
-     * @param jsonFileLocation Classpath location of the json file\r
-     * @param modelClass       Model Class type\r
-     * @param <T>              Json Model Type\r
-     * @return                  Deserialized Model Object\r
-     */\r
-    public static <T> T deserializeJsonFileToModel(String jsonFileLocation, Class<T> modelClass) {\r
-        final InputStream jsonFileInputStream =\r
-                BaseDCAEAnalyticsUnitTest.class.getClassLoader().getResourceAsStream(jsonFileLocation);\r
-        Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);\r
-        try {\r
-            return objectMapper.readValue(jsonFileInputStream, modelClass);\r
-        } catch (IOException ex) {\r
-            LOG.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}",\r
-                    jsonFileLocation, modelClass, ex);\r
-            throw new RuntimeException(ex);\r
-        } finally {\r
-            try {\r
-                jsonFileInputStream.close();\r
-            } catch (IOException e) {\r
-                LOG.error("Error while closing input stream at file location: {}", jsonFileLocation);\r
-                throw new RuntimeException(e);\r
-            }\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Deserialize given Json file location to given model class and then validates deserialization by comparing it\r
-     * with given expected Object.\r
-     *\r
-     * @param jsonFileLocation   Classpath location of the json file\r
-     * @param modelClass         Model Class type\r
-     * @param expectedJsonObject Expected Json Object\r
-     * @param <T>                Json Model Type\r
-     * @return deserialized actual value if expected Json Object matches deserialized object\r
-     */\r
-    public static <T> T assertJsonDeserialization(String jsonFileLocation, Class<T> modelClass, T expectedJsonObject) {\r
-        final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass);\r
-        assertThat(actualValue, is(expectedJsonObject));\r
-        return actualValue;\r
-    }\r
-\r
-    /**\r
-     * Serialize model to json.\r
-     * @param model model\r
-     * @return json\r
-     * @throws JsonProcessingException when fails to process object\r
-     */\r
-    public static String serializeModelToJson(Object model) throws JsonProcessingException {\r
-        return objectMapper.writeValueAsString(model);\r
-    }\r
-\r
-    /**\r
-     * Converts given model to json string and compare it with json present at given file location.\r
-     *\r
-     * @param model                    Model which needs to be compared\r
-     * @param expectedJsonFileLocation Location of file containing expected json string\r
-     *\r
-     * @return If assertion passes returns the input model\r
-     */\r
-    public static <T> T assertJsonSerialization(T model, String expectedJsonFileLocation) {\r
-        try {\r
-            final String actualModelString = serializeModelToJson(model);\r
-            final String expectedModelString = fromStream(expectedJsonFileLocation);\r
-            assertJson(expectedModelString, actualModelString);\r
-            return model;\r
-        } catch (IOException | JSONException ex) {\r
-            LOG.error("Error while doing assert Json serialization Assertion: model: {}, "\r
-                + "expected Json File Location: {}, Exception {}", model, expectedJsonFileLocation, ex);\r
-            throw new RuntimeException(ex);\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Checks both serialization and deserialization.\r
-     * </p>\r
-     * First checks deserialization and then serialize the deserialized object back to json\r
-     * and check if matches the given json file location string\r
-     *\r
-     * @param jsonFileLocation   Classpath location of the json file\r
-     * @param modelClass         Class type\r
-     * @param <T>                Json Model Type\r
-     *\r
-     * @return If assertion passes, returns deserialized object\r
-     */\r
-\r
-    public static <T> T assertJsonConversions(String jsonFileLocation, Class<T> modelClass) {\r
-        //first check deserialization\r
-        final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass);\r
-        //then check serialization\r
-        assertJsonSerialization(actualValue, jsonFileLocation);\r
-\r
-        return actualValue;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.json.JSONException;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+public abstract class BaseAnalyticsModelUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+
+    protected static ObjectMapper objectMapper;
+
+    /**
+     * Before running test cases need to assign object mapper.
+     */
+    @BeforeClass
+    public static void beforeClass() {
+        final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =
+                new AnalyticsModelObjectMapperSupplier();
+        objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();
+    }
+
+
+    /**
+     * Deserialize given Json file location to given model class and returns it back without any validation check.
+     *
+     * @param jsonFileLocation Classpath location of the json file
+     * @param modelClass       Model Class type
+     * @param <T>              Json Model Type
+     * @return                  Deserialized Model Object
+     */
+    public static <T> T deserializeJsonFileToModel(String jsonFileLocation, Class<T> modelClass) {
+        final InputStream jsonFileInputStream =
+                BaseDCAEAnalyticsUnitTest.class.getClassLoader().getResourceAsStream(jsonFileLocation);
+        Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);
+        try {
+            return objectMapper.readValue(jsonFileInputStream, modelClass);
+        } catch (IOException ex) {
+            LOG.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}",
+                    jsonFileLocation, modelClass, ex);
+            throw new RuntimeException(ex);
+        } finally {
+            try {
+                jsonFileInputStream.close();
+            } catch (IOException e) {
+                LOG.error("Error while closing input stream at file location: {}", jsonFileLocation);
+                throw new RuntimeException(e);
+            }
+        }
+    }
+
+    /**
+     * Deserialize given Json file location to given model class and then validates deserialization by comparing it
+     * with given expected Object.
+     *
+     * @param jsonFileLocation   Classpath location of the json file
+     * @param modelClass         Model Class type
+     * @param expectedJsonObject Expected Json Object
+     * @param <T>                Json Model Type
+     * @return deserialized actual value if expected Json Object matches deserialized object
+     */
+    public static <T> T assertJsonDeserialization(String jsonFileLocation, Class<T> modelClass, T expectedJsonObject) {
+        final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass);
+        assertThat(actualValue, is(expectedJsonObject));
+        return actualValue;
+    }
+
+    /**
+     * Serialize model to json.
+     * @param model model
+     * @return json
+     * @throws JsonProcessingException when fails to process object
+     */
+    public static String serializeModelToJson(Object model) throws JsonProcessingException {
+        return objectMapper.writeValueAsString(model);
+    }
+
+    /**
+     * Converts given model to json string and compare it with json present at given file location.
+     *
+     * @param model                    Model which needs to be compared
+     * @param expectedJsonFileLocation Location of file containing expected json string
+     *
+     * @return If assertion passes returns the input model
+     */
+    public static <T> T assertJsonSerialization(T model, String expectedJsonFileLocation) {
+        try {
+            final String actualModelString = serializeModelToJson(model);
+            final String expectedModelString = fromStream(expectedJsonFileLocation);
+            assertJson(expectedModelString, actualModelString);
+            return model;
+        } catch (IOException | JSONException ex) {
+            LOG.error("Error while doing assert Json serialization Assertion: model: {}, "
+                + "expected Json File Location: {}, Exception {}", model, expectedJsonFileLocation, ex);
+            throw new RuntimeException(ex);
+        }
+    }
+
+
+    /**
+     * Checks both serialization and deserialization.
+     * </p>
+     * First checks deserialization and then serialize the deserialized object back to json
+     * and check if matches the given json file location string
+     *
+     * @param jsonFileLocation   Classpath location of the json file
+     * @param modelClass         Class type
+     * @param <T>                Json Model Type
+     *
+     * @return If assertion passes, returns deserialized object
+     */
+
+    public static <T> T assertJsonConversions(String jsonFileLocation, Class<T> modelClass) {
+        //first check deserialization
+        final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass);
+        //then check serialization
+        assertJsonSerialization(actualValue, jsonFileLocation);
+
+        return actualValue;
+    }
+}
@@ -1,71 +1,71 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.domain.cef;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-import java.util.Collections;\r
-import java.util.Comparator;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/10/2016.\r
- */\r
-public class EventSeverityTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-    private static Comparator<EventSeverity> eventSeverityComparator = new Comparator<EventSeverity>() {\r
-        @Override\r
-        public int compare(EventSeverity eventSeverity1, EventSeverity eventSeverity2) {\r
-            return eventSeverity1.compareTo(eventSeverity2);\r
-        }\r
-    };\r
-\r
-    @Test\r
-    public void testEventSeverityOrdering() throws Exception {\r
-\r
-        List<EventSeverity> eventSeverities = new LinkedList<>();\r
-        Collections.addAll(eventSeverities,\r
-                EventSeverity.NORMAL,\r
-                EventSeverity.WARNING,\r
-                EventSeverity.MINOR,\r
-                EventSeverity.MAJOR,\r
-                EventSeverity.CRITICAL);\r
-\r
-        Collections.sort(eventSeverities);\r
-\r
-        List<EventSeverity> expectedEventSeverities = new LinkedList<>();\r
-        Collections.addAll(expectedEventSeverities,\r
-                EventSeverity.CRITICAL,\r
-                EventSeverity.MAJOR,\r
-                EventSeverity.MINOR,\r
-                EventSeverity.WARNING,\r
-                EventSeverity.NORMAL\r
-        );\r
-\r
-        Assert.assertTrue("Severity Order must be CRITICAL, MAJOR, MINOR, WARNING, NORMAL",\r
-                eventSeverities.equals(expectedEventSeverities));\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.domain.cef;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/10/2016.
+ */
+public class EventSeverityTest extends BaseDCAEAnalyticsUnitTest {
+
+    private static Comparator<EventSeverity> eventSeverityComparator = new Comparator<EventSeverity>() {
+        @Override
+        public int compare(EventSeverity eventSeverity1, EventSeverity eventSeverity2) {
+            return eventSeverity1.compareTo(eventSeverity2);
+        }
+    };
+
+    @Test
+    public void testEventSeverityOrdering() throws Exception {
+
+        List<EventSeverity> eventSeverities = new LinkedList<>();
+        Collections.addAll(eventSeverities,
+                EventSeverity.NORMAL,
+                EventSeverity.WARNING,
+                EventSeverity.MINOR,
+                EventSeverity.MAJOR,
+                EventSeverity.CRITICAL);
+
+        Collections.sort(eventSeverities);
+
+        List<EventSeverity> expectedEventSeverities = new LinkedList<>();
+        Collections.addAll(expectedEventSeverities,
+                EventSeverity.CRITICAL,
+                EventSeverity.MAJOR,
+                EventSeverity.MINOR,
+                EventSeverity.WARNING,
+                EventSeverity.NORMAL
+        );
+
+        Assert.assertTrue("Severity Order must be CRITICAL, MAJOR, MINOR, WARNING, NORMAL",
+                eventSeverities.equals(expectedEventSeverities));
+
+    }
+}
@@ -1,57 +1,57 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.facade.tca;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-\r
-import static org.hamcrest.core.Is.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class AAITest extends BaseAnalyticsModelUnitTest {\r
-\r
-    private AAI aai;\r
-    private static final String GENERIC_VNF_ID = "testVNFID";\r
-    private static final String CHANGED_GENERIC_VNF_ID = "changedVNFID";\r
-\r
-    @Before\r
-    public void before() {\r
-        aai = new AAI();\r
-    }\r
-\r
-    @Test\r
-    public void getGenericVNFId() throws Exception {\r
-        aai.setGenericVNFName(GENERIC_VNF_ID);\r
-        assertThat("VNFID must be same", aai.getGenericVNFName(), is(GENERIC_VNF_ID));\r
-    }\r
-\r
-    @Test\r
-    public void setGenericVNFId() throws Exception {\r
-        final String genericVNFId = "testVNFID";\r
-        aai.setGenericVNFName(GENERIC_VNF_ID);\r
-        aai.setGenericVNFName(CHANGED_GENERIC_VNF_ID);\r
-        assertThat("VNFID must be same as changed VNFID", aai.getGenericVNFName(), is(CHANGED_GENERIC_VNF_ID));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.facade.tca;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class AAITest extends BaseAnalyticsModelUnitTest {
+
+    private AAI aai;
+    private static final String GENERIC_VNF_ID = "testVNFID";
+    private static final String CHANGED_GENERIC_VNF_ID = "changedVNFID";
+
+    @Before
+    public void before() {
+        aai = new AAI();
+    }
+
+    @Test
+    public void getGenericVNFId() throws Exception {
+        aai.setGenericVNFName(GENERIC_VNF_ID);
+        assertThat("VNFID must be same", aai.getGenericVNFName(), is(GENERIC_VNF_ID));
+    }
+
+    @Test
+    public void setGenericVNFId() throws Exception {
+        final String genericVNFId = "testVNFID";
+        aai.setGenericVNFName(GENERIC_VNF_ID);
+        aai.setGenericVNFName(CHANGED_GENERIC_VNF_ID);
+        assertThat("VNFID must be same as changed VNFID", aai.getGenericVNFName(), is(CHANGED_GENERIC_VNF_ID));
+    }
+}
@@ -1,76 +1,76 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.facade.tca;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class TCAVESResponseTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";\r
-\r
-    @Test\r
-    public void testTCAPolicyJsonConversions() throws Exception {\r
-\r
-        final TCAVESResponse vesCEFMessageResponse =\r
-            assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class);\r
-\r
-        assertThat("VES CEF Message Response AAI generics VNF Id must match",\r
-                vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)"));\r
-\r
-        assertThat("VES CEF Message target type must be parsed correctly as VNF",\r
-                vesCEFMessageResponse.getTargetType(), is("VNF"));\r
-\r
-        assertThat("VES closed Loop Name must be CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",\r
-                vesCEFMessageResponse.getClosedLoopControlName(),\r
-                is("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8"));\r
-\r
-        assertThat("version must be 1.0.2", vesCEFMessageResponse.getVersion(), is("1.0.2"));\r
-\r
-        assertThat("closedLoopAlarmStart must be 1478189220547",\r
-                vesCEFMessageResponse.getClosedLoopAlarmStart(), is(1478189220547L));\r
-        assertThat("closedLoopEventClient must be tca.instance00001",\r
-                vesCEFMessageResponse.getClosedLoopEventClient(), is("tca.instance00001"));\r
-        assertThat("target_type must be VNF", vesCEFMessageResponse.getTargetType(), is("VNF"));\r
-        assertThat("target must be VNF", vesCEFMessageResponse.getTarget(), is("generic-vnf.vnf-name"));\r
-        assertThat("aai generic vnf id must be vpp-test(?)", vesCEFMessageResponse.getAai().getGenericVNFName(),\r
-                is("vpp-test(?)"));\r
-        assertThat("from must be DCAE", vesCEFMessageResponse.getFrom(), is("DCAE"));\r
-        assertThat("policyScope must be resource=vFirewall;type=configuration",\r
-                vesCEFMessageResponse.getPolicyScope(), is("resource=vFirewall;type=configuration"));\r
-\r
-        assertThat("policyName must be configuration.dcae.microservice.tca.xml",\r
-                vesCEFMessageResponse.getPolicyName(), is("configuration.dcae.microservice.tca.xml"));\r
-\r
-        assertThat("policyVersion must be v0.0.1",\r
-                vesCEFMessageResponse.getPolicyVersion(), is("v0.0.1"));\r
-\r
-        assertThat("closedLoopEventStatus is ONSET",\r
-                vesCEFMessageResponse.getClosedLoopEventStatus(), is("ONSET"));\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.facade.tca;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class TCAVESResponseTest extends BaseAnalyticsModelUnitTest {
+
+    private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";
+
+    @Test
+    public void testTCAPolicyJsonConversions() throws Exception {
+
+        final TCAVESResponse vesCEFMessageResponse =
+            assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class);
+
+        assertThat("VES CEF Message Response AAI generics VNF Id must match",
+                vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)"));
+
+        assertThat("VES CEF Message target type must be parsed correctly as VNF",
+                vesCEFMessageResponse.getTargetType(), is("VNF"));
+
+        assertThat("VES closed Loop Name must be CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",
+                vesCEFMessageResponse.getClosedLoopControlName(),
+                is("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8"));
+
+        assertThat("version must be 1.0.2", vesCEFMessageResponse.getVersion(), is("1.0.2"));
+
+        assertThat("closedLoopAlarmStart must be 1478189220547",
+                vesCEFMessageResponse.getClosedLoopAlarmStart(), is(1478189220547L));
+        assertThat("closedLoopEventClient must be tca.instance00001",
+                vesCEFMessageResponse.getClosedLoopEventClient(), is("tca.instance00001"));
+        assertThat("target_type must be VNF", vesCEFMessageResponse.getTargetType(), is("VNF"));
+        assertThat("target must be VNF", vesCEFMessageResponse.getTarget(), is("generic-vnf.vnf-name"));
+        assertThat("aai generic vnf id must be vpp-test(?)", vesCEFMessageResponse.getAai().getGenericVNFName(),
+                is("vpp-test(?)"));
+        assertThat("from must be DCAE", vesCEFMessageResponse.getFrom(), is("DCAE"));
+        assertThat("policyScope must be resource=vFirewall;type=configuration",
+                vesCEFMessageResponse.getPolicyScope(), is("resource=vFirewall;type=configuration"));
+
+        assertThat("policyName must be configuration.dcae.microservice.tca.xml",
+                vesCEFMessageResponse.getPolicyName(), is("configuration.dcae.microservice.tca.xml"));
+
+        assertThat("policyVersion must be v0.0.1",
+                vesCEFMessageResponse.getPolicyVersion(), is("v0.0.1"));
+
+        assertThat("closedLoopEventStatus is ONSET",
+                vesCEFMessageResponse.getClosedLoopEventStatus(), is("ONSET"));
+
+    }
+}
@@ -1,86 +1,86 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util;\r
-\r
-\r
-import org.junit.Test;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.Properties;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertThat;\r
-import static org.mockito.ArgumentMatchers.any;\r
-import static org.mockito.Mockito.doThrow;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/17/2016.\r
- */\r
-public class AnalyticsModelIOUtilsTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    private static final String TEST_CONFIG_FILE_LOCATION = "data/json/config/testAppConfig.json";\r
-    private static final String INVALID_TEST_CONFIG_FILE_LOCATION = "data/json/config/invalidJsonConfig.json";\r
-    private static final String TEST_PROPERTIES_FILE_LOCATION = "data/properties/testApp.properties";\r
-\r
-    @Test\r
-    public void testConvertToJsonObjectWhenFileLocationIsValid() throws Exception {\r
-        ConfigHolder configHolder =\r
-                AnalyticsModelIOUtils.convertToJsonObject(TEST_CONFIG_FILE_LOCATION, ConfigHolder.class);\r
-        String appName = configHolder.getConfig().getAppName();\r
-        assertEquals("App Name must match with json settings file value", "TestAppName", appName);\r
-        String appDescription = configHolder.getConfig().getAppDescription();\r
-        assertEquals("App Description much with json settings file value", "Test App Description", appDescription);\r
-    }\r
-\r
-    @Test(expected = IOException.class)\r
-    public void testConvertToJsonObjectWhenFileLocationIsInvValid() throws Exception {\r
-        AnalyticsModelIOUtils.convertToJsonObject("InvalidFileLocation", ConfigHolder.class);\r
-    }\r
-\r
-    @Test(expected = IOException.class)\r
-    public void testConvertToJsonObjectWhenJsonFileHasInvalidJson() throws Exception {\r
-        AnalyticsModelIOUtils.convertToJsonObject(INVALID_TEST_CONFIG_FILE_LOCATION, ConfigHolder.class);\r
-    }\r
-\r
-    @Test\r
-    public void testValidPropertiesFileLoading() throws Exception {\r
-        final Properties properties =\r
-                AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, new Properties());\r
-        assertThat("Properties File must contain 2 properties", properties.size(), is(2));\r
-    }\r
-\r
-    @Test(expected = RuntimeException.class)\r
-    public void testNonExistingPropertiesFileLoading() throws Exception {\r
-        AnalyticsModelIOUtils.loadPropertiesFile("InvalidPropertiesFileLocation", new Properties());\r
-    }\r
-\r
-    @Test(expected = RuntimeException.class)\r
-    public void testLoadPropertiesFileWhenIOException() throws Exception {\r
-        final Properties mockProperties = Mockito.mock(Properties.class);\r
-        doThrow(new IOException()).when(mockProperties).load(any(InputStream.class));\r
-        AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, mockProperties);\r
-    }\r
-}\r
-\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util;
+
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doThrow;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+public class AnalyticsModelIOUtilsTest extends BaseAnalyticsModelUnitTest {
+
+    private static final String TEST_CONFIG_FILE_LOCATION = "data/json/config/testAppConfig.json";
+    private static final String INVALID_TEST_CONFIG_FILE_LOCATION = "data/json/config/invalidJsonConfig.json";
+    private static final String TEST_PROPERTIES_FILE_LOCATION = "data/properties/testApp.properties";
+
+    @Test
+    public void testConvertToJsonObjectWhenFileLocationIsValid() throws Exception {
+        ConfigHolder configHolder =
+                AnalyticsModelIOUtils.convertToJsonObject(TEST_CONFIG_FILE_LOCATION, ConfigHolder.class);
+        String appName = configHolder.getConfig().getAppName();
+        assertEquals("App Name must match with json settings file value", "TestAppName", appName);
+        String appDescription = configHolder.getConfig().getAppDescription();
+        assertEquals("App Description much with json settings file value", "Test App Description", appDescription);
+    }
+
+    @Test(expected = IOException.class)
+    public void testConvertToJsonObjectWhenFileLocationIsInvValid() throws Exception {
+        AnalyticsModelIOUtils.convertToJsonObject("InvalidFileLocation", ConfigHolder.class);
+    }
+
+    @Test(expected = IOException.class)
+    public void testConvertToJsonObjectWhenJsonFileHasInvalidJson() throws Exception {
+        AnalyticsModelIOUtils.convertToJsonObject(INVALID_TEST_CONFIG_FILE_LOCATION, ConfigHolder.class);
+    }
+
+    @Test
+    public void testValidPropertiesFileLoading() throws Exception {
+        final Properties properties =
+                AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, new Properties());
+        assertThat("Properties File must contain 2 properties", properties.size(), is(2));
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testNonExistingPropertiesFileLoading() throws Exception {
+        AnalyticsModelIOUtils.loadPropertiesFile("InvalidPropertiesFileLocation", new Properties());
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testLoadPropertiesFileWhenIOException() throws Exception {
+        final Properties mockProperties = Mockito.mock(Properties.class);
+        doThrow(new IOException()).when(mockProperties).load(any(InputStream.class));
+        AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, mockProperties);
+    }
+}
+
@@ -1,80 +1,80 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util;\r
-\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-\r
-import java.io.InputStream;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class AnalyticsModelJsonUtilsTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =\r
-            new TypeReference<List<EventListener>>() {\r
-            };\r
-\r
-    final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json";\r
-    final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json";\r
-\r
-    @Test\r
-    public void testReadValueWithTypeReference() throws Exception {\r
-        final InputStream resourceAsStream =\r
-                Thread.currentThread().getContextClassLoader().getResourceAsStream(cefMessagesJsonFileLocation);\r
-        List<EventListener> eventListeners = AnalyticsModelJsonUtils.readValue(resourceAsStream,\r
-                EVENT_LISTENER_TYPE_REFERENCE);\r
-        assertThat("Event Listeners size must be 31", eventListeners.size(), is(31));\r
-    }\r
-\r
-    @Test\r
-    public void testReadValueWithClassType() throws Exception {\r
-        final InputStream resourceAsStream =\r
-                Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation);\r
-        final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class);\r
-        assertNotNull("Event Listener event is not null", eventListener.getEvent());\r
-    }\r
-\r
-    @Test\r
-    public void testWriteValueAsString() throws Exception {\r
-        final InputStream resourceAsStream =\r
-                Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation);\r
-        final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class);\r
-        final String eventListenerString = AnalyticsModelJsonUtils.writeValueAsString(eventListener);\r
-        assertJson(fromStream(eventListenerJsonFileLocation), eventListenerString);\r
-    }\r
-\r
-    @Test\r
-    public void testReadValueWithJsonString() throws Exception {\r
-        final EventListener eventListener =\r
-                AnalyticsModelJsonUtils.readValue(fromStream(eventListenerJsonFileLocation), EventListener.class);\r
-        assertNotNull("Event Listener event is not null", eventListener.getEvent());\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+
+import java.io.InputStream;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class AnalyticsModelJsonUtilsTest extends BaseAnalyticsModelUnitTest {
+
+    private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =
+            new TypeReference<List<EventListener>>() {
+            };
+
+    final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json";
+    final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json";
+
+    @Test
+    public void testReadValueWithTypeReference() throws Exception {
+        final InputStream resourceAsStream =
+                Thread.currentThread().getContextClassLoader().getResourceAsStream(cefMessagesJsonFileLocation);
+        List<EventListener> eventListeners = AnalyticsModelJsonUtils.readValue(resourceAsStream,
+                EVENT_LISTENER_TYPE_REFERENCE);
+        assertThat("Event Listeners size must be 31", eventListeners.size(), is(31));
+    }
+
+    @Test
+    public void testReadValueWithClassType() throws Exception {
+        final InputStream resourceAsStream =
+                Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation);
+        final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class);
+        assertNotNull("Event Listener event is not null", eventListener.getEvent());
+    }
+
+    @Test
+    public void testWriteValueAsString() throws Exception {
+        final InputStream resourceAsStream =
+                Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation);
+        final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class);
+        final String eventListenerString = AnalyticsModelJsonUtils.writeValueAsString(eventListener);
+        assertJson(fromStream(eventListenerJsonFileLocation), eventListenerString);
+    }
+
+    @Test
+    public void testReadValueWithJsonString() throws Exception {
+        final EventListener eventListener =
+                AnalyticsModelJsonUtils.readValue(fromStream(eventListenerJsonFileLocation), EventListener.class);
+        assertNotNull("Event Listener event is not null", eventListener.getEvent());
+    }
+
+}
@@ -1,33 +1,33 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util;\r
-\r
-/**\r
- * Created by Rajiv Singla on 10/5/2016.\r
- */\r
-public class ConfigHolder {\r
-\r
-    private TestAppConfig config;\r
-\r
-    public TestAppConfig getConfig() {\r
-        return config;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util;
+
+/**
+ * Created by Rajiv Singla on 10/5/2016.
+ */
+public class ConfigHolder {
+
+    private TestAppConfig config;
+
+    public TestAppConfig getConfig() {
+        return config;
+    }
+}
@@ -1,38 +1,38 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util;\r
-\r
-/**\r
- * Created by Rajiv Singla on 10/5/2016.\r
- */\r
-public class TestAppConfig {\r
-\r
-    private String appName;\r
-    private String appDescription;\r
-\r
-    public String getAppName() {\r
-        return appName;\r
-    }\r
-\r
-    public String getAppDescription() {\r
-        return appDescription;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util;
+
+/**
+ * Created by Rajiv Singla on 10/5/2016.
+ */
+public class TestAppConfig {
+
+    private String appName;
+    private String appDescription;
+
+    public String getAppName() {
+        return appName;
+    }
+
+    public String getAppDescription() {
+        return appDescription;
+    }
+}
@@ -1,64 +1,64 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json;\r
-\r
-import com.jayway.jsonpath.Configuration;\r
-import com.jayway.jsonpath.JsonPath;\r
-import com.jayway.jsonpath.Option;\r
-import com.jayway.jsonpath.spi.json.JsonProvider;\r
-import com.jayway.jsonpath.spi.mapper.MappingProvider;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-\r
-import java.util.Set;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.hamcrest.Matchers.containsInAnyOrder;\r
-import static org.junit.Assert.assertThat;\r
-\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class AnalyticsModelObjectMapperSupplierTest extends BaseAnalyticsModelUnitTest {\r
-\r
-\r
-    @Test\r
-    public void testJsonPathSettings() throws Exception {\r
-        final Configuration configuration = JsonPath.parse("{\"test\": \"test\"}").configuration();\r
-\r
-        final JsonProvider jsonProvider = configuration.jsonProvider();\r
-        final String jsonProviderClassName = jsonProvider.getClass().getSimpleName();\r
-        assertThat("Json Provider cass name must be JacksonJsonProvider",\r
-                jsonProviderClassName, is("JacksonJsonProvider"));\r
-\r
-        final MappingProvider mappingProvider = configuration.mappingProvider();\r
-        final String mappingProviderClassName = mappingProvider.getClass().getSimpleName();\r
-        assertThat("Mapping Provider cass name must be JacksonMappingProvider",\r
-                mappingProviderClassName, is("JacksonMappingProvider"));\r
-\r
-        final Set<Option> configurationOptions = configuration.getOptions();\r
-        assertThat(configurationOptions,\r
-                containsInAnyOrder(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,\r
-                        Option.ALWAYS_RETURN_LIST));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json;
+
+import com.jayway.jsonpath.Configuration;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.Option;
+import com.jayway.jsonpath.spi.json.JsonProvider;
+import com.jayway.jsonpath.spi.mapper.MappingProvider;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+
+import java.util.Set;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class AnalyticsModelObjectMapperSupplierTest extends BaseAnalyticsModelUnitTest {
+
+
+    @Test
+    public void testJsonPathSettings() throws Exception {
+        final Configuration configuration = JsonPath.parse("{\"test\": \"test\"}").configuration();
+
+        final JsonProvider jsonProvider = configuration.jsonProvider();
+        final String jsonProviderClassName = jsonProvider.getClass().getSimpleName();
+        assertThat("Json Provider cass name must be JacksonJsonProvider",
+                jsonProviderClassName, is("JacksonJsonProvider"));
+
+        final MappingProvider mappingProvider = configuration.mappingProvider();
+        final String mappingProviderClassName = mappingProvider.getClass().getSimpleName();
+        assertThat("Mapping Provider cass name must be JacksonMappingProvider",
+                mappingProviderClassName, is("JacksonMappingProvider"));
+
+        final Set<Option> configurationOptions = configuration.getOptions();
+        assertThat(configurationOptions,
+                containsInAnyOrder(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,
+                        Option.ALWAYS_RETURN_LIST));
+    }
+
+}
@@ -1,51 +1,51 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-import static org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType.CARD_ANOMALY;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/3/2016.\r
- */\r
-public class AlertTypeMixinTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    // NOTE: Alert type enum has some special customizations in AlertTypeMixin class\r
-    // as Java enum names does not allow for "-" so actual values are coded as enum names\r
-    @Test\r
-    public void testAlertTypeJsonConversions() throws Exception {\r
-\r
-        final String alertTypeJson = serializeModelToJson(CARD_ANOMALY);\r
-        assertThat("Alert Type Json for CARD ANOMALY must have hyphen in it", alertTypeJson,\r
-                is("\"CARD-ANOMALY\""));\r
-        // convert parsed alert type back to enum\r
-        final AlertType alertType = objectMapper.readValue(alertTypeJson, AlertType.class);\r
-        LOG.debug(alertType.toString());\r
-        assertThat("Json String for CARD ANOMALY with hyphen can be converted back to Alert Type", alertType,\r
-                is(CARD_ANOMALY));\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+import org.onap.dcae.apod.analytics.model.domain.cef.AlertType;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.onap.dcae.apod.analytics.model.domain.cef.AlertType.CARD_ANOMALY;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public class AlertTypeMixinTest extends BaseAnalyticsModelUnitTest {
+
+    // NOTE: Alert type enum has some special customizations in AlertTypeMixin class
+    // as Java enum names does not allow for "-" so actual values are coded as enum names
+    @Test
+    public void testAlertTypeJsonConversions() throws Exception {
+
+        final String alertTypeJson = serializeModelToJson(CARD_ANOMALY);
+        assertThat("Alert Type Json for CARD ANOMALY must have hyphen in it", alertTypeJson,
+                is("\"CARD-ANOMALY\""));
+        // convert parsed alert type back to enum
+        final AlertType alertType = objectMapper.readValue(alertTypeJson, AlertType.class);
+        LOG.debug(alertType.toString());
+        assertThat("Json String for CARD ANOMALY with hyphen can be converted back to Alert Type", alertType,
+                is(CARD_ANOMALY));
+    }
+}
@@ -1,83 +1,83 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;\r
-\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Field;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields;\r
-\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/18/2016.\r
- */\r
-public class EventListenerMixinTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json";\r
-    final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json";\r
-\r
-    @Test\r
-    public void testEventListenerJsonConversions() throws Exception {\r
-\r
-        final EventListener eventListener = assertJsonConversions(eventListenerJsonFileLocation, EventListener.class);\r
-\r
-        final List<Field> additionalFields =\r
-                eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalFields();\r
-\r
-        assertThat("Additional Fields size must be 2", additionalFields.size(), is(2));\r
-\r
-        final List<NamedArrayOfFields> additionalMeasurements =\r
-                eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalMeasurements();\r
-\r
-        assertThat("Additional Measurements size must be 1", additionalMeasurements.size(), is(1));\r
-\r
-        final List<Field> arrayOfFields = additionalMeasurements.get(0).getArrayOfFields();\r
-\r
-        assertThat("Array Of Field size must be 6", arrayOfFields.size(), is(6));\r
-    }\r
-\r
-    @Test\r
-    public void testCollectionOfEventListenersJsonConversion() throws Exception {\r
-\r
-        final String cefMessageAsString = fromStream(cefMessagesJsonFileLocation);\r
-\r
-        final TypeReference<List<EventListener>> eventListenerListTypeReference =\r
-                new TypeReference<List<EventListener>>() {\r
-                };\r
-        List<EventListener> eventListeners = objectMapper.readValue(cefMessageAsString, eventListenerListTypeReference);\r
-        assertThat("Event Listeners size must be 31", eventListeners.size(), is(31));\r
-\r
-        // Check serialized json will match deserialized json\r
-        final String eventListenerString = objectMapper.writeValueAsString(eventListeners);\r
-        assertJson(cefMessageAsString, eventListenerString);\r
-\r
-        // Checks serialization\r
-        testSerialization(eventListeners, getClass());\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.cef;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.cef.Field;
+import org.onap.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields;
+
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/18/2016.
+ */
+public class EventListenerMixinTest extends BaseAnalyticsModelUnitTest {
+
+    final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json";
+    final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json";
+
+    @Test
+    public void testEventListenerJsonConversions() throws Exception {
+
+        final EventListener eventListener = assertJsonConversions(eventListenerJsonFileLocation, EventListener.class);
+
+        final List<Field> additionalFields =
+                eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalFields();
+
+        assertThat("Additional Fields size must be 2", additionalFields.size(), is(2));
+
+        final List<NamedArrayOfFields> additionalMeasurements =
+                eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalMeasurements();
+
+        assertThat("Additional Measurements size must be 1", additionalMeasurements.size(), is(1));
+
+        final List<Field> arrayOfFields = additionalMeasurements.get(0).getArrayOfFields();
+
+        assertThat("Array Of Field size must be 6", arrayOfFields.size(), is(6));
+    }
+
+    @Test
+    public void testCollectionOfEventListenersJsonConversion() throws Exception {
+
+        final String cefMessageAsString = fromStream(cefMessagesJsonFileLocation);
+
+        final TypeReference<List<EventListener>> eventListenerListTypeReference =
+                new TypeReference<List<EventListener>>() {
+                };
+        List<EventListener> eventListeners = objectMapper.readValue(cefMessageAsString, eventListenerListTypeReference);
+        assertThat("Event Listeners size must be 31", eventListeners.size(), is(31));
+
+        // Check serialized json will match deserialized json
+        final String eventListenerString = objectMapper.writeValueAsString(eventListeners);
+        assertJson(cefMessageAsString, eventListenerString);
+
+        // Checks serialization
+        testSerialization(eventListeners, getClass());
+
+    }
+
+}
@@ -1,63 +1,63 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;\r
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.hamcrest.CoreMatchers.notNullValue;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 8/25/2017.\r
- */\r
-public class TCAControllerAppConfigMixinTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    final String tcaControllerAppConfigJsonFileLocation = "data/json/config/controller_app_config.json";\r
-\r
-    @Test\r
-    public void testTCAControllerConfigJsonConversions() throws Exception {\r
-\r
-        final TCAControllerAppConfig tcaControllerAppConfig =\r
-                assertJsonConversions(tcaControllerAppConfigJsonFileLocation, TCAControllerAppConfig.class);\r
-\r
-        assertThat("TCA Stream Publishes must not be null",\r
-                tcaControllerAppConfig.getStreamsPublishes(), is(notNullValue()));\r
-\r
-        assertThat("TCA Stream Subscribes must not be null",\r
-                tcaControllerAppConfig.getStreamsSubscribes(), is(notNullValue()));\r
-\r
-        final DMAAPInfo publisherDmaaPInfo = tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut()\r
-                .getDmaapInfo();\r
-        assertThat("TCA publisher URL Info must not be null",\r
-                publisherDmaaPInfo.getTopicUrl(), is(notNullValue()));\r
-\r
-        final DMAAPInfo subscriberDmaaPInfo = tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn()\r
-                .getDmaapInfo();\r
-        assertThat("TCA subscriber URL Info must not be null",\r
-                subscriberDmaaPInfo.getTopicUrl(), is(notNullValue()));\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo;
+import org.onap.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 8/25/2017.
+ */
+public class TCAControllerAppConfigMixinTest extends BaseAnalyticsModelUnitTest {
+
+    final String tcaControllerAppConfigJsonFileLocation = "data/json/config/controller_app_config.json";
+
+    @Test
+    public void testTCAControllerConfigJsonConversions() throws Exception {
+
+        final TCAControllerAppConfig tcaControllerAppConfig =
+                assertJsonConversions(tcaControllerAppConfigJsonFileLocation, TCAControllerAppConfig.class);
+
+        assertThat("TCA Stream Publishes must not be null",
+                tcaControllerAppConfig.getStreamsPublishes(), is(notNullValue()));
+
+        assertThat("TCA Stream Subscribes must not be null",
+                tcaControllerAppConfig.getStreamsSubscribes(), is(notNullValue()));
+
+        final DMAAPInfo publisherDmaaPInfo = tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut()
+                .getDmaapInfo();
+        assertThat("TCA publisher URL Info must not be null",
+                publisherDmaaPInfo.getTopicUrl(), is(notNullValue()));
+
+        final DMAAPInfo subscriberDmaaPInfo = tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn()
+                .getDmaapInfo();
+        assertThat("TCA subscriber URL Info must not be null",
+                subscriberDmaaPInfo.getTopicUrl(), is(notNullValue()));
+
+    }
+
+}
@@ -1,55 +1,55 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCAVESResponseMixinTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";\r
-\r
-    @Test\r
-    public void testTCAPolicyJsonConversions() throws Exception {\r
-\r
-        final TCAVESResponse vesCEFMessageResponse =\r
-            assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class);\r
-\r
-        assertThat("VES CEF Message Response AAI generics VNF Id must match",\r
-                vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)"));\r
-\r
-        assertThat("VES CEF Message Response AAI generic Server Id must match",\r
-                vesCEFMessageResponse.getAai().getGenericServerName(), is("dfw1lb01lb01"));\r
-\r
-        assertThat("VES CEF Message target type must be parsed correctly as VNF",\r
-                vesCEFMessageResponse.getTargetType(), is("VNF"));\r
-\r
-        testSerialization(vesCEFMessageResponse, getClass());\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCAVESResponseMixinTest extends BaseAnalyticsModelUnitTest {
+
+    private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";
+
+    @Test
+    public void testTCAPolicyJsonConversions() throws Exception {
+
+        final TCAVESResponse vesCEFMessageResponse =
+            assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class);
+
+        assertThat("VES CEF Message Response AAI generics VNF Id must match",
+                vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)"));
+
+        assertThat("VES CEF Message Response AAI generic Server Id must match",
+                vesCEFMessageResponse.getAai().getGenericServerName(), is("dfw1lb01lb01"));
+
+        assertThat("VES CEF Message target type must be parsed correctly as VNF",
+                vesCEFMessageResponse.getTargetType(), is("VNF"));
+
+        testSerialization(vesCEFMessageResponse, getClass());
+    }
+}
@@ -1,51 +1,51 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public class TCAPolicyMixinTest extends BaseAnalyticsModelUnitTest {\r
-\r
-    private static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";\r
-\r
-    @Test\r
-    public void testTCAPolicyJsonConversions() throws Exception {\r
-\r
-        final TCAPolicy tcaPolicy = assertJsonConversions(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicy.class);\r
-\r
-        assertThat("TCA Policy Metrics Per Event Name must be 3",\r
-                tcaPolicy.getMetricsPerEventName().size(), is(3));\r
-\r
-        assertThat("TCA Policy Thresholds for first event name must be 3",\r
-                tcaPolicy.getMetricsPerEventName().get(0).getThresholds().size(), is(3));\r
-\r
-        testSerialization(tcaPolicy, getClass());\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public class TCAPolicyMixinTest extends BaseAnalyticsModelUnitTest {
+
+    private static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";
+
+    @Test
+    public void testTCAPolicyJsonConversions() throws Exception {
+
+        final TCAPolicy tcaPolicy = assertJsonConversions(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicy.class);
+
+        assertThat("TCA Policy Metrics Per Event Name must be 3",
+                tcaPolicy.getMetricsPerEventName().size(), is(3));
+
+        assertThat("TCA Policy Thresholds for first event name must be 3",
+                tcaPolicy.getMetricsPerEventName().get(0).getThresholds().size(), is(3));
+
+        testSerialization(tcaPolicy, getClass());
+    }
+}
index 4857522..78cbdfa 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration debug="false">\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration debug="false">
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index d6d26e8..5a87808 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-tca</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS CORE FUNCTIONALITY CODE FOR TCA (THRESHOLD CROSSING ALERT) -->\r
-    <name>DCAE Analytics TCA Core</name>\r
-    <description>DCAE Analytics TCA (THRESHOLD CROSSING ALERT) Core</description>\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- DCAE DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-common</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-dmaap</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-aai</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-        </dependency>\r
-\r
-        <!-- SCHEDULER -->\r
-        <dependency>\r
-            <groupId>org.quartz-scheduler</groupId>\r
-            <artifactId>quartz</artifactId>\r
-        </dependency>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-core</artifactId>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>ch.qos.logback</groupId>\r
-            <artifactId>logback-classic</artifactId>\r
-        </dependency>\r
-\r
-        <!-- FIND BUGS -->\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>annotations</artifactId>\r
-        </dependency>\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-            <artifactId>dcae-analytics-test</artifactId>\r
-            <version>2.1.0-SNAPSHOT</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-    </dependencies>\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>dcae-analytics</artifactId>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-tca</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS CORE FUNCTIONALITY CODE FOR TCA (THRESHOLD CROSSING ALERT) -->
+    <name>DCAE Analytics TCA Core</name>
+    <description>DCAE Analytics TCA (THRESHOLD CROSSING ALERT) Core</description>
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+    </properties>
+
+    <dependencies>
+
+        <!-- DCAE DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-common</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-dmaap</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-aai</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- SCHEDULER -->
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz</artifactId>
+        </dependency>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- FIND BUGS -->
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+        </dependency>
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+            <artifactId>dcae-analytics-test</artifactId>
+            <version>2.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
@@ -1,61 +1,61 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- * <p>\r
- *     Encapsulates common functionality for all TCA CEF Policy Processors\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public abstract class AbstractTCAECEFPolicyProcessor extends AbstractMessageProcessor<TCACEFProcessorContext> {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractTCAECEFPolicyProcessor.class);\r
-\r
-    /**\r
-     * For all TCA Policy Processor the pre processor ensures that {@link EventListener} object is\r
-     * present\r
-     *\r
-     * @param processorContext incoming Processor Context\r
-     * @return Pre processed Processor Context\r
-     */\r
-    @Override\r
-    public TCACEFProcessorContext preProcessor(@Nonnull TCACEFProcessorContext processorContext) {\r
-        // validates CEF Event Listener is Present\r
-        final EventListener cefEventListener = processorContext.getCEFEventListener();\r
-        if (cefEventListener == null) {\r
-            final String errorMessage = String.format(\r
-                    "CEF Event Listener is not Present.Invalid use of Processor: %s. CEF Message: %s",\r
-                    getProcessorInfo().getProcessorName(), processorContext.getMessage());\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-        return super.preProcessor(processorContext);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+/**
+ * <p>
+ *     Encapsulates common functionality for all TCA CEF Policy Processors
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public abstract class AbstractTCAECEFPolicyProcessor extends AbstractMessageProcessor<TCACEFProcessorContext> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractTCAECEFPolicyProcessor.class);
+
+    /**
+     * For all TCA Policy Processor the pre processor ensures that {@link EventListener} object is
+     * present
+     *
+     * @param processorContext incoming Processor Context
+     * @return Pre processed Processor Context
+     */
+    @Override
+    public TCACEFProcessorContext preProcessor(@Nonnull TCACEFProcessorContext processorContext) {
+        // validates CEF Event Listener is Present
+        final EventListener cefEventListener = processorContext.getCEFEventListener();
+        if (cefEventListener == null) {
+            final String errorMessage = String.format(
+                    "CEF Event Listener is not Present.Invalid use of Processor: %s. CEF Message: %s",
+                    getProcessorInfo().getProcessorName(), processorContext.getMessage());
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+        return super.preProcessor(processorContext);
+    }
+}
@@ -1,98 +1,98 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-\r
-/**\r
- *<p>\r
- *    Processor that converts incoming presumed JSON string CEF message to {@link EventListener} object\r
- *    <br>\r
- *    Pre Conditions: None\r
- *</p>\r
- *\r
- *  @author Rajiv Singla . Creation Date: 11/5/2016.\r
- */\r
-public class TCACEFJsonProcessor extends AbstractMessageProcessor<TCACEFProcessorContext> {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCACEFJsonProcessor.class);\r
-\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Converts incoming TCA CEF Message to Event Listener object";\r
-    }\r
-\r
-    @Override\r
-    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {\r
-\r
-        final String cefMessage = processorContext.getMessage();\r
-\r
-        // If CEF Message is null then processor should stop processing\r
-        if (cefMessage == null) {\r
-            String errorMessage = "Null CEF message cannot be converted to CEF Event Listener Object";\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-\r
-        // If CEF Message is blank then processor stop processing\r
-        if (StringUtils.isBlank(cefMessage)) {\r
-            setTerminatingProcessingMessage("Blank CEF message cannot be converted to CEF Event Listener Object",\r
-                    processorContext);\r
-            return processorContext;\r
-        }\r
-\r
-        // trim cef message\r
-        final String trimmedCEFMessage = cefMessage.trim();\r
-\r
-        // if message does not start with curly brace and ends with curly brace, it is not a valid cef message\r
-        // processor will stop processing\r
-        if (!(trimmedCEFMessage.startsWith("{") && trimmedCEFMessage.endsWith("}"))) {\r
-            setTerminatingProcessingMessage("CEF Message must start with curly brace and must end with curly brace",\r
-                    processorContext);\r
-            return processorContext;\r
-        }\r
-\r
-        // try parsing the cef message\r
-        try {\r
-            final EventListener eventListener = TCAUtils.readValue(trimmedCEFMessage, EventListener.class);\r
-            setFinishedProcessingMessage("CEF JSON to Event Listener Conversion Successful", processorContext);\r
-            // set new Event Listener in the Processor Context\r
-            processorContext.setCEFEventListener(eventListener);\r
-            return processorContext;\r
-        } catch (IOException e) {\r
-            final String errorMessage = String.format("Parsing Failed for CEF Message: %s, Error: %s", cefMessage, e);\r
-            // If parsing fails throw an exception\r
-            throw new MessageProcessingException(errorMessage, LOG, e);\r
-        }\r
-\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.apache.commons.lang3.StringUtils;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+/**
+ *<p>
+ *    Processor that converts incoming presumed JSON string CEF message to {@link EventListener} object
+ *    <br>
+ *    Pre Conditions: None
+ *</p>
+ *
+ *  @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public class TCACEFJsonProcessor extends AbstractMessageProcessor<TCACEFProcessorContext> {
+
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCACEFJsonProcessor.class);
+
+
+    @Override
+    public String getProcessorDescription() {
+        return "Converts incoming TCA CEF Message to Event Listener object";
+    }
+
+    @Override
+    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {
+
+        final String cefMessage = processorContext.getMessage();
+
+        // If CEF Message is null then processor should stop processing
+        if (cefMessage == null) {
+            String errorMessage = "Null CEF message cannot be converted to CEF Event Listener Object";
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+
+        // If CEF Message is blank then processor stop processing
+        if (StringUtils.isBlank(cefMessage)) {
+            setTerminatingProcessingMessage("Blank CEF message cannot be converted to CEF Event Listener Object",
+                    processorContext);
+            return processorContext;
+        }
+
+        // trim cef message
+        final String trimmedCEFMessage = cefMessage.trim();
+
+        // if message does not start with curly brace and ends with curly brace, it is not a valid cef message
+        // processor will stop processing
+        if (!(trimmedCEFMessage.startsWith("{") && trimmedCEFMessage.endsWith("}"))) {
+            setTerminatingProcessingMessage("CEF Message must start with curly brace and must end with curly brace",
+                    processorContext);
+            return processorContext;
+        }
+
+        // try parsing the cef message
+        try {
+            final EventListener eventListener = TCAUtils.readValue(trimmedCEFMessage, EventListener.class);
+            setFinishedProcessingMessage("CEF JSON to Event Listener Conversion Successful", processorContext);
+            // set new Event Listener in the Processor Context
+            processorContext.setCEFEventListener(eventListener);
+            return processorContext;
+        } catch (IOException e) {
+            final String errorMessage = String.format("Parsing Failed for CEF Message: %s, Error: %s", cefMessage, e);
+            // If parsing fails throw an exception
+            throw new MessageProcessingException(errorMessage, LOG, e);
+        }
+
+    }
+}
@@ -1,84 +1,84 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-\r
-/**\r
- * <p>\r
- *     TCA Processor which acts like a filter to filter out messages which does not belong to TCA Policy Domain\r
- *     <br>\r
- *     Pre Conditions: CEF Event Listener must be present\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public class TCACEFPolicyDomainFilter extends AbstractTCAECEFPolicyProcessor {\r
-\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Filters out CEF Messages which does not match TCAPolicy Domain";\r
-    }\r
-\r
-    @Override\r
-    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {\r
-\r
-        // Safe to get event Listener here without null check as pre processor will validate if\r
-        // event listener is indeed present\r
-        final EventListener eventListener = processorContext.getCEFEventListener();\r
-\r
-        Domain cefMessageDomain;\r
-\r
-        // Extract CEF domain as it is must be present as per CEF Schema\r
-        if (eventListener.getEvent() != null &&\r
-                eventListener.getEvent().getCommonEventHeader() != null &&\r
-                eventListener.getEvent().getCommonEventHeader().getDomain() != null) {\r
-            cefMessageDomain = eventListener.getEvent().getCommonEventHeader().getDomain();\r
-\r
-        } else {\r
-            final String terminatingMessage = "Invalid CEF Message.Common Event Header Domain not present.";\r
-            setTerminatingProcessingMessage(terminatingMessage, processorContext);\r
-            return processorContext;\r
-        }\r
-\r
-        // Get Policy Domain. TCA Policy Validation must ensure that Domain is indeed present\r
-        // no null check will be required here\r
-        final String policyDomain = processorContext.getTCAPolicy().getDomain();\r
-\r
-        // If Policy domain matches CEF message domain then continue processing\r
-        if (cefMessageDomain.toString().equalsIgnoreCase(policyDomain)) {\r
-            final String finishMessage = String.format("Policy Domain and CEF Message Domain match successful." +\r
-                    " Message Domain: %s, Policy Domain: %s", cefMessageDomain, policyDomain);\r
-            setFinishedProcessingMessage(finishMessage, processorContext);\r
-        } else {\r
-            // If policy domain does not match with CEF message terminate processing chain\r
-            final String terminatingMessage = String.format("Policy Domain and CEF Message Domain match unsuccessful." +\r
-                    " Message Domain: %s, Policy Domain: %s", cefMessageDomain, policyDomain);\r
-            setTerminatingProcessingMessage(terminatingMessage, processorContext);\r
-        }\r
-\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.onap.dcae.apod.analytics.model.domain.cef.Domain;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+
+/**
+ * <p>
+ *     TCA Processor which acts like a filter to filter out messages which does not belong to TCA Policy Domain
+ *     <br>
+ *     Pre Conditions: CEF Event Listener must be present
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public class TCACEFPolicyDomainFilter extends AbstractTCAECEFPolicyProcessor {
+
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getProcessorDescription() {
+        return "Filters out CEF Messages which does not match TCAPolicy Domain";
+    }
+
+    @Override
+    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {
+
+        // Safe to get event Listener here without null check as pre processor will validate if
+        // event listener is indeed present
+        final EventListener eventListener = processorContext.getCEFEventListener();
+
+        Domain cefMessageDomain;
+
+        // Extract CEF domain as it is must be present as per CEF Schema
+        if (eventListener.getEvent() != null &&
+                eventListener.getEvent().getCommonEventHeader() != null &&
+                eventListener.getEvent().getCommonEventHeader().getDomain() != null) {
+            cefMessageDomain = eventListener.getEvent().getCommonEventHeader().getDomain();
+
+        } else {
+            final String terminatingMessage = "Invalid CEF Message.Common Event Header Domain not present.";
+            setTerminatingProcessingMessage(terminatingMessage, processorContext);
+            return processorContext;
+        }
+
+        // Get Policy Domain. TCA Policy Validation must ensure that Domain is indeed present
+        // no null check will be required here
+        final String policyDomain = processorContext.getTCAPolicy().getDomain();
+
+        // If Policy domain matches CEF message domain then continue processing
+        if (cefMessageDomain.toString().equalsIgnoreCase(policyDomain)) {
+            final String finishMessage = String.format("Policy Domain and CEF Message Domain match successful." +
+                    " Message Domain: %s, Policy Domain: %s", cefMessageDomain, policyDomain);
+            setFinishedProcessingMessage(finishMessage, processorContext);
+        } else {
+            // If policy domain does not match with CEF message terminate processing chain
+            final String terminatingMessage = String.format("Policy Domain and CEF Message Domain match unsuccessful." +
+                    " Message Domain: %s, Policy Domain: %s", cefMessageDomain, policyDomain);
+            setTerminatingProcessingMessage(terminatingMessage, processorContext);
+        }
+
+        return processorContext;
+    }
+}
@@ -1,91 +1,91 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import com.google.common.base.Joiner;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-\r
-import java.util.List;\r
-\r
-import static org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils.getPolicyEventNamesSupplier;\r
-\r
-/**\r
- * <p>\r
- *     TCA Processor that acts like a filter to filter out messages which does not belong to TCA Policy Event Name\r
- *     <br>\r
- *     Pre Conditions: CEF Event Listener must be present\r
- * </p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCACEFPolicyEventNameFilter extends AbstractTCAECEFPolicyProcessor {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Filters out CEF Messages which does not match Policy Functional Roles";\r
-    }\r
-\r
-    @Override\r
-    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {\r
-\r
-        // Safe to get event Listener here without null check as pre processor will validate if\r
-        // event listener is indeed present\r
-        final EventListener eventListener = processorContext.getCEFEventListener();\r
-\r
-        String cefMessageEventName;\r
-\r
-        if (eventListener.getEvent() != null &&\r
-                eventListener.getEvent().getCommonEventHeader() != null &&\r
-                eventListener.getEvent().getCommonEventHeader().getEventName() != null) {\r
-            cefMessageEventName = eventListener.getEvent().getCommonEventHeader().getEventName();\r
-        } else {\r
-            String terminationMessage = "Invalid CEF Message.Common Event Header Event Name not present.";\r
-            setTerminatingProcessingMessage(terminationMessage, processorContext);\r
-            return processorContext;\r
-        }\r
-\r
-        // Determine Policy Functional Roles\r
-        final TCAPolicy tcaPolicy = processorContext.getTCAPolicy();\r
-        final List<String> policyEventNames = getPolicyEventNamesSupplier(tcaPolicy).get();\r
-        final String policyEventNamesString = Joiner.on(",").join(policyEventNames);\r
-\r
-        // If Policy event names contains CEF message event names then continue processing\r
-        if (policyEventNames.contains(cefMessageEventName)) {\r
-            final String finishMessage = String.format(\r
-                    "Policy Event Name and CEF Message Event Name match successful." +\r
-                            "Message EventName: %s, Policy Event Names: %s",\r
-                    cefMessageEventName, policyEventNamesString);\r
-            setFinishedProcessingMessage(finishMessage, processorContext);\r
-        } else {\r
-            // If Policy event names does not contain CEF message event names then terminate processing\r
-            final String terminatingMessage = String.format(\r
-                    "Policy Event name and CEF Message Event name match unsuccessful." +\r
-                            "Message EventName: %s, Policy Event Names: %s",\r
-                    cefMessageEventName, policyEventNamesString);\r
-            setTerminatingProcessingMessage(terminatingMessage, processorContext);\r
-        }\r
-\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import com.google.common.base.Joiner;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+
+import java.util.List;
+
+import static org.onap.dcae.apod.analytics.tca.utils.TCAUtils.getPolicyEventNamesSupplier;
+
+/**
+ * <p>
+ *     TCA Processor that acts like a filter to filter out messages which does not belong to TCA Policy Event Name
+ *     <br>
+ *     Pre Conditions: CEF Event Listener must be present
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCACEFPolicyEventNameFilter extends AbstractTCAECEFPolicyProcessor {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getProcessorDescription() {
+        return "Filters out CEF Messages which does not match Policy Functional Roles";
+    }
+
+    @Override
+    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {
+
+        // Safe to get event Listener here without null check as pre processor will validate if
+        // event listener is indeed present
+        final EventListener eventListener = processorContext.getCEFEventListener();
+
+        String cefMessageEventName;
+
+        if (eventListener.getEvent() != null &&
+                eventListener.getEvent().getCommonEventHeader() != null &&
+                eventListener.getEvent().getCommonEventHeader().getEventName() != null) {
+            cefMessageEventName = eventListener.getEvent().getCommonEventHeader().getEventName();
+        } else {
+            String terminationMessage = "Invalid CEF Message.Common Event Header Event Name not present.";
+            setTerminatingProcessingMessage(terminationMessage, processorContext);
+            return processorContext;
+        }
+
+        // Determine Policy Functional Roles
+        final TCAPolicy tcaPolicy = processorContext.getTCAPolicy();
+        final List<String> policyEventNames = getPolicyEventNamesSupplier(tcaPolicy).get();
+        final String policyEventNamesString = Joiner.on(",").join(policyEventNames);
+
+        // If Policy event names contains CEF message event names then continue processing
+        if (policyEventNames.contains(cefMessageEventName)) {
+            final String finishMessage = String.format(
+                    "Policy Event Name and CEF Message Event Name match successful." +
+                            "Message EventName: %s, Policy Event Names: %s",
+                    cefMessageEventName, policyEventNamesString);
+            setFinishedProcessingMessage(finishMessage, processorContext);
+        } else {
+            // If Policy event names does not contain CEF message event names then terminate processing
+            final String terminatingMessage = String.format(
+                    "Policy Event name and CEF Message Event name match unsuccessful." +
+                            "Message EventName: %s, Policy Event Names: %s",
+                    cefMessageEventName, policyEventNamesString);
+            setTerminatingProcessingMessage(terminatingMessage, processorContext);
+        }
+
+        return processorContext;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import com.google.common.base.Optional;\r
-import com.google.common.collect.Table;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.tca.utils.TCAUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.math.BigDecimal;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import javax.annotation.Nonnull;\r
-\r
-/**\r
- *<p>\r
- *     TCA CEF Policy Threshold processor\r
- *     <br>\r
- *     Pre Conditions: Domain and Functional Role must be present in CEF Event Listener Object\r
- *</p>\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCACEFPolicyThresholdsProcessor extends AbstractTCAECEFPolicyProcessor {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCACEFPolicyThresholdsProcessor.class);\r
-\r
-    @Override\r
-    public TCACEFProcessorContext preProcessor(@Nonnull TCACEFProcessorContext processorContext) {\r
-        // validates Domain and Functional Role are present\r
-        final EventListener eventListener = processorContext.getCEFEventListener();\r
-        final Domain domain = eventListener.getEvent().getCommonEventHeader().getDomain();\r
-        final String eventName = eventListener.getEvent().getCommonEventHeader().getEventName();\r
-        if (domain == null || eventName == null) {\r
-            final String errorMessage = "CEF Event Listener domain or eventName not Present. " +\r
-                    "Invalid use of this Processor";\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-        return super.preProcessor(processorContext);\r
-    }\r
-\r
-    @Override\r
-    public String getProcessorDescription() {\r
-        return "Applies TCA Policy rules to incoming CEF message. If any thresholds are violated attaches max " +\r
-                "Severity violated threshold to TCA Processor Context";\r
-    }\r
-\r
-    @Override\r
-    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {\r
-\r
-        final String cefMessage = processorContext.getMessage();\r
-\r
-        // Determine domain and eventName\r
-        final EventListener eventListener = processorContext.getCEFEventListener();\r
-        final String eventName = eventListener.getEvent().getCommonEventHeader().getEventName();\r
-\r
-        // Get Table containing event Name and Thresholds Field Path\r
-        final TCAPolicy tcaPolicy = processorContext.getTCAPolicy();\r
-        final Table<String, String, List<Threshold>> eventNameFieldPathsTable =\r
-                TCAUtils.getPolicyEventNameThresholdsTableSupplier(tcaPolicy).get();\r
-\r
-        // Get Policy Field Paths for that event Name\r
-        final Map<String, List<Threshold>> policyFieldPathsMap = eventNameFieldPathsTable.row(eventName);\r
-        final Set<String> policyFieldPaths = policyFieldPathsMap.keySet();\r
-\r
-        // Get Json Values for Policy Fields\r
-        final Map<String, List<BigDecimal>> messageFieldValuesMap =\r
-                TCAUtils.getJsonPathValue(cefMessage, policyFieldPaths);\r
-\r
-        // Determine all violated thresholds per message field Path\r
-        final Map<String, Threshold> violatedThresholdsMap = new HashMap<>();\r
-        for (Map.Entry<String, List<BigDecimal>> messageFieldValuesMapEntry : messageFieldValuesMap.entrySet()) {\r
-            final String messageFieldPath = messageFieldValuesMapEntry.getKey();\r
-            final List<Threshold> messageFieldAssociatedPolicyThresholds = policyFieldPathsMap.get(messageFieldPath);\r
-            if (messageFieldAssociatedPolicyThresholds != null) {\r
-                final Optional<Threshold> thresholdOptional = TCAUtils.thresholdCalculator(\r
-                        messageFieldValuesMapEntry.getValue(), messageFieldAssociatedPolicyThresholds);\r
-                if (thresholdOptional.isPresent()) {\r
-                    violatedThresholdsMap.put(messageFieldPath, thresholdOptional.get());\r
-                }\r
-            }\r
-        }\r
-\r
-        // No threshold were violated\r
-        if (violatedThresholdsMap.isEmpty()) {\r
-\r
-            final String terminationMessage = "No Policy Threshold violated by the VES CEF Message.";\r
-            setTerminatingProcessingMessage(terminationMessage, processorContext);\r
-\r
-        } else {\r
-\r
-            // If there are policy violations then determine max priority violation\r
-            final Threshold maxSeverityThresholdViolation =\r
-                    TCAUtils.prioritizeThresholdViolations(violatedThresholdsMap);\r
-            final MetricsPerEventName violatedMetrics = TCAUtils.createViolatedMetrics(tcaPolicy,\r
-                    maxSeverityThresholdViolation, eventName);\r
-            // attach policy violation to processor Context\r
-            processorContext.setMetricsPerEventName(violatedMetrics);\r
-\r
-            final String finishMessage = String.format("Policy Threshold violation detected for threshold: %s",\r
-                    maxSeverityThresholdViolation);\r
-            setFinishedProcessingMessage(finishMessage, processorContext);\r
-\r
-        }\r
-\r
-        return processorContext;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.Table;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.model.domain.cef.Domain;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.tca.utils.TCAUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Nonnull;
+
+/**
+ *<p>
+ *     TCA CEF Policy Threshold processor
+ *     <br>
+ *     Pre Conditions: Domain and Functional Role must be present in CEF Event Listener Object
+ *</p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCACEFPolicyThresholdsProcessor extends AbstractTCAECEFPolicyProcessor {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCACEFPolicyThresholdsProcessor.class);
+
+    @Override
+    public TCACEFProcessorContext preProcessor(@Nonnull TCACEFProcessorContext processorContext) {
+        // validates Domain and Functional Role are present
+        final EventListener eventListener = processorContext.getCEFEventListener();
+        final Domain domain = eventListener.getEvent().getCommonEventHeader().getDomain();
+        final String eventName = eventListener.getEvent().getCommonEventHeader().getEventName();
+        if (domain == null || eventName == null) {
+            final String errorMessage = "CEF Event Listener domain or eventName not Present. " +
+                    "Invalid use of this Processor";
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+        return super.preProcessor(processorContext);
+    }
+
+    @Override
+    public String getProcessorDescription() {
+        return "Applies TCA Policy rules to incoming CEF message. If any thresholds are violated attaches max " +
+                "Severity violated threshold to TCA Processor Context";
+    }
+
+    @Override
+    public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {
+
+        final String cefMessage = processorContext.getMessage();
+
+        // Determine domain and eventName
+        final EventListener eventListener = processorContext.getCEFEventListener();
+        final String eventName = eventListener.getEvent().getCommonEventHeader().getEventName();
+
+        // Get Table containing event Name and Thresholds Field Path
+        final TCAPolicy tcaPolicy = processorContext.getTCAPolicy();
+        final Table<String, String, List<Threshold>> eventNameFieldPathsTable =
+                TCAUtils.getPolicyEventNameThresholdsTableSupplier(tcaPolicy).get();
+
+        // Get Policy Field Paths for that event Name
+        final Map<String, List<Threshold>> policyFieldPathsMap = eventNameFieldPathsTable.row(eventName);
+        final Set<String> policyFieldPaths = policyFieldPathsMap.keySet();
+
+        // Get Json Values for Policy Fields
+        final Map<String, List<BigDecimal>> messageFieldValuesMap =
+                TCAUtils.getJsonPathValue(cefMessage, policyFieldPaths);
+
+        // Determine all violated thresholds per message field Path
+        final Map<String, Threshold> violatedThresholdsMap = new HashMap<>();
+        for (Map.Entry<String, List<BigDecimal>> messageFieldValuesMapEntry : messageFieldValuesMap.entrySet()) {
+            final String messageFieldPath = messageFieldValuesMapEntry.getKey();
+            final List<Threshold> messageFieldAssociatedPolicyThresholds = policyFieldPathsMap.get(messageFieldPath);
+            if (messageFieldAssociatedPolicyThresholds != null) {
+                final Optional<Threshold> thresholdOptional = TCAUtils.thresholdCalculator(
+                        messageFieldValuesMapEntry.getValue(), messageFieldAssociatedPolicyThresholds);
+                if (thresholdOptional.isPresent()) {
+                    violatedThresholdsMap.put(messageFieldPath, thresholdOptional.get());
+                }
+            }
+        }
+
+        // No threshold were violated
+        if (violatedThresholdsMap.isEmpty()) {
+
+            final String terminationMessage = "No Policy Threshold violated by the VES CEF Message.";
+            setTerminatingProcessingMessage(terminationMessage, processorContext);
+
+        } else {
+
+            // If there are policy violations then determine max priority violation
+            final Threshold maxSeverityThresholdViolation =
+                    TCAUtils.prioritizeThresholdViolations(violatedThresholdsMap);
+            final MetricsPerEventName violatedMetrics = TCAUtils.createViolatedMetrics(tcaPolicy,
+                    maxSeverityThresholdViolation, eventName);
+            // attach policy violation to processor Context
+            processorContext.setMetricsPerEventName(violatedMetrics);
+
+            final String finishMessage = String.format("Policy Threshold violation detected for threshold: %s",
+                    maxSeverityThresholdViolation);
+            setFinishedProcessingMessage(finishMessage, processorContext);
+
+        }
+
+        return processorContext;
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.AbstractProcessorContext;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-\r
-/**\r
- *  TCA CEF Policy Processor Context\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/7/2016.\r
- */\r
-public class TCACEFProcessorContext extends AbstractProcessorContext {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    private final TCAPolicy tcaPolicy;\r
-    private EventListener eventListener;\r
-    private MetricsPerEventName metricsPerEventName;\r
-\r
-    public TCACEFProcessorContext(final String message, boolean canProcessingContinue, final TCAPolicy tcaPolicy) {\r
-        super(message, canProcessingContinue);\r
-        this.tcaPolicy = tcaPolicy;\r
-        // present only if cef incoming message can be parsed successfully to Event Listener Object\r
-        this.eventListener = null;\r
-        // present only if there are any threshold violations are detected\r
-        this.metricsPerEventName = null;\r
-    }\r
-\r
-    // Auxiliary Constructor which default canProcessingContinue Flag to true\r
-    public TCACEFProcessorContext(final String message, final TCAPolicy tcaPolicy) {\r
-        this(message, true, tcaPolicy);\r
-    }\r
-\r
-    /**\r
-     * Returns {@link TCAPolicy} Object\r
-     *\r
-     * @return TCA Policy\r
-     */\r
-    public TCAPolicy getTCAPolicy() {\r
-        return tcaPolicy;\r
-    }\r
-\r
-    /**\r
-     * Returns Common Event Format {@link EventListener} if present else null\r
-     *\r
-     * @return CEF Event Listener\r
-     */\r
-    public EventListener getCEFEventListener() {\r
-        return eventListener;\r
-    }\r
-\r
-\r
-    /**\r
-     * Sets new {@link EventListener}\r
-     *\r
-     * @param eventListener set new value for CEF event listener\r
-     */\r
-    public void setCEFEventListener(final EventListener eventListener) {\r
-        this.eventListener = eventListener;\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns TCA Policy {@link MetricsPerEventName} which was has violated Threshold for the CEF Message if\r
-     * present else null\r
-     *\r
-     * @return Violated Threshold\r
-     */\r
-    public MetricsPerEventName getMetricsPerEventName() {\r
-        return metricsPerEventName;\r
-    }\r
-\r
-    /**\r
-     * Assign new TCA Policy {@link MetricsPerEventName} which was has violated Threshold for the CEF Message\r
-     *\r
-     * @param metricsPerEventName new value for Metrics Per Functional Role with violated threshold\r
-     */\r
-    public void setMetricsPerEventName(MetricsPerEventName metricsPerEventName) {\r
-        this.metricsPerEventName = metricsPerEventName;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.onap.dcae.apod.analytics.common.service.processor.AbstractProcessorContext;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+
+/**
+ *  TCA CEF Policy Processor Context
+ *
+ * @author Rajiv Singla . Creation Date: 11/7/2016.
+ */
+public class TCACEFProcessorContext extends AbstractProcessorContext {
+
+    private static final long serialVersionUID = 1L;
+
+    private final TCAPolicy tcaPolicy;
+    private EventListener eventListener;
+    private MetricsPerEventName metricsPerEventName;
+
+    public TCACEFProcessorContext(final String message, boolean canProcessingContinue, final TCAPolicy tcaPolicy) {
+        super(message, canProcessingContinue);
+        this.tcaPolicy = tcaPolicy;
+        // present only if cef incoming message can be parsed successfully to Event Listener Object
+        this.eventListener = null;
+        // present only if there are any threshold violations are detected
+        this.metricsPerEventName = null;
+    }
+
+    // Auxiliary Constructor which default canProcessingContinue Flag to true
+    public TCACEFProcessorContext(final String message, final TCAPolicy tcaPolicy) {
+        this(message, true, tcaPolicy);
+    }
+
+    /**
+     * Returns {@link TCAPolicy} Object
+     *
+     * @return TCA Policy
+     */
+    public TCAPolicy getTCAPolicy() {
+        return tcaPolicy;
+    }
+
+    /**
+     * Returns Common Event Format {@link EventListener} if present else null
+     *
+     * @return CEF Event Listener
+     */
+    public EventListener getCEFEventListener() {
+        return eventListener;
+    }
+
+
+    /**
+     * Sets new {@link EventListener}
+     *
+     * @param eventListener set new value for CEF event listener
+     */
+    public void setCEFEventListener(final EventListener eventListener) {
+        this.eventListener = eventListener;
+    }
+
+
+    /**
+     * Returns TCA Policy {@link MetricsPerEventName} which was has violated Threshold for the CEF Message if
+     * present else null
+     *
+     * @return Violated Threshold
+     */
+    public MetricsPerEventName getMetricsPerEventName() {
+        return metricsPerEventName;
+    }
+
+    /**
+     * Assign new TCA Policy {@link MetricsPerEventName} which was has violated Threshold for the CEF Message
+     *
+     * @param metricsPerEventName new value for Metrics Per Functional Role with violated threshold
+     */
+    public void setMetricsPerEventName(MetricsPerEventName metricsPerEventName) {
+        this.metricsPerEventName = metricsPerEventName;
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.utils;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.JsonNode;\r
-import com.google.common.base.Function;\r
-import com.google.common.base.Optional;\r
-import com.google.common.base.Predicate;\r
-import com.google.common.base.Predicates;\r
-import com.google.common.base.Supplier;\r
-import com.google.common.base.Suppliers;\r
-import com.google.common.collect.HashBasedTable;\r
-import com.google.common.collect.ImmutableList;\r
-import com.google.common.collect.ImmutableMap;\r
-import com.google.common.collect.Iterables;\r
-import com.google.common.collect.Lists;\r
-import com.google.common.collect.Maps;\r
-import com.google.common.collect.Table;\r
-import com.jayway.jsonpath.DocumentContext;\r
-import com.jayway.jsonpath.JsonPath;\r
-import com.jayway.jsonpath.TypeRef;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.apache.commons.lang3.tuple.ImmutablePair;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.openecomp.dcae.apod.analytics.aai.service.AAIEnrichmentClient;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.GenericMessageChainProcessor;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertAction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.CommonEventHeader;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Criticality;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.PerformanceCounter;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.ThresholdCrossingAlertFields;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.AAI;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-import org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;\r
-import org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyDomainFilter;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyEventNameFilter;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFPolicyThresholdsProcessor;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;\r
-import org.quartz.Job;\r
-import org.quartz.JobBuilder;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.JobDetail;\r
-import org.quartz.Scheduler;\r
-import org.quartz.SchedulerException;\r
-import org.quartz.SimpleScheduleBuilder;\r
-import org.quartz.SimpleTrigger;\r
-import org.quartz.TriggerBuilder;\r
-import org.quartz.impl.StdSchedulerFactory;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.IOException;\r
-import java.math.BigDecimal;\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.Comparator;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.Iterator;\r
-import java.util.LinkedHashMap;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Properties;\r
-import java.util.Set;\r
-import java.util.SortedMap;\r
-import java.util.TreeMap;\r
-import java.util.UUID;\r
-\r
-import javax.annotation.Nonnull;\r
-import javax.annotation.Nullable;\r
-\r
-import static com.google.common.collect.Lists.newArrayList;\r
-import static org.apache.commons.lang3.time.DateFormatUtils.SMTP_DATETIME_FORMAT;\r
-\r
-/**\r
- * Utility Helper methods for TCA sub module only. Extends {@link AnalyticsModelJsonUtils} to get\r
- * pre configured Json Object Mapper understand serialization and deserialization of CEF Message\r
- * and TCA Policy\r
- *\r
- * @author Rajiv Singla . Creation Date: 10/24/2016.\r
- */\r
-public abstract class TCAUtils extends AnalyticsModelJsonUtils {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(TCAUtils.class);\r
-\r
-    /**\r
-     * Threshold Comparator which is used to order thresholds based on their severity e.g. ( CRITICAL, MAJOR, MINOR,\r
-     * WARNING )\r
-     */\r
-    private static final Comparator<Threshold> THRESHOLD_COMPARATOR = new Comparator<Threshold>() {\r
-        @Override\r
-        public int compare(Threshold threshold1, Threshold threshold2) {\r
-            return threshold1.getSeverity().compareTo(threshold2.getSeverity());\r
-        }\r
-    };\r
-\r
-    /**\r
-     * {@link Function} that extracts {@link TCAPolicy#getMetricsPerEventName()} from {@link TCAPolicy}\r
-     *\r
-     * @return TCA Policy Metrics Per Event Name list\r
-     */\r
-    public static Function<TCAPolicy, List<MetricsPerEventName>> tcaPolicyMetricsExtractorFunction() {\r
-        return new Function<TCAPolicy, List<MetricsPerEventName>>() {\r
-            @Nullable\r
-            @Override\r
-            public List<MetricsPerEventName> apply(@Nonnull TCAPolicy tcaPolicy) {\r
-                return tcaPolicy.getMetricsPerEventName();\r
-            }\r
-        };\r
-    }\r
-\r
-    /**\r
-     * {@link Function} that extracts {@link MetricsPerEventName#getEventName()} from\r
-     * {@link MetricsPerEventName}\r
-     *\r
-     * @return Event Names or a Metrics Per Event Name object\r
-     */\r
-    public static Function<MetricsPerEventName, String> tcaEventNameExtractorFunction() {\r
-        return new Function<MetricsPerEventName, String>() {\r
-            @Override\r
-            public String apply(@Nonnull MetricsPerEventName metricsPerEventName) {\r
-                return metricsPerEventName.getEventName();\r
-            }\r
-        };\r
-    }\r
-\r
-\r
-    /**\r
-     * Extracts {@link TCAPolicy} Event Names\r
-     *\r
-     * @param tcaPolicy TCA Policy\r
-     * @return List of event names in the TCA Policy\r
-     */\r
-    public static List<String> getPolicyEventNames(@Nonnull final TCAPolicy tcaPolicy) {\r
-        final List<MetricsPerEventName> metricsPerEventNames =\r
-                tcaPolicyMetricsExtractorFunction().apply(tcaPolicy);\r
-\r
-        return Lists.transform(metricsPerEventNames, tcaEventNameExtractorFunction());\r
-    }\r
-\r
-    /**\r
-     * A {@link Supplier} which caches {@link TCAPolicy} Event names as they are not expected to\r
-     * change during runtime\r
-     *\r
-     * @param tcaPolicy TCA Policy\r
-     * @return a Supplier that memoize the TCA Policy event names\r
-     */\r
-    public static Supplier<List<String>> getPolicyEventNamesSupplier(@Nonnull final TCAPolicy tcaPolicy) {\r
-        return Suppliers.memoize(new Supplier<List<String>>() {\r
-            @Override\r
-            public List<String> get() {\r
-                return getPolicyEventNames(tcaPolicy);\r
-            }\r
-        });\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates a Table to lookup thresholds of a {@link TCAPolicy} by its Event Name and Threshold Field path\r
-     *\r
-     * @param tcaPolicy TCA Policy\r
-     * @return A table with Keys of event name and field path containing List of threshold as values\r
-     */\r
-    public static Table<String, String, List<Threshold>> getPolicyEventNameThresholdsTable(final TCAPolicy tcaPolicy) {\r
-        final Table<String, String, List<Threshold>> domainFRTable = HashBasedTable.create();\r
-        for (MetricsPerEventName metricsPerEventName : tcaPolicy.getMetricsPerEventName()) {\r
-            final String eventName = metricsPerEventName.getEventName();\r
-            final List<Threshold> thresholds = metricsPerEventName.getThresholds();\r
-            for (Threshold threshold : thresholds) {\r
-                final List<Threshold> existingThresholds = domainFRTable.get(eventName, threshold.getFieldPath());\r
-                if (existingThresholds == null) {\r
-                    final LinkedList<Threshold> newThresholdList = new LinkedList<>();\r
-                    newThresholdList.add(threshold);\r
-                    domainFRTable.put(eventName, threshold.getFieldPath(), newThresholdList);\r
-                } else {\r
-                    domainFRTable.get(eventName, threshold.getFieldPath()).add(threshold);\r
-                }\r
-            }\r
-        }\r
-        return domainFRTable;\r
-    }\r
-\r
-\r
-    /**\r
-     * A {@link Supplier} which caches Policy Event Name and Threshold Field Path Thresholds lookup table\r
-     *\r
-     * @param tcaPolicy TCA Policy\r
-     * @return Cached Supplier for table with Keys of event Name and field path containing thresholds as values\r
-     */\r
-    public static Supplier<Table<String, String, List<Threshold>>> getPolicyEventNameThresholdsTableSupplier\r
-    (final TCAPolicy tcaPolicy) {\r
-        return Suppliers.memoize(new Supplier<Table<String, String, List<Threshold>>>() {\r
-            @Override\r
-            public Table<String, String, List<Threshold>> get() {\r
-                return getPolicyEventNameThresholdsTable(tcaPolicy);\r
-            }\r
-        });\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates a {@link GenericMessageChainProcessor} of {@link TCACEFJsonProcessor},\r
-     * {@link TCACEFPolicyDomainFilter} and {@link TCACEFPolicyEventNameFilter}s to\r
-     * filter out messages which does not match policy domain or event Name\r
-     *\r
-     * @param cefMessage CEF Message\r
-     * @param tcaPolicy TCA Policy\r
-     * @return Message Process Context after processing filter chain\r
-     */\r
-    public static TCACEFProcessorContext filterCEFMessage(@Nullable final String cefMessage,\r
-                                                          @Nonnull final TCAPolicy tcaPolicy) {\r
-\r
-        final TCACEFJsonProcessor jsonProcessor = new TCACEFJsonProcessor();\r
-        final TCACEFPolicyDomainFilter domainFilter = new TCACEFPolicyDomainFilter();\r
-        final TCACEFPolicyEventNameFilter eventNameFilter = new TCACEFPolicyEventNameFilter();\r
-        // Create a list of message processors\r
-        final ImmutableList<AbstractMessageProcessor<TCACEFProcessorContext>> messageProcessors =\r
-                ImmutableList.of(jsonProcessor, domainFilter, eventNameFilter);\r
-        final TCACEFProcessorContext processorContext = new TCACEFProcessorContext(cefMessage, tcaPolicy);\r
-        // Create a message processors chain\r
-        final GenericMessageChainProcessor<TCACEFProcessorContext> tcaProcessingChain =\r
-                new GenericMessageChainProcessor<>(messageProcessors, processorContext);\r
-        // process chain\r
-        return tcaProcessingChain.processChain();\r
-    }\r
-\r
-\r
-    /**\r
-     * Extracts json path values for given json Field Paths from using Json path notation. Assumes\r
-     * that values extracted are always long\r
-     *\r
-     * @param message CEF Message\r
-     * @param jsonFieldPaths Json Field Paths\r
-     * @return Map containing key as json path and values as values associated with that json path\r
-     */\r
-    public static Map<String, List<BigDecimal>> getJsonPathValue(@Nonnull String message, @Nonnull Set<String>\r
-            jsonFieldPaths) {\r
-\r
-        final Map<String, List<BigDecimal>> jsonFieldPathMap = new HashMap<>();\r
-        final DocumentContext documentContext = JsonPath.parse(message);\r
-\r
-        for (String jsonFieldPath : jsonFieldPaths) {\r
-            List<BigDecimal> jsonFieldValues = null;\r
-\r
-            try {\r
-                jsonFieldValues = documentContext.read(jsonFieldPath, new TypeRef<List<BigDecimal>>() {\r
-                });\r
-            } catch (Exception e) {\r
-                final String errorMessage = String.format(\r
-                        "Unable to convert jsonFieldPath: %s value to valid number. " +\r
-                                "Json Path value is not in a valid number format. Incoming message: %s",\r
-                        jsonFieldPath, message);\r
-                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);\r
-            }\r
-            // If Json Field Values are not or empty\r
-            if (jsonFieldValues != null && !jsonFieldValues.isEmpty()) {\r
-                // Filter out all null values in the filed values list\r
-                final List<BigDecimal> nonNullValues = Lists.newLinkedList(Iterables.filter(jsonFieldValues,\r
-                        Predicates.<BigDecimal>notNull()));\r
-                // If there are non null values put them in the map\r
-                if (!nonNullValues.isEmpty()) {\r
-                    jsonFieldPathMap.put(jsonFieldPath, nonNullValues);\r
-                }\r
-            }\r
-        }\r
-\r
-        return jsonFieldPathMap;\r
-    }\r
-\r
-    /**\r
-     * Computes if any CEF Message Fields have violated any Policy Thresholds. For the same policy field path\r
-     * it applies threshold in order of their severity and record the first threshold per message field path\r
-     *\r
-     * @param messageFieldValues Field Path Values extracted from CEF Message\r
-     * @param fieldThresholds Policy Thresholds for Field Path\r
-     * @return Optional of violated threshold for a field path\r
-     */\r
-    public static Optional<Threshold> thresholdCalculator(final List<BigDecimal> messageFieldValues, final\r
-    List<Threshold>\r
-            fieldThresholds) {\r
-        // order thresholds by severity\r
-        Collections.sort(fieldThresholds, THRESHOLD_COMPARATOR);\r
-        // Now apply each threshold to field values\r
-        for (Threshold fieldThreshold : fieldThresholds) {\r
-            for (BigDecimal messageFieldValue : messageFieldValues) {\r
-                final Boolean isThresholdViolated =\r
-                        fieldThreshold.getDirection().operate(messageFieldValue, new BigDecimal(fieldThreshold\r
-                                .getThresholdValue()));\r
-                if (isThresholdViolated) {\r
-                    final Threshold violatedThreshold = Threshold.copy(fieldThreshold);\r
-                    violatedThreshold.setActualFieldValue(messageFieldValue);\r
-                    return Optional.of(violatedThreshold);\r
-                }\r
-            }\r
-        }\r
-        return Optional.absent();\r
-    }\r
-\r
-    /**\r
-     * Prioritize Threshold to be reported in case there was multiple TCA violations in a single CEF message.\r
-     * Grabs first highest priority violated threshold\r
-     *\r
-     * @param violatedThresholdsMap Map containing field Path and associated violated Thresholds\r
-     * @return First Highest priority violated threshold\r
-     */\r
-    public static Threshold prioritizeThresholdViolations(final Map<String, Threshold> violatedThresholdsMap) {\r
-\r
-        final List<Threshold> violatedThresholds = newArrayList(violatedThresholdsMap.values());\r
-\r
-        if (violatedThresholds.size() == 1) {\r
-            return violatedThresholds.get(0);\r
-        }\r
-        Collections.sort(violatedThresholds, THRESHOLD_COMPARATOR);\r
-        // Just grab the first violated threshold with highest priority\r
-        return violatedThresholds.get(0);\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates {@link MetricsPerEventName} object which contains violated thresholds\r
-     *\r
-     * @param tcaPolicy TCA Policy\r
-     * @param violatedThreshold Violated thresholds\r
-     * @param eventName Event Name\r
-     *\r
-     * @return MetricsPerEventName object containing one highest severity violated threshold\r
-     */\r
-    public static MetricsPerEventName createViolatedMetrics(@Nonnull final TCAPolicy tcaPolicy,\r
-                                                            @Nonnull final Threshold violatedThreshold,\r
-                                                            @Nonnull final String eventName) {\r
-\r
-        final ArrayList<MetricsPerEventName> metricsPerEventNames = newArrayList(\r
-                Iterables.filter(tcaPolicy.getMetricsPerEventName(), new Predicate<MetricsPerEventName>() {\r
-                    @Override\r
-                    public boolean apply(@Nonnull MetricsPerEventName metricsPerEventName) {\r
-                        return metricsPerEventName.getEventName().equals(eventName);\r
-                    }\r
-                }));\r
-        // TCA policy must have only one metrics per event Name\r
-        if (metricsPerEventNames.size() == 1) {\r
-            final MetricsPerEventName violatedMetrics =\r
-                    MetricsPerEventName.copy(metricsPerEventNames.get(0));\r
-            violatedMetrics.setThresholds(ImmutableList.of(Threshold.copy(violatedThreshold)));\r
-            return violatedMetrics;\r
-        } else {\r
-            final String errorMessage = String.format("TCA Policy must contain eventName: %s", eventName);\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalStateException(errorMessage));\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Computes threshold violations\r
-     *\r
-     * @param processorContext Filtered processor Context\r
-     * @return processor context with any threshold violations\r
-     */\r
-    public static TCACEFProcessorContext computeThresholdViolations(final TCACEFProcessorContext processorContext) {\r
-        final TCACEFPolicyThresholdsProcessor policyThresholdsProcessor = new TCACEFPolicyThresholdsProcessor();\r
-        return policyThresholdsProcessor.apply(processorContext);\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates TCA Alert String - Alert String is created in both {@link EventListener} or {@link TCAVESResponse}\r
-     * formats\r
-     *\r
-     * @param processorContextWithViolations processor context which has TCA violations\r
-     * @param tcaAppName tca app name\r
-     * @param isAlertInCEFFormat determines if output alert is in CEF format\r
-     *\r
-     * @return TCA Alert String\r
-     *\r
-     * @throws JsonProcessingException If alert cannot be parsed into JSON String\r
-     */\r
-    public static String createTCAAlertString(final TCACEFProcessorContext processorContextWithViolations,\r
-                                              final String tcaAppName,\r
-                                              final Boolean isAlertInCEFFormat) throws JsonProcessingException {\r
-        if (isAlertInCEFFormat != null && isAlertInCEFFormat) {\r
-            final EventListener eventListenerWithViolations =\r
-                    addThresholdViolationFields(processorContextWithViolations);\r
-            final String alertString = writeValueAsString(eventListenerWithViolations);\r
-            LOG.debug("Created alert in CEF Format: {}", alertString);\r
-            return alertString;\r
-        } else {\r
-            final TCAVESResponse newTCAVESResponse =\r
-                    createNewTCAVESResponse(processorContextWithViolations, tcaAppName);\r
-            final String alertString = writeValueAsString(newTCAVESResponse);\r
-            LOG.debug("Created alert in Non CEF Format: {}", alertString);\r
-            return alertString;\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Adds threshold violation fields to {@link EventListener}\r
-     *\r
-     * @param processorContextWithViolations processor context that contains violations\r
-     * @return event listener with threshold crossing alert fields populated\r
-     */\r
-    public static EventListener addThresholdViolationFields(\r
-            final TCACEFProcessorContext processorContextWithViolations) {\r
-\r
-        final MetricsPerEventName metricsPerEventName =\r
-                processorContextWithViolations.getMetricsPerEventName();\r
-        // confirm violations are indeed present\r
-        if (metricsPerEventName == null) {\r
-            final String errorMessage = "No violations metrics. Unable to add Threshold Violation Fields";\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-\r
-        // get violated threshold\r
-        final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);\r
-        final EventListener eventListener = processorContextWithViolations.getCEFEventListener();\r
-        final CommonEventHeader commonEventHeader = eventListener.getEvent().getCommonEventHeader();\r
-\r
-        // create new threshold crossing alert fields\r
-        final ThresholdCrossingAlertFields thresholdCrossingAlertFields = new ThresholdCrossingAlertFields();\r
-        thresholdCrossingAlertFields.setEventStartTimestamp(commonEventHeader.getStartEpochMicrosec().toString());\r
-        thresholdCrossingAlertFields.setEventSeverity(violatedThreshold.getSeverity());\r
-        thresholdCrossingAlertFields.setCollectionTimestamp(SMTP_DATETIME_FORMAT.format(new Date()));\r
-        thresholdCrossingAlertFields.setAlertAction(AlertAction.SET);\r
-        thresholdCrossingAlertFields.setAlertType(AlertType.INTERFACE_ANOMALY);\r
-        thresholdCrossingAlertFields.setAlertDescription(violatedThreshold.getDirection().toString());\r
-        thresholdCrossingAlertFields.setInterfaceName(commonEventHeader.getReportingEntityName());\r
-        thresholdCrossingAlertFields.setElementType(commonEventHeader.getEventName());\r
-\r
-        // create new performance count\r
-        final PerformanceCounter performanceCounter = new PerformanceCounter();\r
-        performanceCounter.setCriticality(convertSeverityToCriticality(violatedThreshold.getSeverity()));\r
-        performanceCounter.setName(violatedThreshold.getFieldPath());\r
-        performanceCounter.setValue(violatedThreshold.getActualFieldValue().toString());\r
-        performanceCounter.setThresholdCrossed(violatedThreshold.getThresholdValue().toString());\r
-\r
-        // set additional parameters for threshold crossing alert fields\r
-        thresholdCrossingAlertFields.setAdditionalParameters(ImmutableList.of(performanceCounter));\r
-\r
-        // add threshold crossing fields to existing event listener\r
-        eventListener.getEvent().setThresholdCrossingAlertFields(thresholdCrossingAlertFields);\r
-\r
-        return eventListener;\r
-    }\r
-\r
-    /**\r
-     * Converts {@link EventSeverity} to {@link Criticality}\r
-     *\r
-     * @param eventSeverity event severity\r
-     *\r
-     * @return performance counter criticality\r
-     */\r
-    private static Criticality convertSeverityToCriticality(final EventSeverity eventSeverity) {\r
-        switch (eventSeverity) {\r
-            case CRITICAL:\r
-                return Criticality.CRIT;\r
-            case MAJOR:\r
-                return Criticality.MAJ;\r
-            default:\r
-                return Criticality.UNKNOWN;\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Creates {@link TCAVESResponse} object\r
-     *\r
-     * @param processorContext processor Context with violations\r
-     * @param tcaAppName TCA App Name\r
-     *\r
-     * @return TCA VES Response Message\r
-     */\r
-    public static TCAVESResponse createNewTCAVESResponse(final TCACEFProcessorContext processorContext,\r
-                                                         final String tcaAppName) {\r
-\r
-        final MetricsPerEventName metricsPerEventName = processorContext.getMetricsPerEventName();\r
-        // confirm violations are indeed present\r
-        if (metricsPerEventName == null) {\r
-            final String errorMessage = "No violations metrics. Unable to create VES Response";\r
-            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));\r
-        }\r
-\r
-        final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);\r
-        final EventListener eventListener = processorContext.getCEFEventListener();\r
-        final CommonEventHeader commonEventHeader = eventListener.getEvent().getCommonEventHeader();\r
-\r
-        final TCAVESResponse tcavesResponse = new TCAVESResponse();\r
-        // ClosedLoopControlName included in the DCAE configuration Policy\r
-        tcavesResponse.setClosedLoopControlName(violatedThreshold.getClosedLoopControlName());\r
-        // version included in the DCAE configuration Policy\r
-        tcavesResponse.setVersion(violatedThreshold.getVersion());\r
-        // Generate a UUID for this output message\r
-        tcavesResponse.setRequestID(UUID.randomUUID().toString());\r
-        // commonEventHeader.startEpochMicrosec from the received VES message\r
-        tcavesResponse.setClosedLoopAlarmStart(commonEventHeader.getStartEpochMicrosec());\r
-        // commonEventHeader.lastEpochMicrosec from the received VES message for abated alerts\r
-        if (violatedThreshold.getClosedLoopEventStatus() == ClosedLoopEventStatus.ABATED) {\r
-            tcavesResponse.setClosedLoopAlarmEnd(commonEventHeader.getLastEpochMicrosec());\r
-        }\r
-        // Concatenate name of this DCAE instance and name for this TCA instance, separated by dot\r
-        tcavesResponse.setClosedLoopEventClient("DCAE_INSTANCE_ID." + tcaAppName);\r
-\r
-        final AAI aai = new AAI();\r
-        tcavesResponse.setAai(aai);\r
-\r
-        // VM specific settings\r
-        if (metricsPerEventName.getControlLoopSchemaType() == ControlLoopSchemaType.VM) {\r
-            // Hard Coded - "VM"\r
-            tcavesResponse.setTargetType(AnalyticsConstants.TCA_VES_RESPONSE_VM_TARGET_TYPE);\r
-            // Hard Coded - "vserver.vserver-name"\r
-            tcavesResponse.setTarget(AnalyticsConstants.TCA_VES_RESPONSE_VM_TARGET);\r
-            // commonEventHeader.sourceName from the received VES message\r
-            aai.setGenericServerName(commonEventHeader.getSourceName());\r
-        } else {\r
-            // VNF specific settings\r
-            // Hard Coded - "VNF"\r
-            tcavesResponse.setTargetType(AnalyticsConstants.TCA_VES_RESPONSE_VNF_TARGET_TYPE);\r
-            // Hard Coded - "generic-vnf.vnf-name"\r
-            tcavesResponse.setTarget(AnalyticsConstants.TCA_VES_RESPONSE_VNF_TARGET);\r
-            // commonEventHeader.sourceName from the received VES message\r
-            aai.setGenericVNFName(commonEventHeader.getSourceName());\r
-        }\r
-\r
-        // Hard Coded - "DCAE"\r
-        tcavesResponse.setFrom(AnalyticsConstants.TCA_VES_RESPONSE_FROM);\r
-        // policyScope included in the DCAE configuration Policy\r
-        tcavesResponse.setPolicyScope(metricsPerEventName.getPolicyScope());\r
-        // policyName included in the DCAE configuration Policy\r
-        tcavesResponse.setPolicyName(metricsPerEventName.getPolicyName());\r
-        // policyVersion included in the DCAE configuration Policy\r
-        tcavesResponse.setPolicyVersion(metricsPerEventName.getPolicyVersion());\r
-        // Extracted from violated threshold\r
-        tcavesResponse.setClosedLoopEventStatus(violatedThreshold.getClosedLoopEventStatus().name());\r
-\r
-        return tcavesResponse;\r
-    }\r
-\r
-\r
-    /**\r
-     * Determines {@link ControlLoopSchemaType} for given {@link TCAVESResponse} alert\r
-     *\r
-     * @param tcavesResponse alert\r
-     *\r
-     * @return control Loop Schema Type\r
-     */\r
-    public static ControlLoopSchemaType determineControlLoopSchemaType(final TCAVESResponse tcavesResponse) {\r
-        final AAI aai = tcavesResponse.getAai();\r
-        if (aai.getGenericServerName() != null) {\r
-            return ControlLoopSchemaType.VM;\r
-        } else {\r
-            return ControlLoopSchemaType.VNF;\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Determines {@link ControlLoopSchemaType} for given {@link TCAVESResponse} alert\r
-     *\r
-     * @param tcavesResponse {@link TCAVESResponse} TCA alert\r
-     *\r
-     * @return Source name\r
-     */\r
-    public static String determineSourceName(final TCAVESResponse tcavesResponse) {\r
-        final AAI aai = tcavesResponse.getAai();\r
-        if (aai.getGenericServerName() != null) {\r
-            return aai.getGenericServerName();\r
-        } else {\r
-            return aai.getGenericVNFName();\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Extract Domain and Event Name from processor context if present\r
-     *\r
-     * @param processorContext processor context\r
-     * @return Tuple of domain and event Name\r
-     */\r
-    public static Pair<String, String> getDomainAndEventName(\r
-            @Nullable final TCACEFProcessorContext processorContext) {\r
-\r
-        String domain = null;\r
-        String eventName = null;\r
-\r
-        if (processorContext != null &&\r
-                processorContext.getCEFEventListener() != null &&\r
-                processorContext.getCEFEventListener().getEvent() != null &&\r
-                processorContext.getCEFEventListener().getEvent().getCommonEventHeader() != null) {\r
-            final CommonEventHeader commonEventHeader = processorContext.getCEFEventListener().getEvent()\r
-                    .getCommonEventHeader();\r
-\r
-            if (commonEventHeader.getDomain() != null) {\r
-                domain = commonEventHeader.getDomain().name();\r
-            }\r
-\r
-            if (commonEventHeader.getEventName() != null) {\r
-                eventName = commonEventHeader.getEventName();\r
-            }\r
-\r
-        }\r
-\r
-        return new ImmutablePair<>(domain, eventName);\r
-\r
-    }\r
-\r
-    /**\r
-     * Creates {@link TCAPolicy} Metrics per Event Name list\r
-     *\r
-     * @param eventNamesMap Map containing event Name as key and corresponding values\r
-     *\r
-     * @return List of {@link MetricsPerEventName}\r
-     */\r
-    public static List<MetricsPerEventName> createTCAPolicyMetricsPerEventNameList(\r
-            final Map<String, Map<String, String>> eventNamesMap) {\r
-\r
-        // create a new metrics per event Name list\r
-        final List<MetricsPerEventName> metricsPerEventNames = new LinkedList<>();\r
-\r
-        for (Map.Entry<String, Map<String, String>> eventNamesEntry : eventNamesMap.entrySet()) {\r
-\r
-            // create new metrics per event Name instance\r
-            final MetricsPerEventName newMetricsPerEventName =\r
-                    createNewMetricsPerEventName(eventNamesEntry);\r
-            metricsPerEventNames.add(newMetricsPerEventName);\r
-\r
-            // determine all threshold related values\r
-            final Map<String, String> thresholdsValuesMaps =\r
-                    filterMapByKeyNamePrefix(eventNamesEntry.getValue(),\r
-                            AnalyticsConstants.TCA_POLICY_THRESHOLDS_PATH_POSTFIX);\r
-\r
-            // create a map of all threshold values\r
-            final Map<String, Map<String, String>> thresholdsMap =\r
-                    extractSubTree(thresholdsValuesMaps, 1, 2,\r
-                            AnalyticsConstants.TCA_POLICY_DELIMITER);\r
-\r
-            // add thresholds to nmetrics per event Names threshold list\r
-            for (Map<String, String> thresholdMap : thresholdsMap.values()) {\r
-                newMetricsPerEventName.getThresholds().add(createNewThreshold(thresholdMap));\r
-            }\r
-\r
-        }\r
-\r
-        return metricsPerEventNames;\r
-    }\r
-\r
-    /**\r
-     * Creates new instance of TCA Policy {@link Threshold} with values extracted from thresholdMap\r
-     *\r
-     * @param thresholdMap threshold map with threshold values\r
-     *\r
-     * @return new instance of TCA Policy Threshold\r
-     */\r
-    public static Threshold createNewThreshold(final Map<String, String> thresholdMap) {\r
-        final Threshold threshold = new Threshold();\r
-        threshold.setClosedLoopControlName(thresholdMap.get("policy.closedLoopControlName"));\r
-        threshold.setVersion(thresholdMap.get("policy.version"));\r
-        threshold.setFieldPath(thresholdMap.get("policy.fieldPath"));\r
-        threshold.setDirection(Direction.valueOf(thresholdMap.get("policy.direction")));\r
-        threshold.setSeverity(EventSeverity.valueOf(thresholdMap.get("policy.severity")));\r
-        threshold.setThresholdValue(Long.valueOf(thresholdMap.get("policy.thresholdValue")));\r
-        threshold.setClosedLoopEventStatus(\r
-                ClosedLoopEventStatus.valueOf(thresholdMap.get("policy.closedLoopEventStatus")));\r
-        return threshold;\r
-    }\r
-\r
-    /**\r
-     * Create new {@link MetricsPerEventName} instance with policy Name, policy Version and policy Scope\r
-     * extracted from given eventNamesEntry\r
-     *\r
-     * @param eventNamesEntry Event Names Entry\r
-     *\r
-     * @return new instance of MetricsPerEventName\r
-     */\r
-    public static MetricsPerEventName createNewMetricsPerEventName(\r
-            final Map.Entry<String, Map<String, String>> eventNamesEntry) {\r
-        // determine event Name\r
-        final String eventName = eventNamesEntry.getKey();\r
-        // determine event Name thresholds\r
-        final Map<String, String> metricsPerEventNameThresholdsMap = eventNamesEntry.getValue();\r
-        final MetricsPerEventName metricsPerEventName = new MetricsPerEventName();\r
-        final List<Threshold> thresholds = new LinkedList<>();\r
-        metricsPerEventName.setThresholds(thresholds);\r
-        metricsPerEventName.setEventName(eventName);\r
-        // bind policyName, policyVersion, policyScope and closedLoopControlName\r
-        metricsPerEventName.setPolicyName(metricsPerEventNameThresholdsMap.get("policyName"));\r
-        metricsPerEventName.setPolicyVersion(metricsPerEventNameThresholdsMap.get("policyVersion"));\r
-        metricsPerEventName.setPolicyScope(metricsPerEventNameThresholdsMap.get("policyScope"));\r
-        metricsPerEventName.setControlLoopSchemaType(ControlLoopSchemaType.valueOf(\r
-                metricsPerEventNameThresholdsMap.get("controlLoopSchemaType")));\r
-        return metricsPerEventName;\r
-    }\r
-\r
-    /**\r
-     * Converts a flattened key/value map which has keys delimited by a given delimiter.\r
-     * The start Index and end index extract the sub-key value and returns a new map containing\r
-     * sub-keys and values.\r
-     *\r
-     * @param actualMap actual Map\r
-     * @param startIndex start index\r
-     * @param endIndex end index\r
-     * @param delimiter delimiter\r
-     *\r
-     * @return Map with new sub tree map\r
-     */\r
-    public static Map<String, Map<String, String>> extractSubTree(\r
-            final Map<String, String> actualMap, int startIndex, int endIndex, String delimiter) {\r
-\r
-        final SortedMap<String, Map<String, String>> subTreeMap = new TreeMap<>();\r
-\r
-        // iterate over actual map entries\r
-        for (Map.Entry<String, String> actualMapEntry : actualMap.entrySet()) {\r
-            final String actualMapKey = actualMapEntry.getKey();\r
-            final String actualMapValue = actualMapEntry.getValue();\r
-\r
-            // determine delimiter start and end index\r
-            final int keyStartIndex = StringUtils.ordinalIndexOf(actualMapKey, delimiter, startIndex);\r
-            final int keyEndIndex = StringUtils.ordinalIndexOf(actualMapKey, delimiter, endIndex);\r
-            final int keyLength = actualMapKey.length();\r
-\r
-            // extract sub-tree map\r
-            if (keyStartIndex != -1 && keyEndIndex != -1 && keyEndIndex > keyStartIndex && keyLength > keyEndIndex) {\r
-                final String thresholdKey = actualMapKey.substring(keyStartIndex + 1, keyEndIndex);\r
-                final Map<String, String> existingThresholdMap = subTreeMap.get(thresholdKey);\r
-                final String subMapKey = actualMapKey.substring(keyEndIndex + 1, keyLength);\r
-                if (existingThresholdMap == null) {\r
-                    Map<String, String> newThresholdMap = new LinkedHashMap<>();\r
-                    newThresholdMap.put(subMapKey, actualMapValue);\r
-                    subTreeMap.put(thresholdKey, newThresholdMap);\r
-                } else {\r
-                    existingThresholdMap.put(subMapKey, actualMapValue);\r
-                }\r
-\r
-            }\r
-        }\r
-\r
-        return subTreeMap;\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides a view of underlying map that filters out entries with keys starting with give prefix\r
-     *\r
-     * @param actualMap Target map that needs to be filtered\r
-     * @param keyNamePrefix key prefix\r
-     *\r
-     * @return a view of actual map which only show entries which have give prefix\r
-     */\r
-    public static Map<String, String> filterMapByKeyNamePrefix(final Map<String, String> actualMap,\r
-                                                               final String keyNamePrefix) {\r
-        return Maps.filterKeys(actualMap,\r
-                new Predicate<String>() {\r
-                    @Override\r
-                    public boolean apply(@Nullable String key) {\r
-                        return key != null && key.startsWith(keyNamePrefix);\r
-                    }\r
-                });\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates Quartz Scheduler\r
-     *\r
-     * @param pollingIntervalMS polling interval\r
-     * @param stdSchedulerFactory Quartz standard schedule factory instance\r
-     * @param quartzPublisherPropertiesFileName quartz properties file name\r
-     * @param jobDataMap job Data map\r
-     * @param quartzJobClass Quartz Job Class\r
-     * @param quartzJobName Quartz Job Name\r
-     * @param quartzTriggerName Quartz Trigger name\r
-     *\r
-     * @param <T> An implementation of Quartz {@link Job} interface\r
-     * @return Configured Quartz Scheduler\r
-     *\r
-     * @throws SchedulerException exception if unable to create to Quartz Scheduler\r
-     */\r
-    public static <T extends Job> Scheduler createQuartzScheduler(final Integer pollingIntervalMS,\r
-            final StdSchedulerFactory stdSchedulerFactory, final String quartzPublisherPropertiesFileName,\r
-            final JobDataMap jobDataMap, final Class<T> quartzJobClass, final String quartzJobName,\r
-            final String quartzTriggerName) throws SchedulerException {\r
-\r
-        // Initialize a new Quartz Standard scheduler\r
-        LOG.debug("Configuring quartz scheduler for Quartz Job: {} with properties file: {}",\r
-                quartzJobClass.getSimpleName(), quartzPublisherPropertiesFileName);\r
-        final Properties quartzProperties = AnalyticsModelIOUtils.loadPropertiesFile(\r
-                quartzPublisherPropertiesFileName, new Properties());\r
-        stdSchedulerFactory.initialize(quartzProperties);\r
-        final Scheduler scheduler = stdSchedulerFactory.getScheduler();\r
-\r
-        // Create a new job detail\r
-        final JobDetail jobDetail = JobBuilder.newJob(quartzJobClass).withIdentity(quartzJobName,\r
-                AnalyticsConstants.TCA_QUARTZ_GROUP_NAME).usingJobData(jobDataMap).build();\r
-\r
-        // Create a new scheduling builder\r
-        final SimpleScheduleBuilder simpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule()\r
-                .withIntervalInMilliseconds(pollingIntervalMS) // job will use custom polling schedule\r
-                .repeatForever(); // repeats while worker is running\r
-\r
-        // Create a trigger for the TCA Publisher Job\r
-        final SimpleTrigger simpleTrigger = TriggerBuilder.newTrigger()\r
-                .withIdentity(quartzTriggerName, AnalyticsConstants.TCA_QUARTZ_GROUP_NAME)\r
-                .startNow() // job starts right away\r
-                .withSchedule(simpleScheduleBuilder).build();\r
-\r
-        scheduler.scheduleJob(jobDetail, simpleTrigger);\r
-        LOG.info("Scheduler Initialized successfully for JobName: {}", quartzJobClass.getSimpleName());\r
-        return scheduler;\r
-    }\r
-\r
-\r
-    /**\r
-     * Does A&AI Enrichment for VM\r
-     *\r
-     * @param tcavesResponse Outgoing alert object\r
-     * @param aaiEnrichmentClient A&AI Enrichment client\r
-     * @param aaiVMEnrichmentAPIPath A&AI VM Enrichment API Path\r
-     * @param alertString alert String\r
-     * @param vmSourceName vm source name\r
-     */\r
-    public static void doAAIVMEnrichment(final TCAVESResponse tcavesResponse,\r
-                                         final AAIEnrichmentClient aaiEnrichmentClient,\r
-                                         final String aaiVMEnrichmentAPIPath,\r
-                                         final String alertString,\r
-                                         final String vmSourceName) {\r
-\r
-        final String filterString = "vserver-name:EQUALS:" + vmSourceName;\r
-        final ImmutableMap<String, String> queryParams = ImmutableMap.of(\r
-                "search-node-type", "vserver", "filter", filterString);\r
-\r
-        // fetch vm object resource Link from A&AI\r
-        final String vmAAIResourceLinkDetails = aaiEnrichmentClient.getEnrichmentDetails(\r
-                aaiVMEnrichmentAPIPath, queryParams, createAAIEnrichmentHeaders());\r
-        final String vmObjectResourceLink = getVMObjectResourceLink(vmAAIResourceLinkDetails);\r
-\r
-        if (vmObjectResourceLink == null) {\r
-            LOG.warn("No A&AI Enrichment possible for alert message: {}.VM Object resource Link cannot be " +\r
-                    "determined for vmSourceName: {}.", alertString, vmSourceName);\r
-        } else {\r
-\r
-            LOG.debug("Fetching VM A&AI Enrichment Details for VM Source Name: {}, Object resource Link: {}",\r
-                    vmSourceName, vmObjectResourceLink);\r
-\r
-            // fetch vm A&AI Enrichment\r
-            final String vmEnrichmentDetails = aaiEnrichmentClient.getEnrichmentDetails(\r
-                    vmObjectResourceLink, Collections.<String, String>emptyMap(), createAAIEnrichmentHeaders());\r
-\r
-            // enrich AAI\r
-            enrichAAI(tcavesResponse.getAai(), vmEnrichmentDetails, alertString,\r
-                    AnalyticsConstants.AAI_VSERVER_KEY_PREFIX);\r
-        }\r
-\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Does A&AI Enrichment for VNF\r
-     *\r
-     * @param tcavesResponse Outgoing alert object\r
-     * @param aaiEnrichmentClient A&AI Enrichment client\r
-     * @param aaiVNFEnrichmentAPIPath A&AI VNF Enrichment API Path\r
-     * @param alertString alert String\r
-     * @param vnfSourceName vnf source name\r
-     */\r
-    public static void doAAIVNFEnrichment(final TCAVESResponse tcavesResponse,\r
-                                          final AAIEnrichmentClient aaiEnrichmentClient,\r
-                                          final String aaiVNFEnrichmentAPIPath,\r
-                                          final String alertString,\r
-                                          final String vnfSourceName) {\r
-        final ImmutableMap<String, String> queryParams = ImmutableMap.of("vnf-name", vnfSourceName);\r
-\r
-        // fetch vnf A&AI Enrichment\r
-        final String vnfEnrichmentDetails = aaiEnrichmentClient.getEnrichmentDetails(\r
-                aaiVNFEnrichmentAPIPath, queryParams, createAAIEnrichmentHeaders());\r
-\r
-        // enrich alert AAI\r
-        enrichAAI(tcavesResponse.getAai(), vnfEnrichmentDetails, alertString, AnalyticsConstants.AAI_VNF_KEY_PREFIX);\r
-    }\r
-\r
-    /**\r
-     * Fetches VM Object Resource Link from A&AI Resource Link Json\r
-     *\r
-     * @param vmAAIResourceLinkDetails VM Object Resource Link from A&AI Resource Link Json\r
-     *\r
-     * @return object resource link String\r
-     */\r
-    private static String getVMObjectResourceLink(final String vmAAIResourceLinkDetails) {\r
-        if (StringUtils.isNotBlank(vmAAIResourceLinkDetails)) {\r
-            try {\r
-                final JsonNode jsonNode = ANALYTICS_MODEL_OBJECT_MAPPER.readTree(vmAAIResourceLinkDetails);\r
-                final JsonNode resourceLinkJsonNode = jsonNode.findPath("resource-link");\r
-                if (!resourceLinkJsonNode.isMissingNode()) {\r
-                    return resourceLinkJsonNode.asText();\r
-                }\r
-            } catch (IOException e) {\r
-                LOG.warn("Unable to determine VM Object link inside AAI Resource Link Response JSON: {}. Exception: {}",\r
-                        vmAAIResourceLinkDetails, e);\r
-            }\r
-        }\r
-        return null;\r
-    }\r
-\r
-    /**\r
-     * Creates Http Headers for A&AI Enrichment client\r
-     *\r
-     * @return Http Headers Map for A&AI Enrichment client\r
-     */\r
-    private static Map<String, String> createAAIEnrichmentHeaders() {\r
-        final Map<String, String> aaiEnrichmentHeaders = new LinkedHashMap<>();\r
-        final String transactionId = Long.toString(new Date().getTime());\r
-        aaiEnrichmentHeaders.put("X-FromAppId", "dcae-analytics-tca");\r
-        aaiEnrichmentHeaders.put("X-TransactionId", transactionId);\r
-        aaiEnrichmentHeaders.put("Accept", "application/json");\r
-        aaiEnrichmentHeaders.put("Real-Time", "true");\r
-        aaiEnrichmentHeaders.put("Content-Type", "application/json");\r
-        return aaiEnrichmentHeaders;\r
-    }\r
-\r
-\r
-    /**\r
-     * Populates A&AI details retrieved from A&AI Enrichment API into Alerts A&AI Object\r
-     *\r
-     * @param preEnrichmentAAI A&AI Alert object which needs to be populated with A&AI Enrichment Details\r
-     * @param aaiEnrichmentDetails A&AI Enrichment API fetched JSON String\r
-     * @param alertString Alert String\r
-     * @param keyPrefix Key prefix that needs to be added to each fetched A&AI Enrichment record\r
-     */\r
-    private static void enrichAAI(final AAI preEnrichmentAAI, final String aaiEnrichmentDetails,\r
-                                  final String alertString, final String keyPrefix) {\r
-\r
-        if (aaiEnrichmentDetails == null) {\r
-            LOG.warn("No A&AI Enrichment possible for AAI: {}. A&AI Enrichment details are absent." +\r
-                    "Skipping Enrichment for alert message:{}", preEnrichmentAAI, alertString);\r
-\r
-        } else {\r
-\r
-            final AAI enrichmentDetailsAAI = getEnrichmentDetailsAAI(aaiEnrichmentDetails);\r
-\r
-            if (enrichmentDetailsAAI != null) {\r
-                final Set<Map.Entry<String, Object>> enrichedAAIEntrySet =\r
-                        enrichmentDetailsAAI.getDynamicProperties().entrySet();\r
-                final Map<String, Object> preEnrichmentAAIDynamicProperties = preEnrichmentAAI.getDynamicProperties();\r
-\r
-                // populate A&AI Enrichment details and add prefix to key\r
-                for (Map.Entry<String, Object> enrichedAAIEntry : enrichedAAIEntrySet) {\r
-                    preEnrichmentAAIDynamicProperties.put(keyPrefix + enrichedAAIEntry.getKey(),\r
-                            enrichedAAIEntry.getValue());\r
-                }\r
-\r
-                LOG.debug("A&AI Enrichment was completed successfully for alert message: {}. Enriched AAI: {}",\r
-                        alertString, preEnrichmentAAI);\r
-            } else {\r
-                LOG.warn("No A&AI Enrichment possible for AAI: {}. Invalid A&AI Response: {}." +\r
-                                "Skipping Enrichment for alert message: {}",\r
-                        preEnrichmentAAI, aaiEnrichmentDetails, alertString);\r
-            }\r
-        }\r
-\r
-    }\r
-\r
-    /**\r
-     * Creates a new A&AI object with only top level A&AI Enrichment details\r
-     *\r
-     * @param aaiEnrichmentDetails A&AI Enrichment details\r
-     *\r
-     * @return new A&AI with only top level A&AI Enrichment details\r
-     */\r
-    private static AAI getEnrichmentDetailsAAI(final String aaiEnrichmentDetails) {\r
-        try {\r
-            final JsonNode rootNode = ANALYTICS_MODEL_OBJECT_MAPPER.readTree(aaiEnrichmentDetails);\r
-            final Iterator<Map.Entry<String, JsonNode>> fieldsIterator = rootNode.fields();\r
-            while (fieldsIterator.hasNext()) {\r
-                final Map.Entry<String, JsonNode> fieldEntry = fieldsIterator.next();\r
-                final JsonNode jsonNode = fieldEntry.getValue();\r
-                // remove all arrays, objects from A&AI Enrichment Json\r
-                if (jsonNode.isPojo() || jsonNode.isObject() || jsonNode.isArray()) {\r
-                    fieldsIterator.remove();\r
-                }\r
-            }\r
-            return ANALYTICS_MODEL_OBJECT_MAPPER.treeToValue(rootNode, AAI.class);\r
-        } catch (IOException e) {\r
-            LOG.error("Failed to Parse AAI Enrichment Details from JSON: {}, Exception: {}.", aaiEnrichmentDetails, e);\r
-        }\r
-        return null;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.utils;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.base.Supplier;
+import com.google.common.base.Suppliers;
+import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Table;
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.TypeRef;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClient;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.DCAEAnalyticsRuntimeException;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.common.service.processor.AbstractMessageProcessor;
+import org.onap.dcae.apod.analytics.common.service.processor.GenericMessageChainProcessor;
+import org.onap.dcae.apod.analytics.model.domain.cef.AlertAction;
+import org.onap.dcae.apod.analytics.model.domain.cef.AlertType;
+import org.onap.dcae.apod.analytics.model.domain.cef.CommonEventHeader;
+import org.onap.dcae.apod.analytics.model.domain.cef.Criticality;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity;
+import org.onap.dcae.apod.analytics.model.domain.cef.PerformanceCounter;
+import org.onap.dcae.apod.analytics.model.domain.cef.ThresholdCrossingAlertFields;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.facade.tca.AAI;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+import org.onap.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;
+import org.onap.dcae.apod.analytics.model.util.AnalyticsModelJsonUtils;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyDomainFilter;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyEventNameFilter;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFPolicyThresholdsProcessor;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;
+import org.quartz.Job;
+import org.quartz.JobBuilder;
+import org.quartz.JobDataMap;
+import org.quartz.JobDetail;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.SimpleScheduleBuilder;
+import org.quartz.SimpleTrigger;
+import org.quartz.TriggerBuilder;
+import org.quartz.impl.StdSchedulerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import static com.google.common.collect.Lists.newArrayList;
+import static org.apache.commons.lang3.time.DateFormatUtils.SMTP_DATETIME_FORMAT;
+
+/**
+ * Utility Helper methods for TCA sub module only. Extends {@link AnalyticsModelJsonUtils} to get
+ * pre configured Json Object Mapper understand serialization and deserialization of CEF Message
+ * and TCA Policy
+ *
+ * @author Rajiv Singla . Creation Date: 10/24/2016.
+ */
+public abstract class TCAUtils extends AnalyticsModelJsonUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TCAUtils.class);
+
+    /**
+     * Threshold Comparator which is used to order thresholds based on their severity e.g. ( CRITICAL, MAJOR, MINOR,
+     * WARNING )
+     */
+    private static final Comparator<Threshold> THRESHOLD_COMPARATOR = new Comparator<Threshold>() {
+        @Override
+        public int compare(Threshold threshold1, Threshold threshold2) {
+            return threshold1.getSeverity().compareTo(threshold2.getSeverity());
+        }
+    };
+
+    /**
+     * {@link Function} that extracts {@link TCAPolicy#getMetricsPerEventName()} from {@link TCAPolicy}
+     *
+     * @return TCA Policy Metrics Per Event Name list
+     */
+    public static Function<TCAPolicy, List<MetricsPerEventName>> tcaPolicyMetricsExtractorFunction() {
+        return new Function<TCAPolicy, List<MetricsPerEventName>>() {
+            @Nullable
+            @Override
+            public List<MetricsPerEventName> apply(@Nonnull TCAPolicy tcaPolicy) {
+                return tcaPolicy.getMetricsPerEventName();
+            }
+        };
+    }
+
+    /**
+     * {@link Function} that extracts {@link MetricsPerEventName#getEventName()} from
+     * {@link MetricsPerEventName}
+     *
+     * @return Event Names or a Metrics Per Event Name object
+     */
+    public static Function<MetricsPerEventName, String> tcaEventNameExtractorFunction() {
+        return new Function<MetricsPerEventName, String>() {
+            @Override
+            public String apply(@Nonnull MetricsPerEventName metricsPerEventName) {
+                return metricsPerEventName.getEventName();
+            }
+        };
+    }
+
+
+    /**
+     * Extracts {@link TCAPolicy} Event Names
+     *
+     * @param tcaPolicy TCA Policy
+     * @return List of event names in the TCA Policy
+     */
+    public static List<String> getPolicyEventNames(@Nonnull final TCAPolicy tcaPolicy) {
+        final List<MetricsPerEventName> metricsPerEventNames =
+                tcaPolicyMetricsExtractorFunction().apply(tcaPolicy);
+
+        return Lists.transform(metricsPerEventNames, tcaEventNameExtractorFunction());
+    }
+
+    /**
+     * A {@link Supplier} which caches {@link TCAPolicy} Event names as they are not expected to
+     * change during runtime
+     *
+     * @param tcaPolicy TCA Policy
+     * @return a Supplier that memoize the TCA Policy event names
+     */
+    public static Supplier<List<String>> getPolicyEventNamesSupplier(@Nonnull final TCAPolicy tcaPolicy) {
+        return Suppliers.memoize(new Supplier<List<String>>() {
+            @Override
+            public List<String> get() {
+                return getPolicyEventNames(tcaPolicy);
+            }
+        });
+    }
+
+
+    /**
+     * Creates a Table to lookup thresholds of a {@link TCAPolicy} by its Event Name and Threshold Field path
+     *
+     * @param tcaPolicy TCA Policy
+     * @return A table with Keys of event name and field path containing List of threshold as values
+     */
+    public static Table<String, String, List<Threshold>> getPolicyEventNameThresholdsTable(final TCAPolicy tcaPolicy) {
+        final Table<String, String, List<Threshold>> domainFRTable = HashBasedTable.create();
+        for (MetricsPerEventName metricsPerEventName : tcaPolicy.getMetricsPerEventName()) {
+            final String eventName = metricsPerEventName.getEventName();
+            final List<Threshold> thresholds = metricsPerEventName.getThresholds();
+            for (Threshold threshold : thresholds) {
+                final List<Threshold> existingThresholds = domainFRTable.get(eventName, threshold.getFieldPath());
+                if (existingThresholds == null) {
+                    final LinkedList<Threshold> newThresholdList = new LinkedList<>();
+                    newThresholdList.add(threshold);
+                    domainFRTable.put(eventName, threshold.getFieldPath(), newThresholdList);
+                } else {
+                    domainFRTable.get(eventName, threshold.getFieldPath()).add(threshold);
+                }
+            }
+        }
+        return domainFRTable;
+    }
+
+
+    /**
+     * A {@link Supplier} which caches Policy Event Name and Threshold Field Path Thresholds lookup table
+     *
+     * @param tcaPolicy TCA Policy
+     * @return Cached Supplier for table with Keys of event Name and field path containing thresholds as values
+     */
+    public static Supplier<Table<String, String, List<Threshold>>> getPolicyEventNameThresholdsTableSupplier
+    (final TCAPolicy tcaPolicy) {
+        return Suppliers.memoize(new Supplier<Table<String, String, List<Threshold>>>() {
+            @Override
+            public Table<String, String, List<Threshold>> get() {
+                return getPolicyEventNameThresholdsTable(tcaPolicy);
+            }
+        });
+    }
+
+
+    /**
+     * Creates a {@link GenericMessageChainProcessor} of {@link TCACEFJsonProcessor},
+     * {@link TCACEFPolicyDomainFilter} and {@link TCACEFPolicyEventNameFilter}s to
+     * filter out messages which does not match policy domain or event Name
+     *
+     * @param cefMessage CEF Message
+     * @param tcaPolicy TCA Policy
+     * @return Message Process Context after processing filter chain
+     */
+    public static TCACEFProcessorContext filterCEFMessage(@Nullable final String cefMessage,
+                                                          @Nonnull final TCAPolicy tcaPolicy) {
+
+        final TCACEFJsonProcessor jsonProcessor = new TCACEFJsonProcessor();
+        final TCACEFPolicyDomainFilter domainFilter = new TCACEFPolicyDomainFilter();
+        final TCACEFPolicyEventNameFilter eventNameFilter = new TCACEFPolicyEventNameFilter();
+        // Create a list of message processors
+        final ImmutableList<AbstractMessageProcessor<TCACEFProcessorContext>> messageProcessors =
+                ImmutableList.of(jsonProcessor, domainFilter, eventNameFilter);
+        final TCACEFProcessorContext processorContext = new TCACEFProcessorContext(cefMessage, tcaPolicy);
+        // Create a message processors chain
+        final GenericMessageChainProcessor<TCACEFProcessorContext> tcaProcessingChain =
+                new GenericMessageChainProcessor<>(messageProcessors, processorContext);
+        // process chain
+        return tcaProcessingChain.processChain();
+    }
+
+
+    /**
+     * Extracts json path values for given json Field Paths from using Json path notation. Assumes
+     * that values extracted are always long
+     *
+     * @param message CEF Message
+     * @param jsonFieldPaths Json Field Paths
+     * @return Map containing key as json path and values as values associated with that json path
+     */
+    public static Map<String, List<BigDecimal>> getJsonPathValue(@Nonnull String message, @Nonnull Set<String>
+            jsonFieldPaths) {
+
+        final Map<String, List<BigDecimal>> jsonFieldPathMap = new HashMap<>();
+        final DocumentContext documentContext = JsonPath.parse(message);
+
+        for (String jsonFieldPath : jsonFieldPaths) {
+            List<BigDecimal> jsonFieldValues = null;
+
+            try {
+                jsonFieldValues = documentContext.read(jsonFieldPath, new TypeRef<List<BigDecimal>>() {
+                });
+            } catch (Exception e) {
+                final String errorMessage = String.format(
+                        "Unable to convert jsonFieldPath: %s value to valid number. " +
+                                "Json Path value is not in a valid number format. Incoming message: %s",
+                        jsonFieldPath, message);
+                throw new DCAEAnalyticsRuntimeException(errorMessage, LOG, e);
+            }
+            // If Json Field Values are not or empty
+            if (jsonFieldValues != null && !jsonFieldValues.isEmpty()) {
+                // Filter out all null values in the filed values list
+                final List<BigDecimal> nonNullValues = Lists.newLinkedList(Iterables.filter(jsonFieldValues,
+                        Predicates.<BigDecimal>notNull()));
+                // If there are non null values put them in the map
+                if (!nonNullValues.isEmpty()) {
+                    jsonFieldPathMap.put(jsonFieldPath, nonNullValues);
+                }
+            }
+        }
+
+        return jsonFieldPathMap;
+    }
+
+    /**
+     * Computes if any CEF Message Fields have violated any Policy Thresholds. For the same policy field path
+     * it applies threshold in order of their severity and record the first threshold per message field path
+     *
+     * @param messageFieldValues Field Path Values extracted from CEF Message
+     * @param fieldThresholds Policy Thresholds for Field Path
+     * @return Optional of violated threshold for a field path
+     */
+    public static Optional<Threshold> thresholdCalculator(final List<BigDecimal> messageFieldValues, final
+    List<Threshold>
+            fieldThresholds) {
+        // order thresholds by severity
+        Collections.sort(fieldThresholds, THRESHOLD_COMPARATOR);
+        // Now apply each threshold to field values
+        for (Threshold fieldThreshold : fieldThresholds) {
+            for (BigDecimal messageFieldValue : messageFieldValues) {
+                final Boolean isThresholdViolated =
+                        fieldThreshold.getDirection().operate(messageFieldValue, new BigDecimal(fieldThreshold
+                                .getThresholdValue()));
+                if (isThresholdViolated) {
+                    final Threshold violatedThreshold = Threshold.copy(fieldThreshold);
+                    violatedThreshold.setActualFieldValue(messageFieldValue);
+                    return Optional.of(violatedThreshold);
+                }
+            }
+        }
+        return Optional.absent();
+    }
+
+    /**
+     * Prioritize Threshold to be reported in case there was multiple TCA violations in a single CEF message.
+     * Grabs first highest priority violated threshold
+     *
+     * @param violatedThresholdsMap Map containing field Path and associated violated Thresholds
+     * @return First Highest priority violated threshold
+     */
+    public static Threshold prioritizeThresholdViolations(final Map<String, Threshold> violatedThresholdsMap) {
+
+        final List<Threshold> violatedThresholds = newArrayList(violatedThresholdsMap.values());
+
+        if (violatedThresholds.size() == 1) {
+            return violatedThresholds.get(0);
+        }
+        Collections.sort(violatedThresholds, THRESHOLD_COMPARATOR);
+        // Just grab the first violated threshold with highest priority
+        return violatedThresholds.get(0);
+    }
+
+
+    /**
+     * Creates {@link MetricsPerEventName} object which contains violated thresholds
+     *
+     * @param tcaPolicy TCA Policy
+     * @param violatedThreshold Violated thresholds
+     * @param eventName Event Name
+     *
+     * @return MetricsPerEventName object containing one highest severity violated threshold
+     */
+    public static MetricsPerEventName createViolatedMetrics(@Nonnull final TCAPolicy tcaPolicy,
+                                                            @Nonnull final Threshold violatedThreshold,
+                                                            @Nonnull final String eventName) {
+
+        final ArrayList<MetricsPerEventName> metricsPerEventNames = newArrayList(
+                Iterables.filter(tcaPolicy.getMetricsPerEventName(), new Predicate<MetricsPerEventName>() {
+                    @Override
+                    public boolean apply(@Nonnull MetricsPerEventName metricsPerEventName) {
+                        return metricsPerEventName.getEventName().equals(eventName);
+                    }
+                }));
+        // TCA policy must have only one metrics per event Name
+        if (metricsPerEventNames.size() == 1) {
+            final MetricsPerEventName violatedMetrics =
+                    MetricsPerEventName.copy(metricsPerEventNames.get(0));
+            violatedMetrics.setThresholds(ImmutableList.of(Threshold.copy(violatedThreshold)));
+            return violatedMetrics;
+        } else {
+            final String errorMessage = String.format("TCA Policy must contain eventName: %s", eventName);
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalStateException(errorMessage));
+        }
+    }
+
+    /**
+     * Computes threshold violations
+     *
+     * @param processorContext Filtered processor Context
+     * @return processor context with any threshold violations
+     */
+    public static TCACEFProcessorContext computeThresholdViolations(final TCACEFProcessorContext processorContext) {
+        final TCACEFPolicyThresholdsProcessor policyThresholdsProcessor = new TCACEFPolicyThresholdsProcessor();
+        return policyThresholdsProcessor.apply(processorContext);
+    }
+
+
+    /**
+     * Creates TCA Alert String - Alert String is created in both {@link EventListener} or {@link TCAVESResponse}
+     * formats
+     *
+     * @param processorContextWithViolations processor context which has TCA violations
+     * @param tcaAppName tca app name
+     * @param isAlertInCEFFormat determines if output alert is in CEF format
+     *
+     * @return TCA Alert String
+     *
+     * @throws JsonProcessingException If alert cannot be parsed into JSON String
+     */
+    public static String createTCAAlertString(final TCACEFProcessorContext processorContextWithViolations,
+                                              final String tcaAppName,
+                                              final Boolean isAlertInCEFFormat) throws JsonProcessingException {
+        if (isAlertInCEFFormat != null && isAlertInCEFFormat) {
+            final EventListener eventListenerWithViolations =
+                    addThresholdViolationFields(processorContextWithViolations);
+            final String alertString = writeValueAsString(eventListenerWithViolations);
+            LOG.debug("Created alert in CEF Format: {}", alertString);
+            return alertString;
+        } else {
+            final TCAVESResponse newTCAVESResponse =
+                    createNewTCAVESResponse(processorContextWithViolations, tcaAppName);
+            final String alertString = writeValueAsString(newTCAVESResponse);
+            LOG.debug("Created alert in Non CEF Format: {}", alertString);
+            return alertString;
+        }
+    }
+
+    /**
+     * Adds threshold violation fields to {@link EventListener}
+     *
+     * @param processorContextWithViolations processor context that contains violations
+     * @return event listener with threshold crossing alert fields populated
+     */
+    public static EventListener addThresholdViolationFields(
+            final TCACEFProcessorContext processorContextWithViolations) {
+
+        final MetricsPerEventName metricsPerEventName =
+                processorContextWithViolations.getMetricsPerEventName();
+        // confirm violations are indeed present
+        if (metricsPerEventName == null) {
+            final String errorMessage = "No violations metrics. Unable to add Threshold Violation Fields";
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+
+        // get violated threshold
+        final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);
+        final EventListener eventListener = processorContextWithViolations.getCEFEventListener();
+        final CommonEventHeader commonEventHeader = eventListener.getEvent().getCommonEventHeader();
+
+        // create new threshold crossing alert fields
+        final ThresholdCrossingAlertFields thresholdCrossingAlertFields = new ThresholdCrossingAlertFields();
+        thresholdCrossingAlertFields.setEventStartTimestamp(commonEventHeader.getStartEpochMicrosec().toString());
+        thresholdCrossingAlertFields.setEventSeverity(violatedThreshold.getSeverity());
+        thresholdCrossingAlertFields.setCollectionTimestamp(SMTP_DATETIME_FORMAT.format(new Date()));
+        thresholdCrossingAlertFields.setAlertAction(AlertAction.SET);
+        thresholdCrossingAlertFields.setAlertType(AlertType.INTERFACE_ANOMALY);
+        thresholdCrossingAlertFields.setAlertDescription(violatedThreshold.getDirection().toString());
+        thresholdCrossingAlertFields.setInterfaceName(commonEventHeader.getReportingEntityName());
+        thresholdCrossingAlertFields.setElementType(commonEventHeader.getEventName());
+
+        // create new performance count
+        final PerformanceCounter performanceCounter = new PerformanceCounter();
+        performanceCounter.setCriticality(convertSeverityToCriticality(violatedThreshold.getSeverity()));
+        performanceCounter.setName(violatedThreshold.getFieldPath());
+        performanceCounter.setValue(violatedThreshold.getActualFieldValue().toString());
+        performanceCounter.setThresholdCrossed(violatedThreshold.getThresholdValue().toString());
+
+        // set additional parameters for threshold crossing alert fields
+        thresholdCrossingAlertFields.setAdditionalParameters(ImmutableList.of(performanceCounter));
+
+        // add threshold crossing fields to existing event listener
+        eventListener.getEvent().setThresholdCrossingAlertFields(thresholdCrossingAlertFields);
+
+        return eventListener;
+    }
+
+    /**
+     * Converts {@link EventSeverity} to {@link Criticality}
+     *
+     * @param eventSeverity event severity
+     *
+     * @return performance counter criticality
+     */
+    private static Criticality convertSeverityToCriticality(final EventSeverity eventSeverity) {
+        switch (eventSeverity) {
+            case CRITICAL:
+                return Criticality.CRIT;
+            case MAJOR:
+                return Criticality.MAJ;
+            default:
+                return Criticality.UNKNOWN;
+        }
+    }
+
+    /**
+     * Creates {@link TCAVESResponse} object
+     *
+     * @param processorContext processor Context with violations
+     * @param tcaAppName TCA App Name
+     *
+     * @return TCA VES Response Message
+     */
+    public static TCAVESResponse createNewTCAVESResponse(final TCACEFProcessorContext processorContext,
+                                                         final String tcaAppName) {
+
+        final MetricsPerEventName metricsPerEventName = processorContext.getMetricsPerEventName();
+        // confirm violations are indeed present
+        if (metricsPerEventName == null) {
+            final String errorMessage = "No violations metrics. Unable to create VES Response";
+            throw new MessageProcessingException(errorMessage, LOG, new IllegalArgumentException(errorMessage));
+        }
+
+        final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);
+        final EventListener eventListener = processorContext.getCEFEventListener();
+        final CommonEventHeader commonEventHeader = eventListener.getEvent().getCommonEventHeader();
+
+        final TCAVESResponse tcavesResponse = new TCAVESResponse();
+        // ClosedLoopControlName included in the DCAE configuration Policy
+        tcavesResponse.setClosedLoopControlName(violatedThreshold.getClosedLoopControlName());
+        // version included in the DCAE configuration Policy
+        tcavesResponse.setVersion(violatedThreshold.getVersion());
+        // Generate a UUID for this output message
+        tcavesResponse.setRequestID(UUID.randomUUID().toString());
+        // commonEventHeader.startEpochMicrosec from the received VES message
+        tcavesResponse.setClosedLoopAlarmStart(commonEventHeader.getStartEpochMicrosec());
+        // commonEventHeader.lastEpochMicrosec from the received VES message for abated alerts
+        if (violatedThreshold.getClosedLoopEventStatus() == ClosedLoopEventStatus.ABATED) {
+            tcavesResponse.setClosedLoopAlarmEnd(commonEventHeader.getLastEpochMicrosec());
+        }
+        // Concatenate name of this DCAE instance and name for this TCA instance, separated by dot
+        tcavesResponse.setClosedLoopEventClient("DCAE_INSTANCE_ID." + tcaAppName);
+
+        final AAI aai = new AAI();
+        tcavesResponse.setAai(aai);
+
+        // VM specific settings
+        if (metricsPerEventName.getControlLoopSchemaType() == ControlLoopSchemaType.VM) {
+            // Hard Coded - "VM"
+            tcavesResponse.setTargetType(AnalyticsConstants.TCA_VES_RESPONSE_VM_TARGET_TYPE);
+            // Hard Coded - "vserver.vserver-name"
+            tcavesResponse.setTarget(AnalyticsConstants.TCA_VES_RESPONSE_VM_TARGET);
+            // commonEventHeader.sourceName from the received VES message
+            aai.setGenericServerName(commonEventHeader.getSourceName());
+        } else {
+            // VNF specific settings
+            // Hard Coded - "VNF"
+            tcavesResponse.setTargetType(AnalyticsConstants.TCA_VES_RESPONSE_VNF_TARGET_TYPE);
+            // Hard Coded - "generic-vnf.vnf-name"
+            tcavesResponse.setTarget(AnalyticsConstants.TCA_VES_RESPONSE_VNF_TARGET);
+            // commonEventHeader.sourceName from the received VES message
+            aai.setGenericVNFName(commonEventHeader.getSourceName());
+        }
+
+        // Hard Coded - "DCAE"
+        tcavesResponse.setFrom(AnalyticsConstants.TCA_VES_RESPONSE_FROM);
+        // policyScope included in the DCAE configuration Policy
+        tcavesResponse.setPolicyScope(metricsPerEventName.getPolicyScope());
+        // policyName included in the DCAE configuration Policy
+        tcavesResponse.setPolicyName(metricsPerEventName.getPolicyName());
+        // policyVersion included in the DCAE configuration Policy
+        tcavesResponse.setPolicyVersion(metricsPerEventName.getPolicyVersion());
+        // Extracted from violated threshold
+        tcavesResponse.setClosedLoopEventStatus(violatedThreshold.getClosedLoopEventStatus().name());
+
+        return tcavesResponse;
+    }
+
+
+    /**
+     * Determines {@link ControlLoopSchemaType} for given {@link TCAVESResponse} alert
+     *
+     * @param tcavesResponse alert
+     *
+     * @return control Loop Schema Type
+     */
+    public static ControlLoopSchemaType determineControlLoopSchemaType(final TCAVESResponse tcavesResponse) {
+        final AAI aai = tcavesResponse.getAai();
+        if (aai.getGenericServerName() != null) {
+            return ControlLoopSchemaType.VM;
+        } else {
+            return ControlLoopSchemaType.VNF;
+        }
+    }
+
+    /**
+     * Determines {@link ControlLoopSchemaType} for given {@link TCAVESResponse} alert
+     *
+     * @param tcavesResponse {@link TCAVESResponse} TCA alert
+     *
+     * @return Source name
+     */
+    public static String determineSourceName(final TCAVESResponse tcavesResponse) {
+        final AAI aai = tcavesResponse.getAai();
+        if (aai.getGenericServerName() != null) {
+            return aai.getGenericServerName();
+        } else {
+            return aai.getGenericVNFName();
+        }
+    }
+
+
+    /**
+     * Extract Domain and Event Name from processor context if present
+     *
+     * @param processorContext processor context
+     * @return Tuple of domain and event Name
+     */
+    public static Pair<String, String> getDomainAndEventName(
+            @Nullable final TCACEFProcessorContext processorContext) {
+
+        String domain = null;
+        String eventName = null;
+
+        if (processorContext != null &&
+                processorContext.getCEFEventListener() != null &&
+                processorContext.getCEFEventListener().getEvent() != null &&
+                processorContext.getCEFEventListener().getEvent().getCommonEventHeader() != null) {
+            final CommonEventHeader commonEventHeader = processorContext.getCEFEventListener().getEvent()
+                    .getCommonEventHeader();
+
+            if (commonEventHeader.getDomain() != null) {
+                domain = commonEventHeader.getDomain().name();
+            }
+
+            if (commonEventHeader.getEventName() != null) {
+                eventName = commonEventHeader.getEventName();
+            }
+
+        }
+
+        return new ImmutablePair<>(domain, eventName);
+
+    }
+
+    /**
+     * Creates {@link TCAPolicy} Metrics per Event Name list
+     *
+     * @param eventNamesMap Map containing event Name as key and corresponding values
+     *
+     * @return List of {@link MetricsPerEventName}
+     */
+    public static List<MetricsPerEventName> createTCAPolicyMetricsPerEventNameList(
+            final Map<String, Map<String, String>> eventNamesMap) {
+
+        // create a new metrics per event Name list
+        final List<MetricsPerEventName> metricsPerEventNames = new LinkedList<>();
+
+        for (Map.Entry<String, Map<String, String>> eventNamesEntry : eventNamesMap.entrySet()) {
+
+            // create new metrics per event Name instance
+            final MetricsPerEventName newMetricsPerEventName =
+                    createNewMetricsPerEventName(eventNamesEntry);
+            metricsPerEventNames.add(newMetricsPerEventName);
+
+            // determine all threshold related values
+            final Map<String, String> thresholdsValuesMaps =
+                    filterMapByKeyNamePrefix(eventNamesEntry.getValue(),
+                            AnalyticsConstants.TCA_POLICY_THRESHOLDS_PATH_POSTFIX);
+
+            // create a map of all threshold values
+            final Map<String, Map<String, String>> thresholdsMap =
+                    extractSubTree(thresholdsValuesMaps, 1, 2,
+                            AnalyticsConstants.TCA_POLICY_DELIMITER);
+
+            // add thresholds to nmetrics per event Names threshold list
+            for (Map<String, String> thresholdMap : thresholdsMap.values()) {
+                newMetricsPerEventName.getThresholds().add(createNewThreshold(thresholdMap));
+            }
+
+        }
+
+        return metricsPerEventNames;
+    }
+
+    /**
+     * Creates new instance of TCA Policy {@link Threshold} with values extracted from thresholdMap
+     *
+     * @param thresholdMap threshold map with threshold values
+     *
+     * @return new instance of TCA Policy Threshold
+     */
+    public static Threshold createNewThreshold(final Map<String, String> thresholdMap) {
+        final Threshold threshold = new Threshold();
+        threshold.setClosedLoopControlName(thresholdMap.get("policy.closedLoopControlName"));
+        threshold.setVersion(thresholdMap.get("policy.version"));
+        threshold.setFieldPath(thresholdMap.get("policy.fieldPath"));
+        threshold.setDirection(Direction.valueOf(thresholdMap.get("policy.direction")));
+        threshold.setSeverity(EventSeverity.valueOf(thresholdMap.get("policy.severity")));
+        threshold.setThresholdValue(Long.valueOf(thresholdMap.get("policy.thresholdValue")));
+        threshold.setClosedLoopEventStatus(
+                ClosedLoopEventStatus.valueOf(thresholdMap.get("policy.closedLoopEventStatus")));
+        return threshold;
+    }
+
+    /**
+     * Create new {@link MetricsPerEventName} instance with policy Name, policy Version and policy Scope
+     * extracted from given eventNamesEntry
+     *
+     * @param eventNamesEntry Event Names Entry
+     *
+     * @return new instance of MetricsPerEventName
+     */
+    public static MetricsPerEventName createNewMetricsPerEventName(
+            final Map.Entry<String, Map<String, String>> eventNamesEntry) {
+        // determine event Name
+        final String eventName = eventNamesEntry.getKey();
+        // determine event Name thresholds
+        final Map<String, String> metricsPerEventNameThresholdsMap = eventNamesEntry.getValue();
+        final MetricsPerEventName metricsPerEventName = new MetricsPerEventName();
+        final List<Threshold> thresholds = new LinkedList<>();
+        metricsPerEventName.setThresholds(thresholds);
+        metricsPerEventName.setEventName(eventName);
+        // bind policyName, policyVersion, policyScope and closedLoopControlName
+        metricsPerEventName.setPolicyName(metricsPerEventNameThresholdsMap.get("policyName"));
+        metricsPerEventName.setPolicyVersion(metricsPerEventNameThresholdsMap.get("policyVersion"));
+        metricsPerEventName.setPolicyScope(metricsPerEventNameThresholdsMap.get("policyScope"));
+        metricsPerEventName.setControlLoopSchemaType(ControlLoopSchemaType.valueOf(
+                metricsPerEventNameThresholdsMap.get("controlLoopSchemaType")));
+        return metricsPerEventName;
+    }
+
+    /**
+     * Converts a flattened key/value map which has keys delimited by a given delimiter.
+     * The start Index and end index extract the sub-key value and returns a new map containing
+     * sub-keys and values.
+     *
+     * @param actualMap actual Map
+     * @param startIndex start index
+     * @param endIndex end index
+     * @param delimiter delimiter
+     *
+     * @return Map with new sub tree map
+     */
+    public static Map<String, Map<String, String>> extractSubTree(
+            final Map<String, String> actualMap, int startIndex, int endIndex, String delimiter) {
+
+        final SortedMap<String, Map<String, String>> subTreeMap = new TreeMap<>();
+
+        // iterate over actual map entries
+        for (Map.Entry<String, String> actualMapEntry : actualMap.entrySet()) {
+            final String actualMapKey = actualMapEntry.getKey();
+            final String actualMapValue = actualMapEntry.getValue();
+
+            // determine delimiter start and end index
+            final int keyStartIndex = StringUtils.ordinalIndexOf(actualMapKey, delimiter, startIndex);
+            final int keyEndIndex = StringUtils.ordinalIndexOf(actualMapKey, delimiter, endIndex);
+            final int keyLength = actualMapKey.length();
+
+            // extract sub-tree map
+            if (keyStartIndex != -1 && keyEndIndex != -1 && keyEndIndex > keyStartIndex && keyLength > keyEndIndex) {
+                final String thresholdKey = actualMapKey.substring(keyStartIndex + 1, keyEndIndex);
+                final Map<String, String> existingThresholdMap = subTreeMap.get(thresholdKey);
+                final String subMapKey = actualMapKey.substring(keyEndIndex + 1, keyLength);
+                if (existingThresholdMap == null) {
+                    Map<String, String> newThresholdMap = new LinkedHashMap<>();
+                    newThresholdMap.put(subMapKey, actualMapValue);
+                    subTreeMap.put(thresholdKey, newThresholdMap);
+                } else {
+                    existingThresholdMap.put(subMapKey, actualMapValue);
+                }
+
+            }
+        }
+
+        return subTreeMap;
+
+    }
+
+
+    /**
+     * Provides a view of underlying map that filters out entries with keys starting with give prefix
+     *
+     * @param actualMap Target map that needs to be filtered
+     * @param keyNamePrefix key prefix
+     *
+     * @return a view of actual map which only show entries which have give prefix
+     */
+    public static Map<String, String> filterMapByKeyNamePrefix(final Map<String, String> actualMap,
+                                                               final String keyNamePrefix) {
+        return Maps.filterKeys(actualMap,
+                new Predicate<String>() {
+                    @Override
+                    public boolean apply(@Nullable String key) {
+                        return key != null && key.startsWith(keyNamePrefix);
+                    }
+                });
+    }
+
+
+    /**
+     * Creates Quartz Scheduler
+     *
+     * @param pollingIntervalMS polling interval
+     * @param stdSchedulerFactory Quartz standard schedule factory instance
+     * @param quartzPublisherPropertiesFileName quartz properties file name
+     * @param jobDataMap job Data map
+     * @param quartzJobClass Quartz Job Class
+     * @param quartzJobName Quartz Job Name
+     * @param quartzTriggerName Quartz Trigger name
+     *
+     * @param <T> An implementation of Quartz {@link Job} interface
+     * @return Configured Quartz Scheduler
+     *
+     * @throws SchedulerException exception if unable to create to Quartz Scheduler
+     */
+    public static <T extends Job> Scheduler createQuartzScheduler(final Integer pollingIntervalMS,
+            final StdSchedulerFactory stdSchedulerFactory, final String quartzPublisherPropertiesFileName,
+            final JobDataMap jobDataMap, final Class<T> quartzJobClass, final String quartzJobName,
+            final String quartzTriggerName) throws SchedulerException {
+
+        // Initialize a new Quartz Standard scheduler
+        LOG.debug("Configuring quartz scheduler for Quartz Job: {} with properties file: {}",
+                quartzJobClass.getSimpleName(), quartzPublisherPropertiesFileName);
+        final Properties quartzProperties = AnalyticsModelIOUtils.loadPropertiesFile(
+                quartzPublisherPropertiesFileName, new Properties());
+        stdSchedulerFactory.initialize(quartzProperties);
+        final Scheduler scheduler = stdSchedulerFactory.getScheduler();
+
+        // Create a new job detail
+        final JobDetail jobDetail = JobBuilder.newJob(quartzJobClass).withIdentity(quartzJobName,
+                AnalyticsConstants.TCA_QUARTZ_GROUP_NAME).usingJobData(jobDataMap).build();
+
+        // Create a new scheduling builder
+        final SimpleScheduleBuilder simpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule()
+                .withIntervalInMilliseconds(pollingIntervalMS) // job will use custom polling schedule
+                .repeatForever(); // repeats while worker is running
+
+        // Create a trigger for the TCA Publisher Job
+        final SimpleTrigger simpleTrigger = TriggerBuilder.newTrigger()
+                .withIdentity(quartzTriggerName, AnalyticsConstants.TCA_QUARTZ_GROUP_NAME)
+                .startNow() // job starts right away
+                .withSchedule(simpleScheduleBuilder).build();
+
+        scheduler.scheduleJob(jobDetail, simpleTrigger);
+        LOG.info("Scheduler Initialized successfully for JobName: {}", quartzJobClass.getSimpleName());
+        return scheduler;
+    }
+
+
+    /**
+     * Does A&AI Enrichment for VM
+     *
+     * @param tcavesResponse Outgoing alert object
+     * @param aaiEnrichmentClient A&AI Enrichment client
+     * @param aaiVMEnrichmentAPIPath A&AI VM Enrichment API Path
+     * @param alertString alert String
+     * @param vmSourceName vm source name
+     */
+    public static void doAAIVMEnrichment(final TCAVESResponse tcavesResponse,
+                                         final AAIEnrichmentClient aaiEnrichmentClient,
+                                         final String aaiVMEnrichmentAPIPath,
+                                         final String alertString,
+                                         final String vmSourceName) {
+
+        final String filterString = "vserver-name:EQUALS:" + vmSourceName;
+        final ImmutableMap<String, String> queryParams = ImmutableMap.of(
+                "search-node-type", "vserver", "filter", filterString);
+
+        // fetch vm object resource Link from A&AI
+        final String vmAAIResourceLinkDetails = aaiEnrichmentClient.getEnrichmentDetails(
+                aaiVMEnrichmentAPIPath, queryParams, createAAIEnrichmentHeaders());
+        final String vmObjectResourceLink = getVMObjectResourceLink(vmAAIResourceLinkDetails);
+
+        if (vmObjectResourceLink == null) {
+            LOG.warn("No A&AI Enrichment possible for alert message: {}.VM Object resource Link cannot be " +
+                    "determined for vmSourceName: {}.", alertString, vmSourceName);
+        } else {
+
+            LOG.debug("Fetching VM A&AI Enrichment Details for VM Source Name: {}, Object resource Link: {}",
+                    vmSourceName, vmObjectResourceLink);
+
+            // fetch vm A&AI Enrichment
+            final String vmEnrichmentDetails = aaiEnrichmentClient.getEnrichmentDetails(
+                    vmObjectResourceLink, Collections.<String, String>emptyMap(), createAAIEnrichmentHeaders());
+
+            // enrich AAI
+            enrichAAI(tcavesResponse.getAai(), vmEnrichmentDetails, alertString,
+                    AnalyticsConstants.AAI_VSERVER_KEY_PREFIX);
+        }
+
+
+    }
+
+
+    /**
+     * Does A&AI Enrichment for VNF
+     *
+     * @param tcavesResponse Outgoing alert object
+     * @param aaiEnrichmentClient A&AI Enrichment client
+     * @param aaiVNFEnrichmentAPIPath A&AI VNF Enrichment API Path
+     * @param alertString alert String
+     * @param vnfSourceName vnf source name
+     */
+    public static void doAAIVNFEnrichment(final TCAVESResponse tcavesResponse,
+                                          final AAIEnrichmentClient aaiEnrichmentClient,
+                                          final String aaiVNFEnrichmentAPIPath,
+                                          final String alertString,
+                                          final String vnfSourceName) {
+        final ImmutableMap<String, String> queryParams = ImmutableMap.of("vnf-name", vnfSourceName);
+
+        // fetch vnf A&AI Enrichment
+        final String vnfEnrichmentDetails = aaiEnrichmentClient.getEnrichmentDetails(
+                aaiVNFEnrichmentAPIPath, queryParams, createAAIEnrichmentHeaders());
+
+        // enrich alert AAI
+        enrichAAI(tcavesResponse.getAai(), vnfEnrichmentDetails, alertString, AnalyticsConstants.AAI_VNF_KEY_PREFIX);
+    }
+
+    /**
+     * Fetches VM Object Resource Link from A&AI Resource Link Json
+     *
+     * @param vmAAIResourceLinkDetails VM Object Resource Link from A&AI Resource Link Json
+     *
+     * @return object resource link String
+     */
+    private static String getVMObjectResourceLink(final String vmAAIResourceLinkDetails) {
+        if (StringUtils.isNotBlank(vmAAIResourceLinkDetails)) {
+            try {
+                final JsonNode jsonNode = ANALYTICS_MODEL_OBJECT_MAPPER.readTree(vmAAIResourceLinkDetails);
+                final JsonNode resourceLinkJsonNode = jsonNode.findPath("resource-link");
+                if (!resourceLinkJsonNode.isMissingNode()) {
+                    return resourceLinkJsonNode.asText();
+                }
+            } catch (IOException e) {
+                LOG.warn("Unable to determine VM Object link inside AAI Resource Link Response JSON: {}. Exception: {}",
+                        vmAAIResourceLinkDetails, e);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Creates Http Headers for A&AI Enrichment client
+     *
+     * @return Http Headers Map for A&AI Enrichment client
+     */
+    private static Map<String, String> createAAIEnrichmentHeaders() {
+        final Map<String, String> aaiEnrichmentHeaders = new LinkedHashMap<>();
+        final String transactionId = Long.toString(new Date().getTime());
+        aaiEnrichmentHeaders.put("X-FromAppId", "dcae-analytics-tca");
+        aaiEnrichmentHeaders.put("X-TransactionId", transactionId);
+        aaiEnrichmentHeaders.put("Accept", "application/json");
+        aaiEnrichmentHeaders.put("Real-Time", "true");
+        aaiEnrichmentHeaders.put("Content-Type", "application/json");
+        return aaiEnrichmentHeaders;
+    }
+
+
+    /**
+     * Populates A&AI details retrieved from A&AI Enrichment API into Alerts A&AI Object
+     *
+     * @param preEnrichmentAAI A&AI Alert object which needs to be populated with A&AI Enrichment Details
+     * @param aaiEnrichmentDetails A&AI Enrichment API fetched JSON String
+     * @param alertString Alert String
+     * @param keyPrefix Key prefix that needs to be added to each fetched A&AI Enrichment record
+     */
+    private static void enrichAAI(final AAI preEnrichmentAAI, final String aaiEnrichmentDetails,
+                                  final String alertString, final String keyPrefix) {
+
+        if (aaiEnrichmentDetails == null) {
+            LOG.warn("No A&AI Enrichment possible for AAI: {}. A&AI Enrichment details are absent." +
+                    "Skipping Enrichment for alert message:{}", preEnrichmentAAI, alertString);
+
+        } else {
+
+            final AAI enrichmentDetailsAAI = getEnrichmentDetailsAAI(aaiEnrichmentDetails);
+
+            if (enrichmentDetailsAAI != null) {
+                final Set<Map.Entry<String, Object>> enrichedAAIEntrySet =
+                        enrichmentDetailsAAI.getDynamicProperties().entrySet();
+                final Map<String, Object> preEnrichmentAAIDynamicProperties = preEnrichmentAAI.getDynamicProperties();
+
+                // populate A&AI Enrichment details and add prefix to key
+                for (Map.Entry<String, Object> enrichedAAIEntry : enrichedAAIEntrySet) {
+                    preEnrichmentAAIDynamicProperties.put(keyPrefix + enrichedAAIEntry.getKey(),
+                            enrichedAAIEntry.getValue());
+                }
+
+                LOG.debug("A&AI Enrichment was completed successfully for alert message: {}. Enriched AAI: {}",
+                        alertString, preEnrichmentAAI);
+            } else {
+                LOG.warn("No A&AI Enrichment possible for AAI: {}. Invalid A&AI Response: {}." +
+                                "Skipping Enrichment for alert message: {}",
+                        preEnrichmentAAI, aaiEnrichmentDetails, alertString);
+            }
+        }
+
+    }
+
+    /**
+     * Creates a new A&AI object with only top level A&AI Enrichment details
+     *
+     * @param aaiEnrichmentDetails A&AI Enrichment details
+     *
+     * @return new A&AI with only top level A&AI Enrichment details
+     */
+    private static AAI getEnrichmentDetailsAAI(final String aaiEnrichmentDetails) {
+        try {
+            final JsonNode rootNode = ANALYTICS_MODEL_OBJECT_MAPPER.readTree(aaiEnrichmentDetails);
+            final Iterator<Map.Entry<String, JsonNode>> fieldsIterator = rootNode.fields();
+            while (fieldsIterator.hasNext()) {
+                final Map.Entry<String, JsonNode> fieldEntry = fieldsIterator.next();
+                final JsonNode jsonNode = fieldEntry.getValue();
+                // remove all arrays, objects from A&AI Enrichment Json
+                if (jsonNode.isPojo() || jsonNode.isObject() || jsonNode.isArray()) {
+                    fieldsIterator.remove();
+                }
+            }
+            return ANALYTICS_MODEL_OBJECT_MAPPER.treeToValue(rootNode, AAI.class);
+        } catch (IOException e) {
+            LOG.error("Failed to Parse AAI Enrichment Details from JSON: {}, Exception: {}.", aaiEnrichmentDetails, e);
+        }
+        return null;
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca;\r
-\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.google.common.base.Suppliers;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;\r
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;\r
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;\r
-\r
-import java.io.IOException;\r
-import java.util.Arrays;\r
-import java.util.LinkedHashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Properties;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 10/25/2016.\r
- */\r
-public abstract class BaseAnalyticsTCAUnitTest extends BaseDCAEAnalyticsUnitTest {\r
-\r
-    /**\r
-     * Object mapper to be used for all TCA Json Parsing\r
-     */\r
-    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =\r
-            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();\r
-\r
-    protected static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";\r
-    protected static final String CEF_MESSAGES_JSON_FILE_LOCATION = "data/json/cef/cef_messages.json";\r
-    protected static final String CEF_MESSAGE_JSON_FILE_LOCATION = "data/json/cef/cef_message.json";\r
-    protected static final String CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION =\r
-            "data/json/cef/cef_message_with_threshold_violation.json";\r
-\r
-    protected static final String TCA_CONTROLLER_POLICY_FILE_LOCATION =\r
-            "data/properties/tca_controller_policy.properties";\r
-\r
-    protected static final String TCA_AAI_VNF_ENRICHMENT_FILE_LOCATION = "data/json/aai/aai_vnf_enrichment.json";\r
-\r
-    protected static final String TCA_TEST_APP_CONFIG_NAME = "testTCAAppName";\r
-    protected static final String TCA_TEST_APP_CONFIG_DESCRIPTION = "testTCAAppDescription";\r
-    protected static final String TCA_TEST_APP_CONFIG_SUBSCRIBER_OUTPUT_STREAM_NAME =\r
-            "testTcaSubscriberOutputStreamName";\r
-    protected static final String TCA_TEST_APP_CONFIG_VES_ALERT_TABLE_NAME = "testTcaVESAlertsTableName";\r
-    protected static final String TCA_TEST_APP_CONFIG_VES_MESSAGE_STATUS_TABLE_NAME =\r
-            "testTcaVESMessageStatusTableName";\r
-\r
-\r
-    /**\r
-     * Provides TCA Policy that can be used for testing\r
-     *\r
-     * @return test TCA Policy Object\r
-     */\r
-    protected TCAPolicy getSampleTCAPolicy() {\r
-        try {\r
-            return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(fromStream(TCA_POLICY_JSON_FILE_LOCATION), TCAPolicy.class);\r
-        } catch (IOException e) {\r
-            LOG.error("Error while parsing policy: {}", e);\r
-            throw new RuntimeException("Error while parsing policy", e);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Provides list containing 350 CEF messages\r
-     *\r
-     * @return CEF Test Message\r
-     * @throws Exception Exception\r
-     */\r
-    protected List<EventListener> getCEFMessages() throws Exception {\r
-        final String cefMessageAsString = fromStream(CEF_MESSAGES_JSON_FILE_LOCATION);\r
-        final TypeReference<List<EventListener>> eventListenerListTypeReference =\r
-                new TypeReference<List<EventListener>>() {\r
-                };\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, eventListenerListTypeReference);\r
-    }\r
-\r
-    /**\r
-     * Provides 1 valid CEF messages which does not violate Threshold as String\r
-     *\r
-     * @return CEF Test Message String\r
-     * @throws Exception Exception\r
-     */\r
-    protected String getValidCEFMessage() throws Exception {\r
-        return fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-    }\r
-\r
-\r
-    /**\r
-     * Provides single CEF Test Message\r
-     *\r
-     * @return CEF Test Message\r
-     * @throws Exception Exception\r
-     */\r
-    protected EventListener getCEFEventListener() throws Exception {\r
-        final String cefMessageAsString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, EventListener.class);\r
-    }\r
-\r
-    protected static List<Threshold> getThresholds() {\r
-        Threshold majorThreshold = new Threshold();\r
-        majorThreshold.setClosedLoopControlName("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A");\r
-        majorThreshold.setFieldPath("$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn");\r
-        majorThreshold.setVersion("Test Version");\r
-        majorThreshold.setThresholdValue(500L);\r
-        majorThreshold.setClosedLoopEventStatus(ClosedLoopEventStatus.ONSET);\r
-        majorThreshold.setDirection(Direction.LESS_OR_EQUAL);\r
-\r
-        Threshold criticalThreshold = new Threshold();\r
-        criticalThreshold.setClosedLoopControlName("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A");\r
-        criticalThreshold.setThresholdValue(5000L);\r
-        criticalThreshold.setFieldPath("$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn");\r
-        criticalThreshold.setClosedLoopEventStatus(ClosedLoopEventStatus.ONSET);\r
-        criticalThreshold.setDirection(Direction.GREATER_OR_EQUAL);\r
-        return Arrays.asList(majorThreshold, criticalThreshold);\r
-    }\r
-\r
-    protected static Threshold getCriticalThreshold() {\r
-        Threshold criticalThreshold = new Threshold();\r
-        criticalThreshold.setClosedLoopControlName("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A");\r
-        criticalThreshold.setThresholdValue(5000L);\r
-        criticalThreshold.setFieldPath("$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn");\r
-        criticalThreshold.setDirection(Direction.GREATER_OR_EQUAL);\r
-        return criticalThreshold;\r
-    }\r
-\r
-    protected static Map<String, String> getControllerRuntimeArguments() {\r
-        final Properties controllerProperties =\r
-                AnalyticsModelIOUtils.loadPropertiesFile(TCA_CONTROLLER_POLICY_FILE_LOCATION, new Properties());\r
-\r
-        final Map<String, String> runtimeArgs = new LinkedHashMap<>();\r
-        for (Map.Entry<Object, Object> property : controllerProperties.entrySet()) {\r
-            runtimeArgs.put(property.getKey().toString(), property.getValue().toString());\r
-        }\r
-\r
-        return runtimeArgs;\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.util.AnalyticsModelIOUtils;
+import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
+import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * @author Rajiv Singla . Creation Date: 10/25/2016.
+ */
+public abstract class BaseAnalyticsTCAUnitTest extends BaseDCAEAnalyticsUnitTest {
+
+    /**
+     * Object mapper to be used for all TCA Json Parsing
+     */
+    protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =
+            Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();
+
+    protected static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";
+    protected static final String CEF_MESSAGES_JSON_FILE_LOCATION = "data/json/cef/cef_messages.json";
+    protected static final String CEF_MESSAGE_JSON_FILE_LOCATION = "data/json/cef/cef_message.json";
+    protected static final String CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION =
+            "data/json/cef/cef_message_with_threshold_violation.json";
+
+    protected static final String TCA_CONTROLLER_POLICY_FILE_LOCATION =
+            "data/properties/tca_controller_policy.properties";
+
+    protected static final String TCA_AAI_VNF_ENRICHMENT_FILE_LOCATION = "data/json/aai/aai_vnf_enrichment.json";
+
+    protected static final String TCA_TEST_APP_CONFIG_NAME = "testTCAAppName";
+    protected static final String TCA_TEST_APP_CONFIG_DESCRIPTION = "testTCAAppDescription";
+    protected static final String TCA_TEST_APP_CONFIG_SUBSCRIBER_OUTPUT_STREAM_NAME =
+            "testTcaSubscriberOutputStreamName";
+    protected static final String TCA_TEST_APP_CONFIG_VES_ALERT_TABLE_NAME = "testTcaVESAlertsTableName";
+    protected static final String TCA_TEST_APP_CONFIG_VES_MESSAGE_STATUS_TABLE_NAME =
+            "testTcaVESMessageStatusTableName";
+
+
+    /**
+     * Provides TCA Policy that can be used for testing
+     *
+     * @return test TCA Policy Object
+     */
+    protected TCAPolicy getSampleTCAPolicy() {
+        try {
+            return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(fromStream(TCA_POLICY_JSON_FILE_LOCATION), TCAPolicy.class);
+        } catch (IOException e) {
+            LOG.error("Error while parsing policy: {}", e);
+            throw new RuntimeException("Error while parsing policy", e);
+        }
+    }
+
+    /**
+     * Provides list containing 350 CEF messages
+     *
+     * @return CEF Test Message
+     * @throws Exception Exception
+     */
+    protected List<EventListener> getCEFMessages() throws Exception {
+        final String cefMessageAsString = fromStream(CEF_MESSAGES_JSON_FILE_LOCATION);
+        final TypeReference<List<EventListener>> eventListenerListTypeReference =
+                new TypeReference<List<EventListener>>() {
+                };
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, eventListenerListTypeReference);
+    }
+
+    /**
+     * Provides 1 valid CEF messages which does not violate Threshold as String
+     *
+     * @return CEF Test Message String
+     * @throws Exception Exception
+     */
+    protected String getValidCEFMessage() throws Exception {
+        return fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+    }
+
+
+    /**
+     * Provides single CEF Test Message
+     *
+     * @return CEF Test Message
+     * @throws Exception Exception
+     */
+    protected EventListener getCEFEventListener() throws Exception {
+        final String cefMessageAsString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageAsString, EventListener.class);
+    }
+
+    protected static List<Threshold> getThresholds() {
+        Threshold majorThreshold = new Threshold();
+        majorThreshold.setClosedLoopControlName("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A");
+        majorThreshold.setFieldPath("$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn");
+        majorThreshold.setVersion("Test Version");
+        majorThreshold.setThresholdValue(500L);
+        majorThreshold.setClosedLoopEventStatus(ClosedLoopEventStatus.ONSET);
+        majorThreshold.setDirection(Direction.LESS_OR_EQUAL);
+
+        Threshold criticalThreshold = new Threshold();
+        criticalThreshold.setClosedLoopControlName("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A");
+        criticalThreshold.setThresholdValue(5000L);
+        criticalThreshold.setFieldPath("$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn");
+        criticalThreshold.setClosedLoopEventStatus(ClosedLoopEventStatus.ONSET);
+        criticalThreshold.setDirection(Direction.GREATER_OR_EQUAL);
+        return Arrays.asList(majorThreshold, criticalThreshold);
+    }
+
+    protected static Threshold getCriticalThreshold() {
+        Threshold criticalThreshold = new Threshold();
+        criticalThreshold.setClosedLoopControlName("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A");
+        criticalThreshold.setThresholdValue(5000L);
+        criticalThreshold.setFieldPath("$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn");
+        criticalThreshold.setDirection(Direction.GREATER_OR_EQUAL);
+        return criticalThreshold;
+    }
+
+    protected static Map<String, String> getControllerRuntimeArguments() {
+        final Properties controllerProperties =
+                AnalyticsModelIOUtils.loadPropertiesFile(TCA_CONTROLLER_POLICY_FILE_LOCATION, new Properties());
+
+        final Map<String, String> runtimeArgs = new LinkedHashMap<>();
+        for (Map.Entry<Object, Object> property : controllerProperties.entrySet()) {
+            runtimeArgs.put(property.getKey().toString(), property.getValue().toString());
+        }
+
+        return runtimeArgs;
+    }
+
+}
@@ -1,56 +1,56 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class AbstractTCAECEFPolicyProcessorTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-    private class DummyAbstractTCAECEFPolicyProcessor extends AbstractTCAECEFPolicyProcessor {\r
-\r
-        @Override\r
-        public String getProcessorDescription() {\r
-            return "dummy";\r
-        }\r
-\r
-        @Override\r
-        public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {\r
-            return processorContext;\r
-        }\r
-    }\r
-\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void preProcessorWhenThereIsNoCEFMessage() throws Exception {\r
-        DummyAbstractTCAECEFPolicyProcessor dummyAbstractTCAECEFPolicyProcessor = new\r
-                DummyAbstractTCAECEFPolicyProcessor();\r
-\r
-        final TCACEFProcessorContext processorContext = new TCACEFProcessorContext(null, getSampleTCAPolicy());\r
-        processorContext.setCEFEventListener(null);\r
-        dummyAbstractTCAECEFPolicyProcessor.preProcessor(processorContext);\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class AbstractTCAECEFPolicyProcessorTest extends BaseAnalyticsTCAUnitTest {
+
+    private class DummyAbstractTCAECEFPolicyProcessor extends AbstractTCAECEFPolicyProcessor {
+
+        @Override
+        public String getProcessorDescription() {
+            return "dummy";
+        }
+
+        @Override
+        public TCACEFProcessorContext processMessage(TCACEFProcessorContext processorContext) {
+            return processorContext;
+        }
+    }
+
+
+    @Test(expected = MessageProcessingException.class)
+    public void preProcessorWhenThereIsNoCEFMessage() throws Exception {
+        DummyAbstractTCAECEFPolicyProcessor dummyAbstractTCAECEFPolicyProcessor = new
+                DummyAbstractTCAECEFPolicyProcessor();
+
+        final TCACEFProcessorContext processorContext = new TCACEFProcessorContext(null, getSampleTCAPolicy());
+        processorContext.setCEFEventListener(null);
+        dummyAbstractTCAECEFPolicyProcessor.preProcessor(processorContext);
+    }
+
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertNotNull;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCACEFJsonProcessorTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-\r
-    // A valid CEF Message\r
-    @Test\r
-    public void testCEFJsonProcessorWithValidCEFMessage() throws Exception {\r
-\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        final TCACEFProcessorContext tcacefProcessorContext =\r
-                new TCACEFProcessorContext(cefMessageString, getSampleTCAPolicy());\r
-\r
-        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();\r
-        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);\r
-\r
-        final EventListener cefEventListener = finalProcessorContext.getCEFEventListener();\r
-\r
-        assertNotNull("CEF Event Listener must be present", cefEventListener);\r
-\r
-    }\r
-\r
-    // Even if message is not a valid CEF format but still a Json - Json Processor will parse it\r
-    @Test\r
-    public void testCEFJsonProcessorWithValidJson() throws Exception {\r
-\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(\r
-                " { \"key\" : \"value\" } ", getSampleTCAPolicy());\r
-\r
-        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();\r
-        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);\r
-        final EventListener cefEventListener = finalProcessorContext.getCEFEventListener();\r
-\r
-        assertNotNull("Even if message is not a valid CEF format but a valid Json.Json Processor must be able to " +\r
-                        "parse it",\r
-                cefEventListener);\r
-    }\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void testCEFJsonProcessorWithCEFMessageAsNull() throws Exception {\r
-\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(null, getSampleTCAPolicy());\r
-\r
-        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();\r
-        tcacefJsonProcessor.apply(tcacefProcessorContext);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testCEFJsonProcessorWithCEFMessageIsBlank() throws Exception {\r
-\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext("   ", getSampleTCAPolicy());\r
-\r
-        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();\r
-        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);\r
-        assertFalse("Blank message must terminate processing of message chain", finalProcessorContext\r
-                .canProcessingContinue());\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCEFJsonProcessorWithCEFMessageWhichIsNotValidMessage() throws Exception {\r
-\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(" Invalid Message ",\r
-                getSampleTCAPolicy());\r
-\r
-        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();\r
-        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);\r
-        assertFalse("Invalid message must terminate processing of message chain", finalProcessorContext\r
-                .canProcessingContinue());\r
-    }\r
-\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void testCEFJsonProcessorWithCEFMessageWhichIsNotValidJson() throws Exception {\r
-\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(\r
-                " { \"Invalid Event Listener Json\" } ", getSampleTCAPolicy());\r
-\r
-        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();\r
-        tcacefJsonProcessor.apply(tcacefProcessorContext);\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCACEFJsonProcessorTest extends BaseAnalyticsTCAUnitTest {
+
+
+    // A valid CEF Message
+    @Test
+    public void testCEFJsonProcessorWithValidCEFMessage() throws Exception {
+
+        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        final TCACEFProcessorContext tcacefProcessorContext =
+                new TCACEFProcessorContext(cefMessageString, getSampleTCAPolicy());
+
+        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();
+        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);
+
+        final EventListener cefEventListener = finalProcessorContext.getCEFEventListener();
+
+        assertNotNull("CEF Event Listener must be present", cefEventListener);
+
+    }
+
+    // Even if message is not a valid CEF format but still a Json - Json Processor will parse it
+    @Test
+    public void testCEFJsonProcessorWithValidJson() throws Exception {
+
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(
+                " { \"key\" : \"value\" } ", getSampleTCAPolicy());
+
+        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();
+        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);
+        final EventListener cefEventListener = finalProcessorContext.getCEFEventListener();
+
+        assertNotNull("Even if message is not a valid CEF format but a valid Json.Json Processor must be able to " +
+                        "parse it",
+                cefEventListener);
+    }
+
+    @Test(expected = MessageProcessingException.class)
+    public void testCEFJsonProcessorWithCEFMessageAsNull() throws Exception {
+
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(null, getSampleTCAPolicy());
+
+        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();
+        tcacefJsonProcessor.apply(tcacefProcessorContext);
+
+    }
+
+    @Test
+    public void testCEFJsonProcessorWithCEFMessageIsBlank() throws Exception {
+
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext("   ", getSampleTCAPolicy());
+
+        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();
+        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);
+        assertFalse("Blank message must terminate processing of message chain", finalProcessorContext
+                .canProcessingContinue());
+    }
+
+
+    @Test
+    public void testCEFJsonProcessorWithCEFMessageWhichIsNotValidMessage() throws Exception {
+
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(" Invalid Message ",
+                getSampleTCAPolicy());
+
+        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();
+        final TCACEFProcessorContext finalProcessorContext = tcacefJsonProcessor.apply(tcacefProcessorContext);
+        assertFalse("Invalid message must terminate processing of message chain", finalProcessorContext
+                .canProcessingContinue());
+    }
+
+
+    @Test(expected = MessageProcessingException.class)
+    public void testCEFJsonProcessorWithCEFMessageWhichIsNotValidJson() throws Exception {
+
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(
+                " { \"Invalid Event Listener Json\" } ", getSampleTCAPolicy());
+
+        TCACEFJsonProcessor tcacefJsonProcessor = new TCACEFJsonProcessor();
+        tcacefJsonProcessor.apply(tcacefProcessorContext);
+    }
+
+
+}
@@ -1,74 +1,74 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.ProcessingState;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/16/2016.\r
- */\r
-public class TCACEFPolicyDomainFilterTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-    private TCACEFPolicyDomainFilter tcacefPolicyDomainFilter;\r
-    private TCACEFProcessorContext processorContext;\r
-    private EventListener cefEventListener;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        tcacefPolicyDomainFilter = new TCACEFPolicyDomainFilter();\r
-        processorContext = new TCACEFProcessorContext("", getSampleTCAPolicy());\r
-        cefEventListener = getCEFEventListener();\r
-        processorContext.setCEFEventListener(cefEventListener);\r
-    }\r
-\r
-    @Test\r
-    public void testProcessMessageWhenMessageIsValid() throws Exception {\r
-        tcacefPolicyDomainFilter.processMessage(processorContext);\r
-        assertThat("Processing must finish successfully",\r
-                tcacefPolicyDomainFilter.getProcessingState(), is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));\r
-    }\r
-\r
-    @Test\r
-    public void testProcessMessageWhenCEFEventIsNull() throws Exception {\r
-        cefEventListener.setEvent(null);\r
-        processorContext.setCEFEventListener(cefEventListener);\r
-        tcacefPolicyDomainFilter.processMessage(processorContext);\r
-        assertThat("Processing must terminate early",\r
-                tcacefPolicyDomainFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));\r
-    }\r
-\r
-    @Test\r
-    public void testProcessMessageWhenPolicyDomainDoesNotMatchMessageDomain() throws Exception {\r
-        cefEventListener.getEvent().getCommonEventHeader().setDomain(Domain.other);\r
-        tcacefPolicyDomainFilter.processMessage(processorContext);\r
-        assertThat("Processing must terminate early",\r
-                tcacefPolicyDomainFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.service.processor.ProcessingState;
+import org.onap.dcae.apod.analytics.model.domain.cef.Domain;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/16/2016.
+ */
+public class TCACEFPolicyDomainFilterTest extends BaseAnalyticsTCAUnitTest {
+
+    private TCACEFPolicyDomainFilter tcacefPolicyDomainFilter;
+    private TCACEFProcessorContext processorContext;
+    private EventListener cefEventListener;
+
+    @Before
+    public void before() throws Exception {
+        tcacefPolicyDomainFilter = new TCACEFPolicyDomainFilter();
+        processorContext = new TCACEFProcessorContext("", getSampleTCAPolicy());
+        cefEventListener = getCEFEventListener();
+        processorContext.setCEFEventListener(cefEventListener);
+    }
+
+    @Test
+    public void testProcessMessageWhenMessageIsValid() throws Exception {
+        tcacefPolicyDomainFilter.processMessage(processorContext);
+        assertThat("Processing must finish successfully",
+                tcacefPolicyDomainFilter.getProcessingState(), is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));
+    }
+
+    @Test
+    public void testProcessMessageWhenCEFEventIsNull() throws Exception {
+        cefEventListener.setEvent(null);
+        processorContext.setCEFEventListener(cefEventListener);
+        tcacefPolicyDomainFilter.processMessage(processorContext);
+        assertThat("Processing must terminate early",
+                tcacefPolicyDomainFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));
+    }
+
+    @Test
+    public void testProcessMessageWhenPolicyDomainDoesNotMatchMessageDomain() throws Exception {
+        cefEventListener.getEvent().getCommonEventHeader().setDomain(Domain.other);
+        tcacefPolicyDomainFilter.processMessage(processorContext);
+        assertThat("Processing must terminate early",
+                tcacefPolicyDomainFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));
+    }
+
+}
@@ -1,75 +1,75 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.ProcessingState;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 12/19/2016.\r
- */\r
-public class TCACEFPolicyEventNameFilterTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-    private TCACEFPolicyEventNameFilter tcacefPolicyEventNameFilter;\r
-    private TCACEFProcessorContext processorContext;\r
-    private EventListener cefEventListener;\r
-\r
-    @Before\r
-    public void before() throws Exception {\r
-        tcacefPolicyEventNameFilter = new TCACEFPolicyEventNameFilter();\r
-        processorContext = new TCACEFProcessorContext("", getSampleTCAPolicy());\r
-        cefEventListener = getCEFEventListener();\r
-        processorContext.setCEFEventListener(cefEventListener);\r
-    }\r
-\r
-    @Test\r
-    public void testProcessMessageWhenMessageIsValid() throws Exception {\r
-        tcacefPolicyEventNameFilter.processMessage(processorContext);\r
-        assertThat("Processing must finish successfully",\r
-                tcacefPolicyEventNameFilter.getProcessingState(),\r
-                is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));\r
-    }\r
-\r
-    @Test\r
-    public void testProcessMessageWhenCEFEventIsNull() throws Exception {\r
-        cefEventListener.setEvent(null);\r
-        processorContext.setCEFEventListener(cefEventListener);\r
-        tcacefPolicyEventNameFilter.processMessage(processorContext);\r
-        assertThat("Processing must terminate early",\r
-                tcacefPolicyEventNameFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));\r
-    }\r
-\r
-    @Test\r
-    public void testProcessMessageWhenPolicyEventNameDoesNotMatchMessageEventName() throws Exception {\r
-        cefEventListener.getEvent().getCommonEventHeader().setEventName("someNonPolicyEventName");\r
-        tcacefPolicyEventNameFilter.processMessage(processorContext);\r
-        assertThat("Processing must terminate early",\r
-                tcacefPolicyEventNameFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));\r
-    }\r
-\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.service.processor.ProcessingState;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Rajiv Singla . Creation Date: 12/19/2016.
+ */
+public class TCACEFPolicyEventNameFilterTest extends BaseAnalyticsTCAUnitTest {
+
+    private TCACEFPolicyEventNameFilter tcacefPolicyEventNameFilter;
+    private TCACEFProcessorContext processorContext;
+    private EventListener cefEventListener;
+
+    @Before
+    public void before() throws Exception {
+        tcacefPolicyEventNameFilter = new TCACEFPolicyEventNameFilter();
+        processorContext = new TCACEFProcessorContext("", getSampleTCAPolicy());
+        cefEventListener = getCEFEventListener();
+        processorContext.setCEFEventListener(cefEventListener);
+    }
+
+    @Test
+    public void testProcessMessageWhenMessageIsValid() throws Exception {
+        tcacefPolicyEventNameFilter.processMessage(processorContext);
+        assertThat("Processing must finish successfully",
+                tcacefPolicyEventNameFilter.getProcessingState(),
+                is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));
+    }
+
+    @Test
+    public void testProcessMessageWhenCEFEventIsNull() throws Exception {
+        cefEventListener.setEvent(null);
+        processorContext.setCEFEventListener(cefEventListener);
+        tcacefPolicyEventNameFilter.processMessage(processorContext);
+        assertThat("Processing must terminate early",
+                tcacefPolicyEventNameFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));
+    }
+
+    @Test
+    public void testProcessMessageWhenPolicyEventNameDoesNotMatchMessageEventName() throws Exception {
+        cefEventListener.getEvent().getCommonEventHeader().setEventName("someNonPolicyEventName");
+        tcacefPolicyEventNameFilter.processMessage(processorContext);
+        assertThat("Processing must terminate early",
+                tcacefPolicyEventNameFilter.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));
+    }
+
+
+}
@@ -1,81 +1,81 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.common.service.processor.ProcessingState;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCACEFPolicyThresholdsProcessorTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-    @Test\r
-    public void testCEFPolicyThresholdProcessorWithNoThresholdViolation() throws Exception {\r
-\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(cefMessageString,\r
-                getSampleTCAPolicy());\r
-        tcacefProcessorContext.setCEFEventListener(getCEFEventListener());\r
-\r
-        AbstractTCAECEFPolicyProcessor policyThresholdsProcessor = new TCACEFPolicyThresholdsProcessor();\r
-        final TCACEFProcessorContext finalProcessorContext = policyThresholdsProcessor.apply(tcacefProcessorContext);\r
-\r
-        assertFalse("Process Context can Processing Continue flag should be false", finalProcessorContext\r
-                .canProcessingContinue());\r
-        assertThat("Policy Threshold Processor State must be terminated early",\r
-                policyThresholdsProcessor.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));\r
-        assertEquals("Policy must not change", getSampleTCAPolicy(), finalProcessorContext.getTCAPolicy());\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testCEFPolicyThresholdProcessorWithThresholdViolation() throws Exception {\r
-\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION);\r
-        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(cefMessageString,\r
-                getSampleTCAPolicy());\r
-\r
-        final EventListener eventListener = ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageString,\r
-                EventListener.class);\r
-        tcacefProcessorContext.setCEFEventListener(eventListener);\r
-\r
-        AbstractTCAECEFPolicyProcessor policyThresholdsProcessor = new TCACEFPolicyThresholdsProcessor();\r
-        final TCACEFProcessorContext finalProcessorContext = policyThresholdsProcessor.apply(tcacefProcessorContext);\r
-\r
-        assertTrue("Process Context can Processing Continue flag should be true", finalProcessorContext\r
-                .canProcessingContinue());\r
-        assertThat("Policy Threshold Processor State must be successful",\r
-                policyThresholdsProcessor.getProcessingState(), is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));\r
-        assertEquals("Policy must not change", getSampleTCAPolicy(), finalProcessorContext.getTCAPolicy());\r
-\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.common.service.processor.ProcessingState;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCACEFPolicyThresholdsProcessorTest extends BaseAnalyticsTCAUnitTest {
+
+    @Test
+    public void testCEFPolicyThresholdProcessorWithNoThresholdViolation() throws Exception {
+
+        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(cefMessageString,
+                getSampleTCAPolicy());
+        tcacefProcessorContext.setCEFEventListener(getCEFEventListener());
+
+        AbstractTCAECEFPolicyProcessor policyThresholdsProcessor = new TCACEFPolicyThresholdsProcessor();
+        final TCACEFProcessorContext finalProcessorContext = policyThresholdsProcessor.apply(tcacefProcessorContext);
+
+        assertFalse("Process Context can Processing Continue flag should be false", finalProcessorContext
+                .canProcessingContinue());
+        assertThat("Policy Threshold Processor State must be terminated early",
+                policyThresholdsProcessor.getProcessingState(), is(ProcessingState.PROCESSING_TERMINATED_EARLY));
+        assertEquals("Policy must not change", getSampleTCAPolicy(), finalProcessorContext.getTCAPolicy());
+
+    }
+
+    @Test
+    public void testCEFPolicyThresholdProcessorWithThresholdViolation() throws Exception {
+
+        final String cefMessageString = fromStream(CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION);
+        final TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(cefMessageString,
+                getSampleTCAPolicy());
+
+        final EventListener eventListener = ANALYTICS_MODEL_OBJECT_MAPPER.readValue(cefMessageString,
+                EventListener.class);
+        tcacefProcessorContext.setCEFEventListener(eventListener);
+
+        AbstractTCAECEFPolicyProcessor policyThresholdsProcessor = new TCACEFPolicyThresholdsProcessor();
+        final TCACEFProcessorContext finalProcessorContext = policyThresholdsProcessor.apply(tcacefProcessorContext);
+
+        assertTrue("Process Context can Processing Continue flag should be true", finalProcessorContext
+                .canProcessingContinue());
+        assertThat("Policy Threshold Processor State must be successful",
+                policyThresholdsProcessor.getProcessingState(), is(ProcessingState.PROCESSING_FINISHED_SUCCESSFULLY));
+        assertEquals("Policy must not change", getSampleTCAPolicy(), finalProcessorContext.getTCAPolicy());
+
+    }
+
+}
@@ -1,38 +1,38 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.processor;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-\r
-/**\r
- *\r
- * @author Rajiv Singla . Creation Date: 11/14/2016.\r
- */\r
-public class TCACEFProcessorContextTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-    @Test\r
-    public void testProcessorContextSerialization() throws Exception {\r
-        TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(getValidCEFMessage(),\r
-                getSampleTCAPolicy());\r
-        testSerialization(tcacefProcessorContext, TCACEFProcessorContextTest.class);\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.processor;
+
+import org.junit.Test;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/14/2016.
+ */
+public class TCACEFProcessorContextTest extends BaseAnalyticsTCAUnitTest {
+
+    @Test
+    public void testProcessorContextSerialization() throws Exception {
+        TCACEFProcessorContext tcacefProcessorContext = new TCACEFProcessorContext(getValidCEFMessage(),
+                getSampleTCAPolicy());
+        testSerialization(tcacefProcessorContext, TCACEFProcessorContextTest.class);
+    }
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.tca.utils;\r
-\r
-import com.google.common.base.Supplier;\r
-import com.google.common.collect.ImmutableSet;\r
-import com.google.common.collect.Table;\r
-import org.apache.commons.lang3.tuple.Pair;\r
-import org.junit.Rule;\r
-import org.junit.Test;\r
-import org.junit.rules.ExpectedException;\r
-import org.mockito.Mockito;\r
-import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
-import org.openecomp.dcae.apod.analytics.common.exception.MessageProcessingException;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.CommonEventHeader;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Event;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;\r
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;\r
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;\r
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;\r
-import org.openecomp.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;\r
-import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;\r
-import org.quartz.Job;\r
-import org.quartz.JobDataMap;\r
-import org.quartz.JobDetail;\r
-import org.quartz.Scheduler;\r
-import org.quartz.SimpleTrigger;\r
-import org.quartz.impl.StdSchedulerFactory;\r
-\r
-import java.math.BigDecimal;\r
-import java.util.Arrays;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.hamcrest.CoreMatchers.isA;\r
-import static org.hamcrest.Matchers.containsInAnyOrder;\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertNull;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.times;\r
-import static org.mockito.Mockito.verify;\r
-import static org.mockito.Mockito.when;\r
-\r
-/**\r
- * @author Rajiv Singla . Creation Date: 11/9/2016.\r
- */\r
-public class TCAUtilsTest extends BaseAnalyticsTCAUnitTest {\r
-\r
-    @Test\r
-    public void testGetPolicyEventNames() throws Exception {\r
-\r
-        final TCAPolicy sampleTCAPolicy = getSampleTCAPolicy();\r
-        final List<String> eventNames = TCAUtils.getPolicyEventNames(sampleTCAPolicy);\r
-\r
-        assertThat("Policy event names must contain vFirewall, vLoadBalancer, virtualVMEventName", eventNames,\r
-                containsInAnyOrder("Mfvs_eNodeB_RANKPI", "vLoadBalancer", "virtualVMEventName"));\r
-    }\r
-\r
-    @Test\r
-    public void testGetPolicyEventNamesSupplier() throws Exception {\r
-        final TCAPolicy sampleTCAPolicy = getSampleTCAPolicy();\r
-        final Supplier<List<String>> policyEventNamesSupplier = TCAUtils.getPolicyEventNamesSupplier\r
-                (sampleTCAPolicy);\r
-        final List<String> eventNames = policyEventNamesSupplier.get();\r
-        assertThat("Policy event names must contain vFirewall and vLoadBalancer", eventNames,\r
-                containsInAnyOrder("Mfvs_eNodeB_RANKPI", "vLoadBalancer", "virtualVMEventName"));\r
-    }\r
-\r
-    @Test\r
-    public void testProcessCEFMessage() throws Exception {\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        final TCACEFProcessorContext tcacefProcessorContext = TCAUtils.filterCEFMessage(cefMessageString,\r
-                getSampleTCAPolicy());\r
-        assertThat("TCAECEFProcessor Processor Context can continue flag is true", tcacefProcessorContext\r
-                .canProcessingContinue(), is(true));\r
-    }\r
-\r
-    @Test\r
-    public void testGetPolicyFRThresholdsTableSupplier() throws Exception {\r
-        final Table<String, String, List<Threshold>> policyFRThresholdPathTable = TCAUtils\r
-                .getPolicyEventNameThresholdsTableSupplier(getSampleTCAPolicy()).get();\r
-\r
-        final Map<String, List<Threshold>> eNodeBRankpi = policyFRThresholdPathTable.row("Mfvs_eNodeB_RANKPI");\r
-        final Map<String, List<Threshold>> vLoadBalancer = policyFRThresholdPathTable.row("vLoadBalancer");\r
-\r
-        final Set<String> eNodeBRankpiFieldPaths = eNodeBRankpi.keySet();\r
-        final Set<String> vLoadBalancerPaths = vLoadBalancer.keySet();\r
-\r
-        final String receivedBroadcastPacketsFieldPath =\r
-                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated";\r
-        assertThat("eNodeBRankpi threshold field path size must be " +\r
-                        "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]" +\r
-                        ".receivedBroadcastPacketsAccumulated",\r
-                eNodeBRankpiFieldPaths.iterator().next(),\r
-                is(receivedBroadcastPacketsFieldPath));\r
-\r
-        assertThat("vLoadBalancer threshold field path size must be " +\r
-                        "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]" +\r
-                        ".receivedBroadcastPacketsAccumulated",\r
-                vLoadBalancerPaths.iterator().next(),\r
-                is(receivedBroadcastPacketsFieldPath));\r
-\r
-        final List<Threshold> eNodeBRankpiThresholds = policyFRThresholdPathTable.get("Mfvs_eNodeB_RANKPI",\r
-                receivedBroadcastPacketsFieldPath);\r
-        final List<Threshold> vLoadBalancerThresholds = policyFRThresholdPathTable.get("vLoadBalancer",\r
-                receivedBroadcastPacketsFieldPath);\r
-\r
-        assertThat("eNodeBRankpi Threshold size must be 3", eNodeBRankpiThresholds.size(), is(3));\r
-        assertThat("vLoadBalancer Threshold size must be 2", vLoadBalancerThresholds.size(), is(2));\r
-    }\r
-\r
-    @Test\r
-    public void testGetJsonPathValueWithValidMessageAndPolicy() throws Exception {\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        final String jsonPath =\r
-                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated";\r
-        final ImmutableSet<String> fieldPaths = ImmutableSet.of(jsonPath);\r
-        final Map<String, List<BigDecimal>> jsonPathValueMap = TCAUtils.getJsonPathValue(cefMessageString, fieldPaths);\r
-        assertThat("Json Path value must match",\r
-                jsonPathValueMap.get(jsonPath).get(0), is(new BigDecimal(5000)));\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testGetJsonPathValueWithValidPath() throws Exception {\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);\r
-        final String jsonPath = "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].invalid";\r
-        final ImmutableSet<String> fieldPaths = ImmutableSet.of(jsonPath);\r
-        final Map<String, List<BigDecimal>> jsonPathValueMap = TCAUtils.getJsonPathValue(cefMessageString, fieldPaths);\r
-        assertThat("Json path value must be empty", jsonPathValueMap.size(), is(0));\r
-\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCreateNewTCAVESResponseWithVFControlLoopSchemaType() throws Exception {\r
-        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);\r
-\r
-        MetricsPerEventName metricsPerEventName = mock(MetricsPerEventName.class);\r
-        when(metricsPerEventName.getThresholds()).thenReturn(getThresholds());\r
-        when(metricsPerEventName.getPolicyScope()).thenReturn("Test Policy scope");\r
-        when(tcacefProcessorContext.getMetricsPerEventName()).thenReturn(metricsPerEventName);\r
-        when(metricsPerEventName.getEventName()).thenReturn("testEventName");\r
-        when(metricsPerEventName.getControlLoopSchemaType()).thenReturn(ControlLoopSchemaType.VM);\r
-\r
-        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());\r
-        TCAVESResponse tcaVESResponse = TCAUtils.createNewTCAVESResponse(tcacefProcessorContext, "TCA_APP_NAME");\r
-\r
-        //TODO :  Add proper assertions, as the usage is not clearly understood\r
-        assertThat(tcaVESResponse.getClosedLoopControlName(),\r
-                is("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A"));\r
-        assertThat(tcaVESResponse.getVersion(), is("Test Version"));\r
-        assertThat(tcaVESResponse.getPolicyScope(), is("Test Policy scope"));\r
-        assertNull(tcaVESResponse.getAai().getGenericVNFName());\r
-        assertNotNull(tcaVESResponse.getAai().getGenericServerName());\r
-    }\r
-\r
-    @Test\r
-    public void testCreateNewTCAVESResponseWithFunctionalRolevFirewall() throws Exception {\r
-        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);\r
-\r
-        MetricsPerEventName metricsPerEventName = mock(MetricsPerEventName.class);\r
-        when(metricsPerEventName.getThresholds()).thenReturn(getThresholds());\r
-        when(metricsPerEventName.getPolicyScope()).thenReturn("Test Policy scope");\r
-        when(tcacefProcessorContext.getMetricsPerEventName()).thenReturn(metricsPerEventName);\r
-        when(metricsPerEventName.getEventName()).thenReturn("vFirewall");\r
-\r
-        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());\r
-        TCAVESResponse tcaVESResponse = TCAUtils.createNewTCAVESResponse(tcacefProcessorContext, "TCA_APP_NAME");\r
-\r
-        //TODO :  Add proper assertions, as the usage is not clearly understood\r
-        assertThat(tcaVESResponse.getClosedLoopControlName(),\r
-                is("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A"));\r
-        assertThat(tcaVESResponse.getVersion(), is("Test Version"));\r
-        assertThat(tcaVESResponse.getPolicyScope(), is("Test Policy scope"));\r
-        assertNotNull(tcaVESResponse.getAai().getGenericVNFName());\r
-        assertNull(tcaVESResponse.getAai().getGenericServerName());\r
-\r
-    }\r
-\r
-    @Rule\r
-    public ExpectedException expectedIllegalArgumentException = ExpectedException.none();\r
-\r
-    @Test\r
-    public void testCreateNewTCAVESResponseNullFunctionalRole() throws Exception {\r
-        expectedIllegalArgumentException.expect(MessageProcessingException.class);\r
-        expectedIllegalArgumentException.expectCause(isA(IllegalArgumentException.class));\r
-        expectedIllegalArgumentException.expectMessage("No violations metrics. Unable to create VES Response");\r
-\r
-        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);\r
-        TCAVESResponse tcaVESResponse = TCAUtils.createNewTCAVESResponse(tcacefProcessorContext, "TCA_APP_NAME");\r
-        assertNotNull(tcaVESResponse.getClosedLoopControlName());\r
-    }\r
-\r
-    @Test\r
-    public void testPrioritizeThresholdViolations() throws Exception {\r
-\r
-        Map<String, Threshold> thresholdMap = new HashMap<>();\r
-        Threshold majorThreshold = mock(Threshold.class);\r
-        when(majorThreshold.getSeverity()).thenReturn(EventSeverity.MAJOR);\r
-        thresholdMap.put("MAJOR", majorThreshold);\r
-\r
-        Threshold result1 = TCAUtils.prioritizeThresholdViolations(thresholdMap);\r
-        assertEquals(result1.getSeverity(), EventSeverity.MAJOR);\r
-\r
-        Threshold criticalThreshold = mock(Threshold.class);\r
-        when(criticalThreshold.getSeverity()).thenReturn(EventSeverity.CRITICAL);\r
-        thresholdMap.put("CRITICAL", criticalThreshold);\r
-\r
-        Threshold result2 = TCAUtils.prioritizeThresholdViolations(thresholdMap);\r
-        assertEquals(result2.getSeverity(), EventSeverity.CRITICAL);\r
-    }\r
-\r
-    @Test\r
-    public void testCreateViolatedMetrics() throws Exception {\r
-        TCAPolicy tcaPolicy = getSampleTCAPolicy();\r
-        Threshold violatedThreshold = getCriticalThreshold();\r
-        String functionalRole = "Mfvs_eNodeB_RANKPI";\r
-        MetricsPerEventName result = TCAUtils.createViolatedMetrics(tcaPolicy, violatedThreshold, functionalRole);\r
-        assertThat(result.getPolicyScope(), is("resource=vFirewall;type=configuration"));\r
-        assertThat(result.getPolicyName(), is("configuration.dcae.microservice.tca.xml"));\r
-    }\r
-\r
-    @Test\r
-    public void testCreateViolatedMetricsWrongEventName() throws Exception {\r
-        expectedIllegalArgumentException.expect(MessageProcessingException.class);\r
-        expectedIllegalArgumentException.expectCause(isA(IllegalStateException.class));\r
-        String eventName = "badEventName";\r
-        expectedIllegalArgumentException.expectMessage("TCA Policy must contain eventName: " + eventName);\r
-        TCAPolicy tcaPolicy = getSampleTCAPolicy();\r
-        Threshold violatedThreshold = getCriticalThreshold();\r
-        TCAUtils.createViolatedMetrics(tcaPolicy, violatedThreshold, eventName);\r
-    }\r
-\r
-    @Test\r
-    public void testGetDomainAndEventName() {\r
-        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);\r
-        EventListener eventListener = mock(EventListener.class);\r
-        Event event = mock(Event.class);\r
-        CommonEventHeader commonEventHeader = mock(CommonEventHeader.class);\r
-\r
-        Pair<String, String> result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);\r
-        assertNull(result.getLeft());\r
-        assertNull(result.getRight());\r
-\r
-        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(eventListener);\r
-        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);\r
-        assertNull(result.getLeft());\r
-        assertNull(result.getRight());\r
-\r
-        when(eventListener.getEvent()).thenReturn(event);\r
-        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);\r
-        assertNull(result.getLeft());\r
-        assertNull(result.getRight());\r
-\r
-        when(event.getCommonEventHeader()).thenReturn(commonEventHeader);\r
-        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);\r
-        assertNull(result.getLeft());\r
-        assertNull(result.getRight());\r
-\r
-        when(commonEventHeader.getDomain()).thenReturn(Domain.other);\r
-        when(commonEventHeader.getEventName()).thenReturn("eventName");\r
-\r
-        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);\r
-        assertEquals(result.getLeft(), "other");\r
-        assertEquals(result.getRight(), "eventName");\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testComputeThresholdViolationsNotPresent() throws Exception {\r
-        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);\r
-        when(tcacefProcessorContext.canProcessingContinue()).thenReturn(true);\r
-        when(tcacefProcessorContext.getMessage()).thenReturn(getValidCEFMessage());\r
-\r
-        when(tcacefProcessorContext.getTCAPolicy()).thenReturn(getSampleTCAPolicy());\r
-        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());\r
-\r
-        TCACEFProcessorContext result = TCAUtils.computeThresholdViolations(tcacefProcessorContext);\r
-        assertNotNull(result);\r
-        verify(result, times(0)).setMetricsPerEventName(Mockito.any(MetricsPerEventName.class));\r
-        assertEquals("Policy must not change", getSampleTCAPolicy(), result.getTCAPolicy());\r
-    }\r
-\r
-    @Test\r
-    public void testComputeThresholdViolationsPresent() throws Exception {\r
-        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);\r
-        when(tcacefProcessorContext.canProcessingContinue()).thenReturn(true);\r
-        final String cefMessageString = fromStream(CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION);\r
-        when(tcacefProcessorContext.getMessage()).thenReturn(cefMessageString);\r
-\r
-        when(tcacefProcessorContext.getTCAPolicy()).thenReturn(getSampleTCAPolicy());\r
-        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());\r
-\r
-        TCACEFProcessorContext result = TCAUtils.computeThresholdViolations(tcacefProcessorContext);\r
-        verify(result, times(1)).setMetricsPerEventName(Mockito.any(MetricsPerEventName.class));\r
-\r
-        assertEquals("Policy must not change", getSampleTCAPolicy(), result.getTCAPolicy());\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCreateTCAPolicyMetricsPerKeyName() throws Exception {\r
-\r
-        final Map<String, String> tcaPolicyMap = TCAUtils.filterMapByKeyNamePrefix(getControllerRuntimeArguments(),\r
-                AnalyticsConstants.TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH);\r
-\r
-        // determine functional Roles\r
-        final Map<String, Map<String, String>> functionalRolesMap =\r
-                TCAUtils.extractSubTree(tcaPolicyMap, 2, 3, AnalyticsConstants.TCA_POLICY_DELIMITER);\r
-\r
-        final List<MetricsPerEventName> tcaPolicyMetricsPerEventNameList =\r
-                TCAUtils.createTCAPolicyMetricsPerEventNameList(functionalRolesMap);\r
-\r
-        assertThat("There are two Metrics per function role", 2,\r
-                is(tcaPolicyMetricsPerEventNameList.size()));\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCreateQuartzScheduler() throws Exception {\r
-        final Scheduler scheduler = Mockito.mock(Scheduler.class);\r
-        final StdSchedulerFactory stdSchedulerFactory = Mockito.mock(StdSchedulerFactory.class);\r
-        when(stdSchedulerFactory.getScheduler()).thenReturn(scheduler);\r
-        final JobDataMap jobDataMap = Mockito.mock(JobDataMap.class);\r
-        TCAUtils.createQuartzScheduler(1000, stdSchedulerFactory,\r
-                "data/properties/quartz-test.properties", jobDataMap, Job.class,\r
-                "testJob", "testTigger");\r
-        verify(scheduler, times(1))\r
-                .scheduleJob(Mockito.any(JobDetail.class), Mockito.any(SimpleTrigger.class));\r
-    }\r
-\r
-\r
-    @Test\r
-    public void testCreateTCAAlertStringWhenCEFIsEnabled() throws Exception {\r
-        final MetricsPerEventName violatedMetrics = createViolatedMetricsPerEventName(EventSeverity.CRITICAL);\r
-        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);\r
-        when(processorContext.getMetricsPerEventName()).thenReturn(violatedMetrics);\r
-        when(processorContext.getCEFEventListener()).thenReturn(getCEFEventListener());\r
-        final String alertString = TCAUtils.createTCAAlertString(processorContext, "testApp", true);\r
-        assertTrue(alertString.contains("thresholdCrossingAlertFields"));\r
-    }\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void testCreateTCAAlertStringWhenViolatedMetricsNotPresentAndCEFIsEnabled() throws Exception {\r
-        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);\r
-        when(processorContext.getMetricsPerEventName()).thenReturn(null);\r
-        TCAUtils.createTCAAlertString(processorContext, "testApp", true);\r
-    }\r
-\r
-    @Test\r
-    public void testCreateTCAAlertStringWhenCEFIsDisabled() throws Exception {\r
-        final MetricsPerEventName violatedMetrics = createViolatedMetricsPerEventName(EventSeverity.MAJOR);\r
-        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);\r
-        when(processorContext.getMetricsPerEventName()).thenReturn(violatedMetrics);\r
-        when(processorContext.getCEFEventListener()).thenReturn(getCEFEventListener());\r
-        final String alertString = TCAUtils.createTCAAlertString(processorContext, "testApp", false);\r
-        assertFalse(alertString.contains("thresholdCrossingAlertFields"));\r
-    }\r
-\r
-    @Test(expected = MessageProcessingException.class)\r
-    public void testCreateTCAAlertStringWhenViolatedMetricsNotPresentAndCEFIsDisabled() throws Exception {\r
-        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);\r
-        when(processorContext.getMetricsPerEventName()).thenReturn(null);\r
-        TCAUtils.createTCAAlertString(processorContext, "testApp", false);\r
-    }\r
-\r
-    private static MetricsPerEventName createViolatedMetricsPerEventName(EventSeverity severity) {\r
-        final Threshold violatedThreshold = new Threshold();\r
-        violatedThreshold.setSeverity(severity);\r
-        violatedThreshold.setDirection(Direction.GREATER);\r
-        violatedThreshold.setClosedLoopControlName("violatedThresholdClosedLoopName");\r
-        violatedThreshold.setActualFieldValue(new BigDecimal(100L));\r
-        violatedThreshold.setFieldPath("violatedThresholdFieldPath");\r
-        violatedThreshold.setVersion("violatedThresholdVersion");\r
-        violatedThreshold.setClosedLoopEventStatus(ClosedLoopEventStatus.ONSET);\r
-        violatedThreshold.setThresholdValue(50L);\r
-\r
-        final MetricsPerEventName violatedMetrics = new MetricsPerEventName();\r
-        violatedMetrics.setPolicyName("violatePolicyName");\r
-        violatedMetrics.setPolicyVersion("violatedPolicyVersion");\r
-        violatedMetrics.setPolicyScope("violatedPolicyScope");\r
-        violatedMetrics.setEventName("violatedEventName");\r
-        violatedMetrics.setThresholds(Arrays.asList(violatedThreshold));\r
-        return violatedMetrics;\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.tca.utils;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Table;
+import org.apache.commons.lang3.tuple.Pair;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
+import org.onap.dcae.apod.analytics.common.AnalyticsConstants;
+import org.onap.dcae.apod.analytics.common.exception.MessageProcessingException;
+import org.onap.dcae.apod.analytics.model.domain.cef.CommonEventHeader;
+import org.onap.dcae.apod.analytics.model.domain.cef.Domain;
+import org.onap.dcae.apod.analytics.model.domain.cef.Event;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventListener;
+import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold;
+import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
+import org.onap.dcae.apod.analytics.tca.BaseAnalyticsTCAUnitTest;
+import org.onap.dcae.apod.analytics.tca.processor.TCACEFProcessorContext;
+import org.quartz.Job;
+import org.quartz.JobDataMap;
+import org.quartz.JobDetail;
+import org.quartz.Scheduler;
+import org.quartz.SimpleTrigger;
+import org.quartz.impl.StdSchedulerFactory;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.isA;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Rajiv Singla . Creation Date: 11/9/2016.
+ */
+public class TCAUtilsTest extends BaseAnalyticsTCAUnitTest {
+
+    @Test
+    public void testGetPolicyEventNames() throws Exception {
+
+        final TCAPolicy sampleTCAPolicy = getSampleTCAPolicy();
+        final List<String> eventNames = TCAUtils.getPolicyEventNames(sampleTCAPolicy);
+
+        assertThat("Policy event names must contain vFirewall, vLoadBalancer, virtualVMEventName", eventNames,
+                containsInAnyOrder("Mfvs_eNodeB_RANKPI", "vLoadBalancer", "virtualVMEventName"));
+    }
+
+    @Test
+    public void testGetPolicyEventNamesSupplier() throws Exception {
+        final TCAPolicy sampleTCAPolicy = getSampleTCAPolicy();
+        final Supplier<List<String>> policyEventNamesSupplier = TCAUtils.getPolicyEventNamesSupplier
+                (sampleTCAPolicy);
+        final List<String> eventNames = policyEventNamesSupplier.get();
+        assertThat("Policy event names must contain vFirewall and vLoadBalancer", eventNames,
+                containsInAnyOrder("Mfvs_eNodeB_RANKPI", "vLoadBalancer", "virtualVMEventName"));
+    }
+
+    @Test
+    public void testProcessCEFMessage() throws Exception {
+        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        final TCACEFProcessorContext tcacefProcessorContext = TCAUtils.filterCEFMessage(cefMessageString,
+                getSampleTCAPolicy());
+        assertThat("TCAECEFProcessor Processor Context can continue flag is true", tcacefProcessorContext
+                .canProcessingContinue(), is(true));
+    }
+
+    @Test
+    public void testGetPolicyFRThresholdsTableSupplier() throws Exception {
+        final Table<String, String, List<Threshold>> policyFRThresholdPathTable = TCAUtils
+                .getPolicyEventNameThresholdsTableSupplier(getSampleTCAPolicy()).get();
+
+        final Map<String, List<Threshold>> eNodeBRankpi = policyFRThresholdPathTable.row("Mfvs_eNodeB_RANKPI");
+        final Map<String, List<Threshold>> vLoadBalancer = policyFRThresholdPathTable.row("vLoadBalancer");
+
+        final Set<String> eNodeBRankpiFieldPaths = eNodeBRankpi.keySet();
+        final Set<String> vLoadBalancerPaths = vLoadBalancer.keySet();
+
+        final String receivedBroadcastPacketsFieldPath =
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated";
+        assertThat("eNodeBRankpi threshold field path size must be " +
+                        "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]" +
+                        ".receivedBroadcastPacketsAccumulated",
+                eNodeBRankpiFieldPaths.iterator().next(),
+                is(receivedBroadcastPacketsFieldPath));
+
+        assertThat("vLoadBalancer threshold field path size must be " +
+                        "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]" +
+                        ".receivedBroadcastPacketsAccumulated",
+                vLoadBalancerPaths.iterator().next(),
+                is(receivedBroadcastPacketsFieldPath));
+
+        final List<Threshold> eNodeBRankpiThresholds = policyFRThresholdPathTable.get("Mfvs_eNodeB_RANKPI",
+                receivedBroadcastPacketsFieldPath);
+        final List<Threshold> vLoadBalancerThresholds = policyFRThresholdPathTable.get("vLoadBalancer",
+                receivedBroadcastPacketsFieldPath);
+
+        assertThat("eNodeBRankpi Threshold size must be 3", eNodeBRankpiThresholds.size(), is(3));
+        assertThat("vLoadBalancer Threshold size must be 2", vLoadBalancerThresholds.size(), is(2));
+    }
+
+    @Test
+    public void testGetJsonPathValueWithValidMessageAndPolicy() throws Exception {
+        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        final String jsonPath =
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated";
+        final ImmutableSet<String> fieldPaths = ImmutableSet.of(jsonPath);
+        final Map<String, List<BigDecimal>> jsonPathValueMap = TCAUtils.getJsonPathValue(cefMessageString, fieldPaths);
+        assertThat("Json Path value must match",
+                jsonPathValueMap.get(jsonPath).get(0), is(new BigDecimal(5000)));
+
+    }
+
+    @Test
+    public void testGetJsonPathValueWithValidPath() throws Exception {
+        final String cefMessageString = fromStream(CEF_MESSAGE_JSON_FILE_LOCATION);
+        final String jsonPath = "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].invalid";
+        final ImmutableSet<String> fieldPaths = ImmutableSet.of(jsonPath);
+        final Map<String, List<BigDecimal>> jsonPathValueMap = TCAUtils.getJsonPathValue(cefMessageString, fieldPaths);
+        assertThat("Json path value must be empty", jsonPathValueMap.size(), is(0));
+
+    }
+
+
+    @Test
+    public void testCreateNewTCAVESResponseWithVFControlLoopSchemaType() throws Exception {
+        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);
+
+        MetricsPerEventName metricsPerEventName = mock(MetricsPerEventName.class);
+        when(metricsPerEventName.getThresholds()).thenReturn(getThresholds());
+        when(metricsPerEventName.getPolicyScope()).thenReturn("Test Policy scope");
+        when(tcacefProcessorContext.getMetricsPerEventName()).thenReturn(metricsPerEventName);
+        when(metricsPerEventName.getEventName()).thenReturn("testEventName");
+        when(metricsPerEventName.getControlLoopSchemaType()).thenReturn(ControlLoopSchemaType.VM);
+
+        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());
+        TCAVESResponse tcaVESResponse = TCAUtils.createNewTCAVESResponse(tcacefProcessorContext, "TCA_APP_NAME");
+
+        //TODO :  Add proper assertions, as the usage is not clearly understood
+        assertThat(tcaVESResponse.getClosedLoopControlName(),
+                is("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A"));
+        assertThat(tcaVESResponse.getVersion(), is("Test Version"));
+        assertThat(tcaVESResponse.getPolicyScope(), is("Test Policy scope"));
+        assertNull(tcaVESResponse.getAai().getGenericVNFName());
+        assertNotNull(tcaVESResponse.getAai().getGenericServerName());
+    }
+
+    @Test
+    public void testCreateNewTCAVESResponseWithFunctionalRolevFirewall() throws Exception {
+        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);
+
+        MetricsPerEventName metricsPerEventName = mock(MetricsPerEventName.class);
+        when(metricsPerEventName.getThresholds()).thenReturn(getThresholds());
+        when(metricsPerEventName.getPolicyScope()).thenReturn("Test Policy scope");
+        when(tcacefProcessorContext.getMetricsPerEventName()).thenReturn(metricsPerEventName);
+        when(metricsPerEventName.getEventName()).thenReturn("vFirewall");
+
+        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());
+        TCAVESResponse tcaVESResponse = TCAUtils.createNewTCAVESResponse(tcacefProcessorContext, "TCA_APP_NAME");
+
+        //TODO :  Add proper assertions, as the usage is not clearly understood
+        assertThat(tcaVESResponse.getClosedLoopControlName(),
+                is("CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A"));
+        assertThat(tcaVESResponse.getVersion(), is("Test Version"));
+        assertThat(tcaVESResponse.getPolicyScope(), is("Test Policy scope"));
+        assertNotNull(tcaVESResponse.getAai().getGenericVNFName());
+        assertNull(tcaVESResponse.getAai().getGenericServerName());
+
+    }
+
+    @Rule
+    public ExpectedException expectedIllegalArgumentException = ExpectedException.none();
+
+    @Test
+    public void testCreateNewTCAVESResponseNullFunctionalRole() throws Exception {
+        expectedIllegalArgumentException.expect(MessageProcessingException.class);
+        expectedIllegalArgumentException.expectCause(isA(IllegalArgumentException.class));
+        expectedIllegalArgumentException.expectMessage("No violations metrics. Unable to create VES Response");
+
+        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);
+        TCAVESResponse tcaVESResponse = TCAUtils.createNewTCAVESResponse(tcacefProcessorContext, "TCA_APP_NAME");
+        assertNotNull(tcaVESResponse.getClosedLoopControlName());
+    }
+
+    @Test
+    public void testPrioritizeThresholdViolations() throws Exception {
+
+        Map<String, Threshold> thresholdMap = new HashMap<>();
+        Threshold majorThreshold = mock(Threshold.class);
+        when(majorThreshold.getSeverity()).thenReturn(EventSeverity.MAJOR);
+        thresholdMap.put("MAJOR", majorThreshold);
+
+        Threshold result1 = TCAUtils.prioritizeThresholdViolations(thresholdMap);
+        assertEquals(result1.getSeverity(), EventSeverity.MAJOR);
+
+        Threshold criticalThreshold = mock(Threshold.class);
+        when(criticalThreshold.getSeverity()).thenReturn(EventSeverity.CRITICAL);
+        thresholdMap.put("CRITICAL", criticalThreshold);
+
+        Threshold result2 = TCAUtils.prioritizeThresholdViolations(thresholdMap);
+        assertEquals(result2.getSeverity(), EventSeverity.CRITICAL);
+    }
+
+    @Test
+    public void testCreateViolatedMetrics() throws Exception {
+        TCAPolicy tcaPolicy = getSampleTCAPolicy();
+        Threshold violatedThreshold = getCriticalThreshold();
+        String functionalRole = "Mfvs_eNodeB_RANKPI";
+        MetricsPerEventName result = TCAUtils.createViolatedMetrics(tcaPolicy, violatedThreshold, functionalRole);
+        assertThat(result.getPolicyScope(), is("resource=vFirewall;type=configuration"));
+        assertThat(result.getPolicyName(), is("configuration.dcae.microservice.tca.xml"));
+    }
+
+    @Test
+    public void testCreateViolatedMetricsWrongEventName() throws Exception {
+        expectedIllegalArgumentException.expect(MessageProcessingException.class);
+        expectedIllegalArgumentException.expectCause(isA(IllegalStateException.class));
+        String eventName = "badEventName";
+        expectedIllegalArgumentException.expectMessage("TCA Policy must contain eventName: " + eventName);
+        TCAPolicy tcaPolicy = getSampleTCAPolicy();
+        Threshold violatedThreshold = getCriticalThreshold();
+        TCAUtils.createViolatedMetrics(tcaPolicy, violatedThreshold, eventName);
+    }
+
+    @Test
+    public void testGetDomainAndEventName() {
+        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);
+        EventListener eventListener = mock(EventListener.class);
+        Event event = mock(Event.class);
+        CommonEventHeader commonEventHeader = mock(CommonEventHeader.class);
+
+        Pair<String, String> result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);
+        assertNull(result.getLeft());
+        assertNull(result.getRight());
+
+        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(eventListener);
+        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);
+        assertNull(result.getLeft());
+        assertNull(result.getRight());
+
+        when(eventListener.getEvent()).thenReturn(event);
+        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);
+        assertNull(result.getLeft());
+        assertNull(result.getRight());
+
+        when(event.getCommonEventHeader()).thenReturn(commonEventHeader);
+        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);
+        assertNull(result.getLeft());
+        assertNull(result.getRight());
+
+        when(commonEventHeader.getDomain()).thenReturn(Domain.other);
+        when(commonEventHeader.getEventName()).thenReturn("eventName");
+
+        result = TCAUtils.getDomainAndEventName(tcacefProcessorContext);
+        assertEquals(result.getLeft(), "other");
+        assertEquals(result.getRight(), "eventName");
+
+    }
+
+    @Test
+    public void testComputeThresholdViolationsNotPresent() throws Exception {
+        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);
+        when(tcacefProcessorContext.canProcessingContinue()).thenReturn(true);
+        when(tcacefProcessorContext.getMessage()).thenReturn(getValidCEFMessage());
+
+        when(tcacefProcessorContext.getTCAPolicy()).thenReturn(getSampleTCAPolicy());
+        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());
+
+        TCACEFProcessorContext result = TCAUtils.computeThresholdViolations(tcacefProcessorContext);
+        assertNotNull(result);
+        verify(result, times(0)).setMetricsPerEventName(Mockito.any(MetricsPerEventName.class));
+        assertEquals("Policy must not change", getSampleTCAPolicy(), result.getTCAPolicy());
+    }
+
+    @Test
+    public void testComputeThresholdViolationsPresent() throws Exception {
+        TCACEFProcessorContext tcacefProcessorContext = mock(TCACEFProcessorContext.class);
+        when(tcacefProcessorContext.canProcessingContinue()).thenReturn(true);
+        final String cefMessageString = fromStream(CEF_MESSAGE_WITH_THRESHOLD_VIOLATION_JSON_FILE_LOCATION);
+        when(tcacefProcessorContext.getMessage()).thenReturn(cefMessageString);
+
+        when(tcacefProcessorContext.getTCAPolicy()).thenReturn(getSampleTCAPolicy());
+        when(tcacefProcessorContext.getCEFEventListener()).thenReturn(getCEFEventListener());
+
+        TCACEFProcessorContext result = TCAUtils.computeThresholdViolations(tcacefProcessorContext);
+        verify(result, times(1)).setMetricsPerEventName(Mockito.any(MetricsPerEventName.class));
+
+        assertEquals("Policy must not change", getSampleTCAPolicy(), result.getTCAPolicy());
+    }
+
+
+    @Test
+    public void testCreateTCAPolicyMetricsPerKeyName() throws Exception {
+
+        final Map<String, String> tcaPolicyMap = TCAUtils.filterMapByKeyNamePrefix(getControllerRuntimeArguments(),
+                AnalyticsConstants.TCA_POLICY_METRICS_PER_FUNCTIONAL_ROLE_PATH);
+
+        // determine functional Roles
+        final Map<String, Map<String, String>> functionalRolesMap =
+                TCAUtils.extractSubTree(tcaPolicyMap, 2, 3, AnalyticsConstants.TCA_POLICY_DELIMITER);
+
+        final List<MetricsPerEventName> tcaPolicyMetricsPerEventNameList =
+                TCAUtils.createTCAPolicyMetricsPerEventNameList(functionalRolesMap);
+
+        assertThat("There are two Metrics per function role", 2,
+                is(tcaPolicyMetricsPerEventNameList.size()));
+    }
+
+
+    @Test
+    public void testCreateQuartzScheduler() throws Exception {
+        final Scheduler scheduler = Mockito.mock(Scheduler.class);
+        final StdSchedulerFactory stdSchedulerFactory = Mockito.mock(StdSchedulerFactory.class);
+        when(stdSchedulerFactory.getScheduler()).thenReturn(scheduler);
+        final JobDataMap jobDataMap = Mockito.mock(JobDataMap.class);
+        TCAUtils.createQuartzScheduler(1000, stdSchedulerFactory,
+                "data/properties/quartz-test.properties", jobDataMap, Job.class,
+                "testJob", "testTigger");
+        verify(scheduler, times(1))
+                .scheduleJob(Mockito.any(JobDetail.class), Mockito.any(SimpleTrigger.class));
+    }
+
+
+    @Test
+    public void testCreateTCAAlertStringWhenCEFIsEnabled() throws Exception {
+        final MetricsPerEventName violatedMetrics = createViolatedMetricsPerEventName(EventSeverity.CRITICAL);
+        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);
+        when(processorContext.getMetricsPerEventName()).thenReturn(violatedMetrics);
+        when(processorContext.getCEFEventListener()).thenReturn(getCEFEventListener());
+        final String alertString = TCAUtils.createTCAAlertString(processorContext, "testApp", true);
+        assertTrue(alertString.contains("thresholdCrossingAlertFields"));
+    }
+
+    @Test(expected = MessageProcessingException.class)
+    public void testCreateTCAAlertStringWhenViolatedMetricsNotPresentAndCEFIsEnabled() throws Exception {
+        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);
+        when(processorContext.getMetricsPerEventName()).thenReturn(null);
+        TCAUtils.createTCAAlertString(processorContext, "testApp", true);
+    }
+
+    @Test
+    public void testCreateTCAAlertStringWhenCEFIsDisabled() throws Exception {
+        final MetricsPerEventName violatedMetrics = createViolatedMetricsPerEventName(EventSeverity.MAJOR);
+        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);
+        when(processorContext.getMetricsPerEventName()).thenReturn(violatedMetrics);
+        when(processorContext.getCEFEventListener()).thenReturn(getCEFEventListener());
+        final String alertString = TCAUtils.createTCAAlertString(processorContext, "testApp", false);
+        assertFalse(alertString.contains("thresholdCrossingAlertFields"));
+    }
+
+    @Test(expected = MessageProcessingException.class)
+    public void testCreateTCAAlertStringWhenViolatedMetricsNotPresentAndCEFIsDisabled() throws Exception {
+        TCACEFProcessorContext processorContext = mock(TCACEFProcessorContext.class);
+        when(processorContext.getMetricsPerEventName()).thenReturn(null);
+        TCAUtils.createTCAAlertString(processorContext, "testApp", false);
+    }
+
+    private static MetricsPerEventName createViolatedMetricsPerEventName(EventSeverity severity) {
+        final Threshold violatedThreshold = new Threshold();
+        violatedThreshold.setSeverity(severity);
+        violatedThreshold.setDirection(Direction.GREATER);
+        violatedThreshold.setClosedLoopControlName("violatedThresholdClosedLoopName");
+        violatedThreshold.setActualFieldValue(new BigDecimal(100L));
+        violatedThreshold.setFieldPath("violatedThresholdFieldPath");
+        violatedThreshold.setVersion("violatedThresholdVersion");
+        violatedThreshold.setClosedLoopEventStatus(ClosedLoopEventStatus.ONSET);
+        violatedThreshold.setThresholdValue(50L);
+
+        final MetricsPerEventName violatedMetrics = new MetricsPerEventName();
+        violatedMetrics.setPolicyName("violatePolicyName");
+        violatedMetrics.setPolicyVersion("violatedPolicyVersion");
+        violatedMetrics.setPolicyScope("violatedPolicyScope");
+        violatedMetrics.setEventName("violatedEventName");
+        violatedMetrics.setThresholds(Arrays.asList(violatedThreshold));
+        return violatedMetrics;
+    }
+}
index 4857522..78cbdfa 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration debug="false">\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration debug="false">
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index be600a6..697a0ee 100644 (file)
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-        <artifactId>dcae-analytics</artifactId>\r
-        <version>2.1.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>dcae-analytics-test</artifactId>\r
-    <packaging>jar</packaging>\r
-\r
-    <!-- THIS MODULE CONTAINS COMMON TESTING CODE AND MUST NEVER BE DEPLOYED IN PRODUCTION ENVIRONMENT -->\r
-    <name>DCAE Analytics Test</name>\r
-    <description>Contains common testing code for all DCAE Analytics Modules</description>\r
-\r
-\r
-    <properties>\r
-        <main.basedir>${project.parent.basedir}</main.basedir>\r
-    </properties>\r
-\r
-    <dependencies>\r
-\r
-        <!-- LOGGING -->\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-        </dependency>\r
-\r
-        <!-- UTILITIES -->\r
-        <dependency>\r
-            <groupId>com.google.guava</groupId>\r
-            <artifactId>guava</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.findbugs</groupId>\r
-            <artifactId>jsr305</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.code.gson</groupId>\r
-            <artifactId>gson</artifactId>\r
-        </dependency>\r
-\r
-        <!-- DEPENDENCY INJECTION -->\r
-        <dependency>\r
-            <groupId>com.google.inject</groupId>\r
-            <artifactId>guice</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.inject.extensions</groupId>\r
-            <artifactId>guice-assistedinject</artifactId>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>com.google.inject.extensions</groupId>\r
-            <artifactId>guice-multibindings</artifactId>\r
-        </dependency>\r
-\r
-        <!-- TEST DEPENDENCIES -->\r
-        <dependency>\r
-            <groupId>junit</groupId>\r
-            <artifactId>junit</artifactId>\r
-            <scope>compile</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.mockito</groupId>\r
-            <artifactId>mockito-core</artifactId>\r
-            <scope>compile</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>com.jayway.jsonpath</groupId>\r
-            <artifactId>json-path</artifactId>\r
-            <scope>compile</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>com.jayway.jsonpath</groupId>\r
-            <artifactId>json-path-assert</artifactId>\r
-            <scope>compile</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.skyscreamer</groupId>\r
-            <artifactId>jsonassert</artifactId>\r
-            <scope>compile</scope>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-\r
-</project>\r
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+        <artifactId>dcae-analytics</artifactId>
+        <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dcae-analytics-test</artifactId>
+    <packaging>jar</packaging>
+
+    <!-- THIS MODULE CONTAINS COMMON TESTING CODE AND MUST NEVER BE DEPLOYED IN PRODUCTION ENVIRONMENT -->
+    <name>DCAE Analytics Test</name>
+    <description>Contains common testing code for all DCAE Analytics Modules</description>
+
+
+    <properties>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+    </properties>
+
+    <dependencies>
+
+        <!-- LOGGING -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <!-- UTILITIES -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+
+        <!-- DEPENDENCY INJECTION -->
+        <dependency>
+            <groupId>com.google.inject</groupId>
+            <artifactId>guice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject.extensions</groupId>
+            <artifactId>guice-assistedinject</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject.extensions</groupId>
+            <artifactId>guice-multibindings</artifactId>
+        </dependency>
+
+        <!-- TEST DEPENDENCIES -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path-assert</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.skyscreamer</groupId>
+            <artifactId>jsonassert</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.test;\r
-\r
-import org.json.JSONException;\r
-import org.junit.Assert;\r
-import org.skyscreamer.jsonassert.JSONAssert;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.io.BufferedReader;\r
-import java.io.File;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.InputStreamReader;\r
-import java.io.ObjectOutputStream;\r
-import java.io.OutputStreamWriter;\r
-import java.lang.reflect.Field;\r
-import java.net.URL;\r
-import java.net.URLClassLoader;\r
-import java.nio.charset.Charset;\r
-import java.nio.file.Paths;\r
-import java.security.AccessController;\r
-import java.security.PrivilegedAction;\r
-import java.util.Arrays;\r
-\r
-import static java.nio.file.Files.deleteIfExists;\r
-import static java.nio.file.Files.exists;\r
-\r
-/**\r
- * Base common test class for all DCAE Analytics Test e.g. unit tests, integration test, CDAP tests etc.\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/19/2016.\r
- */\r
-abstract class BaseDCAEAnalyticsCommonTest {\r
-\r
-    protected static final Logger LOG = LoggerFactory.getLogger(BaseDCAEAnalyticsCommonTest.class);\r
-\r
-    /**\r
-     * Asserts if expected Json String and actual Json String contain the same properties ignoring\r
-     * property order. Simple String assertion might fail as property order during serialization and deserialization\r
-     * is generally non-deterministic. Also proper error message are generated more missing or unexpected\r
-     * properties\r
-     *\r
-     * @param expectedJsonString expected Json String\r
-     * @param actualJsonString actual Json String\r
-     * @throws JSONException Json Exception\r
-     */\r
-    public static void assertJson(String expectedJsonString, String actualJsonString) throws JSONException {\r
-        JSONAssert.assertEquals(expectedJsonString, actualJsonString, true);\r
-    }\r
-\r
-    /**\r
-     * Converts given file location to String\r
-     *\r
-     * @param fileLocation location of the file which needs to be converted to String\r
-     * @return Contents of file as string\r
-     * @throws IOException IOException\r
-     */\r
-    public static String fromStream(String fileLocation) throws IOException {\r
-        final InputStream jsonFileInputStream =\r
-                BaseDCAEAnalyticsCommonTest.class.getClassLoader().getResourceAsStream(fileLocation);\r
-        Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);\r
-        try (BufferedReader reader =\r
-                     new BufferedReader(new InputStreamReader(jsonFileInputStream, Charset.forName("UTF-8")))) {\r
-            final StringBuilder result = new StringBuilder();\r
-            final String newLine = System.getProperty("line.separator");\r
-            String line = reader.readLine();\r
-            while (line != null) {\r
-                result.append(line)\r
-                    .append(newLine);\r
-                line = reader.readLine();\r
-            }\r
-            jsonFileInputStream.close();\r
-            return result.toString();\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * Checks if object can be serialized properly\r
-     *\r
-     * @param object input object\r
-     * @param callingClass calling class\r
-     * @throws IOException IOException\r
-     */\r
-    public static void testSerialization(Object object, Class<?> callingClass) throws IOException {\r
-        final URL location = callingClass.getProtectionDomain().getCodeSource().getLocation();\r
-        final File serializedOutputFile =\r
-                new File(location.getPath() + String.format("serialization/%s.ser", object.getClass().getSimpleName()));\r
-\r
-        // Maybe file already try deleting it first\r
-        final boolean deleteIfExists = deleteIfExists(Paths.get(serializedOutputFile.getPath()));\r
-\r
-        if (deleteIfExists) {\r
-            LOG.warn("Previous serialization file was overwritten at location: {}", serializedOutputFile.getPath());\r
-        }\r
-\r
-        boolean mkdirs = true;\r
-        if (!exists(Paths.get(serializedOutputFile.getParentFile().getPath()))) {\r
-            mkdirs = serializedOutputFile.getParentFile().mkdirs();\r
-        }\r
-        if (mkdirs) {\r
-            try (FileOutputStream fileOutputStream = new FileOutputStream(serializedOutputFile);\r
-                 ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) {\r
-                objectOutputStream.writeObject(object);\r
-                LOG.debug("Successfully created serialization file at location: {}", serializedOutputFile.getPath());\r
-            }\r
-        } else {\r
-            throw new IllegalStateException(\r
-                    String.format("Failed to create location to store serialization file: %s",\r
-                            serializedOutputFile));\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Writes Text to Output file\r
-     *\r
-     * @param textFileLocation - location of text file e.g. textfiles/fileName.json\r
-     * @param content           - file content\r
-     * @param callingClass      - calling class\r
-     * @throws IOException      - ioException\r
-     */\r
-    public static void writeToOutputTextFile(String textFileLocation, String content, Class<?> callingClass) throws\r
-            IOException {\r
-        final URL location = callingClass.getProtectionDomain().getCodeSource().getLocation();\r
-        final File fileLocation = new File(location.getPath() + textFileLocation);\r
-\r
-        // Maybe file already try deleting it first\r
-        final boolean deleteIfExists = deleteIfExists(Paths.get(fileLocation.getPath()));\r
-\r
-        if (deleteIfExists) {\r
-            LOG.warn("Previous file will be overwritten at location: {}", fileLocation.getPath());\r
-        }\r
-\r
-        boolean mkdirs = true;\r
-        if (!exists(Paths.get(fileLocation.getParentFile().getPath()))) {\r
-            mkdirs = fileLocation.getParentFile().mkdirs();\r
-        }\r
-        if (mkdirs) {\r
-            try (\r
-                    FileOutputStream fileOutputStream = new FileOutputStream(fileLocation);\r
-                    OutputStreamWriter outputStream =\r
-                            new OutputStreamWriter(fileOutputStream, Charset.forName("UTF-8"))) {\r
-                outputStream.write(content);\r
-                LOG.debug("Successfully created text file at location: {}", fileLocation.getPath());\r
-            }\r
-        } else {\r
-            throw new IllegalStateException(\r
-                    String.format("Failed to create location to store text file: %s", fileLocation));\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * For testing purposes only we may sometime we may want to access private fields of underlying\r
-     * object to confirm the values are setup correctly.\r
-     * <p>\r
-     * This method uses java reflection to get the value to private object in the class\r
-     *\r
-     * @param object            Actual object which has the private field you want to check\r
-     * @param fieldName         Field name in the Actual Object you want to get the value of\r
-     * @param privateFieldClass Type of the private field\r
-     * @param <T>               Class of Actual Object\r
-     * @param <U>               Class of private field\r
-     * @return value of the private field\r
-     */\r
-    public static <T, U> U getPrivateFiledValue(T object, String fieldName, Class<U> privateFieldClass) {\r
-\r
-        final Class<?> objectClass = object.getClass();\r
-        try {\r
-            final Field privateField = objectClass.getDeclaredField(fieldName);\r
-            try {\r
-\r
-                // mark private field to be accessible for testing purposes\r
-                AccessController.doPrivileged(new PrivilegedAction() {\r
-                    @Override\r
-                    public Object run() {\r
-                        privateField.setAccessible(true);\r
-                        return null;\r
-                    }\r
-                });\r
-\r
-\r
-                return privateFieldClass.cast(privateField.get(object));\r
-\r
-            } catch (IllegalAccessException e) {\r
-                LOG.error("Unable to access field: {}", fieldName);\r
-                throw new IllegalStateException(e);\r
-            }\r
-        } catch (NoSuchFieldException e) {\r
-            LOG.error("Unable to locate field name: {} in class: {}", fieldName, objectClass.getSimpleName());\r
-            throw new IllegalStateException(e);\r
-        }\r
-\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Prints classpath jars which are visible inside the class\r
-     *\r
-     * @param classLoader classloader of the calling class\r
-     */\r
-    public static void dumpClasspath(ClassLoader classLoader) {\r
-\r
-        LOG.info("Dumping ClassPath for classloader: {}", classLoader);\r
-\r
-        if (classLoader instanceof URLClassLoader) {\r
-\r
-            URLClassLoader ucl = (URLClassLoader) classLoader;\r
-            LOG.info("\t ==========>>>" + Arrays.toString(ucl.getURLs()));\r
-\r
-        } else {\r
-            LOG.info("\t(cannot display components as not a URLClassLoader)");\r
-        }\r
-\r
-        if (classLoader.getParent() != null) {\r
-            dumpClasspath(classLoader.getParent());\r
-        }\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.test;
+
+import org.json.JSONException;
+import org.junit.Assert;
+import org.skyscreamer.jsonassert.JSONAssert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectOutputStream;
+import java.io.OutputStreamWriter;
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.charset.Charset;
+import java.nio.file.Paths;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+
+import static java.nio.file.Files.deleteIfExists;
+import static java.nio.file.Files.exists;
+
+/**
+ * Base common test class for all DCAE Analytics Test e.g. unit tests, integration test, CDAP tests etc.
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/19/2016.
+ */
+abstract class BaseDCAEAnalyticsCommonTest {
+
+    protected static final Logger LOG = LoggerFactory.getLogger(BaseDCAEAnalyticsCommonTest.class);
+
+    /**
+     * Asserts if expected Json String and actual Json String contain the same properties ignoring
+     * property order. Simple String assertion might fail as property order during serialization and deserialization
+     * is generally non-deterministic. Also proper error message are generated more missing or unexpected
+     * properties
+     *
+     * @param expectedJsonString expected Json String
+     * @param actualJsonString actual Json String
+     * @throws JSONException Json Exception
+     */
+    public static void assertJson(String expectedJsonString, String actualJsonString) throws JSONException {
+        JSONAssert.assertEquals(expectedJsonString, actualJsonString, true);
+    }
+
+    /**
+     * Converts given file location to String
+     *
+     * @param fileLocation location of the file which needs to be converted to String
+     * @return Contents of file as string
+     * @throws IOException IOException
+     */
+    public static String fromStream(String fileLocation) throws IOException {
+        final InputStream jsonFileInputStream =
+                BaseDCAEAnalyticsCommonTest.class.getClassLoader().getResourceAsStream(fileLocation);
+        Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);
+        try (BufferedReader reader =
+                     new BufferedReader(new InputStreamReader(jsonFileInputStream, Charset.forName("UTF-8")))) {
+            final StringBuilder result = new StringBuilder();
+            final String newLine = System.getProperty("line.separator");
+            String line = reader.readLine();
+            while (line != null) {
+                result.append(line)
+                    .append(newLine);
+                line = reader.readLine();
+            }
+            jsonFileInputStream.close();
+            return result.toString();
+        }
+    }
+
+
+    /**
+     * Checks if object can be serialized properly
+     *
+     * @param object input object
+     * @param callingClass calling class
+     * @throws IOException IOException
+     */
+    public static void testSerialization(Object object, Class<?> callingClass) throws IOException {
+        final URL location = callingClass.getProtectionDomain().getCodeSource().getLocation();
+        final File serializedOutputFile =
+                new File(location.getPath() + String.format("serialization/%s.ser", object.getClass().getSimpleName()));
+
+        // Maybe file already try deleting it first
+        final boolean deleteIfExists = deleteIfExists(Paths.get(serializedOutputFile.getPath()));
+
+        if (deleteIfExists) {
+            LOG.warn("Previous serialization file was overwritten at location: {}", serializedOutputFile.getPath());
+        }
+
+        boolean mkdirs = true;
+        if (!exists(Paths.get(serializedOutputFile.getParentFile().getPath()))) {
+            mkdirs = serializedOutputFile.getParentFile().mkdirs();
+        }
+        if (mkdirs) {
+            try (FileOutputStream fileOutputStream = new FileOutputStream(serializedOutputFile);
+                 ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) {
+                objectOutputStream.writeObject(object);
+                LOG.debug("Successfully created serialization file at location: {}", serializedOutputFile.getPath());
+            }
+        } else {
+            throw new IllegalStateException(
+                    String.format("Failed to create location to store serialization file: %s",
+                            serializedOutputFile));
+        }
+    }
+
+    /**
+     * Writes Text to Output file
+     *
+     * @param textFileLocation - location of text file e.g. textfiles/fileName.json
+     * @param content           - file content
+     * @param callingClass      - calling class
+     * @throws IOException      - ioException
+     */
+    public static void writeToOutputTextFile(String textFileLocation, String content, Class<?> callingClass) throws
+            IOException {
+        final URL location = callingClass.getProtectionDomain().getCodeSource().getLocation();
+        final File fileLocation = new File(location.getPath() + textFileLocation);
+
+        // Maybe file already try deleting it first
+        final boolean deleteIfExists = deleteIfExists(Paths.get(fileLocation.getPath()));
+
+        if (deleteIfExists) {
+            LOG.warn("Previous file will be overwritten at location: {}", fileLocation.getPath());
+        }
+
+        boolean mkdirs = true;
+        if (!exists(Paths.get(fileLocation.getParentFile().getPath()))) {
+            mkdirs = fileLocation.getParentFile().mkdirs();
+        }
+        if (mkdirs) {
+            try (
+                    FileOutputStream fileOutputStream = new FileOutputStream(fileLocation);
+                    OutputStreamWriter outputStream =
+                            new OutputStreamWriter(fileOutputStream, Charset.forName("UTF-8"))) {
+                outputStream.write(content);
+                LOG.debug("Successfully created text file at location: {}", fileLocation.getPath());
+            }
+        } else {
+            throw new IllegalStateException(
+                    String.format("Failed to create location to store text file: %s", fileLocation));
+        }
+
+    }
+
+
+    /**
+     * For testing purposes only we may sometime we may want to access private fields of underlying
+     * object to confirm the values are setup correctly.
+     * <p>
+     * This method uses java reflection to get the value to private object in the class
+     *
+     * @param object            Actual object which has the private field you want to check
+     * @param fieldName         Field name in the Actual Object you want to get the value of
+     * @param privateFieldClass Type of the private field
+     * @param <T>               Class of Actual Object
+     * @param <U>               Class of private field
+     * @return value of the private field
+     */
+    public static <T, U> U getPrivateFiledValue(T object, String fieldName, Class<U> privateFieldClass) {
+
+        final Class<?> objectClass = object.getClass();
+        try {
+            final Field privateField = objectClass.getDeclaredField(fieldName);
+            try {
+
+                // mark private field to be accessible for testing purposes
+                AccessController.doPrivileged(new PrivilegedAction() {
+                    @Override
+                    public Object run() {
+                        privateField.setAccessible(true);
+                        return null;
+                    }
+                });
+
+
+                return privateFieldClass.cast(privateField.get(object));
+
+            } catch (IllegalAccessException e) {
+                LOG.error("Unable to access field: {}", fieldName);
+                throw new IllegalStateException(e);
+            }
+        } catch (NoSuchFieldException e) {
+            LOG.error("Unable to locate field name: {} in class: {}", fieldName, objectClass.getSimpleName());
+            throw new IllegalStateException(e);
+        }
+
+
+    }
+
+
+    /**
+     * Prints classpath jars which are visible inside the class
+     *
+     * @param classLoader classloader of the calling class
+     */
+    public static void dumpClasspath(ClassLoader classLoader) {
+
+        LOG.info("Dumping ClassPath for classloader: {}", classLoader);
+
+        if (classLoader instanceof URLClassLoader) {
+
+            URLClassLoader ucl = (URLClassLoader) classLoader;
+            LOG.info("\t ==========>>>" + Arrays.toString(ucl.getURLs()));
+
+        } else {
+            LOG.info("\t(cannot display components as not a URLClassLoader)");
+        }
+
+        if (classLoader.getParent() != null) {
+            dumpClasspath(classLoader.getParent());
+        }
+    }
+
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.test;\r
-\r
-/**\r
- * Base class for all DCAE Analytics Integration Tests\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/6/2016.\r
- */\r
-public abstract class BaseDCAEAnalyticsIT extends BaseDCAEAnalyticsCommonTest {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.test;
+
+/**
+ * Base class for all DCAE Analytics Integration Tests
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/6/2016.
+ */
+public abstract class BaseDCAEAnalyticsIT extends BaseDCAEAnalyticsCommonTest {
+}
@@ -1,29 +1,29 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.test;\r
-\r
-/**\r
- * Base class for all DCAE Analytics Unit Tests\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/6/2016.\r
- */\r
-public abstract class BaseDCAEAnalyticsUnitTest extends BaseDCAEAnalyticsCommonTest {\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.test;
+
+/**
+ * Base class for all DCAE Analytics Unit Tests
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/6/2016.
+ */
+public abstract class BaseDCAEAnalyticsUnitTest extends BaseDCAEAnalyticsCommonTest {
+}
@@ -1,45 +1,45 @@
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.test.annotation;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Inherited;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-/**\r
- * Annotation which can be used to provide test guice modules\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-@Target(ElementType.TYPE)\r
-@Retention(RetentionPolicy.RUNTIME)\r
-@Inherited\r
-public @interface GuiceModules {\r
-\r
-    /**\r
-     * Test Modules\r
-     *\r
-     * @return module classes\r
-     */\r
-    Class<?>[] value();\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.test.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation which can be used to provide test guice modules
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface GuiceModules {
+
+    /**
+     * Test Modules
+     *
+     * @return module classes
+     */
+    Class<?>[] value();
+}
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.test.runner;\r
-\r
-import com.google.inject.Guice;\r
-import com.google.inject.Injector;\r
-import com.google.inject.Module;\r
-import org.junit.runners.BlockJUnit4ClassRunner;\r
-import org.junit.runners.model.InitializationError;\r
-import org.openecomp.dcae.apod.analytics.test.annotation.GuiceModules;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Arrays;\r
-\r
-/**\r
- * A custom Junit Runner which can be used to run Guice Test with custom Test Modules\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 10/20/2016.\r
- */\r
-public class GuiceJUnitRunner extends BlockJUnit4ClassRunner {\r
-\r
-    private static final Logger LOG = LoggerFactory.getLogger(GuiceJUnitRunner.class);\r
-\r
-    private final Injector injector;\r
-\r
-    public GuiceJUnitRunner(Class<?> klass) throws InitializationError {\r
-        super(klass);\r
-        Class<?>[] classes = getModulesFor(klass);\r
-        injector = createInjectorFor(classes);\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns a new fixture for running a test. Injects Guice members\r
-     */\r
-    @Override\r
-    public Object createTest() throws Exception {\r
-        Object obj = super.createTest();\r
-        injector.injectMembers(obj);\r
-        return obj;\r
-    }\r
-\r
-\r
-    /**\r
-     * Creates new Guice Injector and registers Guice test modules\r
-     *\r
-     * @param classes test module classes\r
-     * @return Guice injector with test modules\r
-     * @throws InitializationError\r
-     */\r
-    private Injector createInjectorFor(Class<?>[] classes) throws InitializationError {\r
-        Module[] modules = new Module[classes.length];\r
-        for (int i = 0; i < classes.length; i++) {\r
-            try {\r
-                modules[i] = (Module) classes[i].newInstance();\r
-            } catch (InstantiationException | IllegalAccessException e) {\r
-                throw new InitializationError(e);\r
-            }\r
-        }\r
-        LOG.debug("Creating Junit Test Runner with Guice Test Modules: {}", Arrays.toString(modules));\r
-        return Guice.createInjector(modules);\r
-    }\r
-\r
-    /**\r
-     * Extract user provide test modules from the {@link GuiceModules} annotation\r
-     *\r
-     * @param klass Target class which is running the test\r
-     * @return Guice modules contained passed in annotation of Guice Modules\r
-     * @throws InitializationError\r
-     */\r
-    private Class<?>[] getModulesFor(Class<?> klass) throws InitializationError {\r
-        GuiceModules annotation = klass.getAnnotation(GuiceModules.class);\r
-        if (annotation == null) {\r
-            throw new InitializationError(\r
-                    "Missing @GuiceModules annotation for unit test '" + klass.getName()\r
-                            + "'");\r
-        }\r
-        return annotation.value();\r
-    }\r
-\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.test.runner;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.InitializationError;
+import org.onap.dcae.apod.analytics.test.annotation.GuiceModules;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+
+/**
+ * A custom Junit Runner which can be used to run Guice Test with custom Test Modules
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/20/2016.
+ */
+public class GuiceJUnitRunner extends BlockJUnit4ClassRunner {
+
+    private static final Logger LOG = LoggerFactory.getLogger(GuiceJUnitRunner.class);
+
+    private final Injector injector;
+
+    public GuiceJUnitRunner(Class<?> klass) throws InitializationError {
+        super(klass);
+        Class<?>[] classes = getModulesFor(klass);
+        injector = createInjectorFor(classes);
+    }
+
+
+    /**
+     * Returns a new fixture for running a test. Injects Guice members
+     */
+    @Override
+    public Object createTest() throws Exception {
+        Object obj = super.createTest();
+        injector.injectMembers(obj);
+        return obj;
+    }
+
+
+    /**
+     * Creates new Guice Injector and registers Guice test modules
+     *
+     * @param classes test module classes
+     * @return Guice injector with test modules
+     * @throws InitializationError
+     */
+    private Injector createInjectorFor(Class<?>[] classes) throws InitializationError {
+        Module[] modules = new Module[classes.length];
+        for (int i = 0; i < classes.length; i++) {
+            try {
+                modules[i] = (Module) classes[i].newInstance();
+            } catch (InstantiationException | IllegalAccessException e) {
+                throw new InitializationError(e);
+            }
+        }
+        LOG.debug("Creating Junit Test Runner with Guice Test Modules: {}", Arrays.toString(modules));
+        return Guice.createInjector(modules);
+    }
+
+    /**
+     * Extract user provide test modules from the {@link GuiceModules} annotation
+     *
+     * @param klass Target class which is running the test
+     * @return Guice modules contained passed in annotation of Guice Modules
+     * @throws InitializationError
+     */
+    private Class<?>[] getModulesFor(Class<?> klass) throws InitializationError {
+        GuiceModules annotation = klass.getAnnotation(GuiceModules.class);
+        if (annotation == null) {
+            throw new InitializationError(
+                    "Missing @GuiceModules annotation for unit test '" + klass.getName()
+                            + "'");
+        }
+        return annotation.value();
+    }
+
+}
index 4857522..78cbdfa 100644 (file)
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-<configuration debug="false">\r
-\r
-    <!--\r
-      Disabling some chatty loggers.\r
-    -->\r
-    <logger name="org.apache.commons.beanutils" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper.server" level="ERROR"/>\r
-    <logger name="org.apache.zookeeper" level="ERROR"/>\r
-    <logger name="com.ning" level="WARN"/>\r
-    <logger name="org.apache.spark" level="WARN"/>\r
-    <logger name="org.spark-project" level="WARN"/>\r
-    <logger name="org.apache.hadoop" level="WARN"/>\r
-    <logger name="org.apache.hive" level="WARN"/>\r
-    <logger name="org.quartz.core" level="WARN"/>\r
-    <logger name="org.eclipse.jetty" level="WARN"/>\r
-    <logger name="io.netty.util.internal" level="WARN"/>\r
-\r
-    <logger name="org.apache.twill" level="WARN"/>\r
-    <logger name="co.cask.cdap" level="INFO"/>\r
-    <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>\r
-\r
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">\r
-        <encoder>\r
-            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>\r
-        </encoder>\r
-    </appender>\r
-\r
-    <root level="ERROR">\r
-        <appender-ref ref="Console"/>\r
-    </root>\r
-\r
-\r
-</configuration>\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+<configuration debug="false">
+
+    <!--
+      Disabling some chatty loggers.
+    -->
+    <logger name="org.apache.commons.beanutils" level="ERROR"/>
+    <logger name="org.apache.zookeeper.server" level="ERROR"/>
+    <logger name="org.apache.zookeeper" level="ERROR"/>
+    <logger name="com.ning" level="WARN"/>
+    <logger name="org.apache.spark" level="WARN"/>
+    <logger name="org.spark-project" level="WARN"/>
+    <logger name="org.apache.hadoop" level="WARN"/>
+    <logger name="org.apache.hive" level="WARN"/>
+    <logger name="org.quartz.core" level="WARN"/>
+    <logger name="org.eclipse.jetty" level="WARN"/>
+    <logger name="io.netty.util.internal" level="WARN"/>
+
+    <logger name="org.apache.twill" level="WARN"/>
+    <logger name="co.cask.cdap" level="INFO"/>
+    <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/>
+
+    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="Console"/>
+    </root>
+
+
+</configuration>
+
index cd9e3f7..6ad23d0 100644 (file)
 
     <Match>
         <!-- Ignore warnings for DACE Models project -->
-        <Class name="org.openecomp.dcae.apod.analytics.model.domain.cef.MeasurementsForVfScaling"/>
+        <Class name="org.onap.dcae.apod.analytics.model.domain.cef.MeasurementsForVfScaling"/>
     </Match>
 
     <Match>
         <!-- TCA Application has unconfirmed cast which is provided by CDAP -->
-        <Class name="org.openecomp.dcae.apod.analytics.cdap.tca.TCAAnalyticsApplication"/>
+        <Class name="org.onap.dcae.apod.analytics.cdap.tca.TCAAnalyticsApplication"/>
         <Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
     </Match>
 
     <Match>
         <!-- Ignore Metrics not serializable in DMaaPMRReceiver as metrics is a CDAP interface which is
          not serializable -->
-        <Class name="org.openecomp.dcae.apod.analytics.cdap.plugins.streaming.dmaap.DMaaPMRReceiver"/>
+        <Class name="org.onap.dcae.apod.analytics.cdap.plugins.streaming.dmaap.DMaaPMRReceiver"/>
         <Bug pattern="SE_BAD_FIELD"/>
     </Match>
 
index 7aac262..50eb2c6 100644 (file)
@@ -20,4 +20,4 @@
 
 # List fully qualified names of classes that can be excluded for PMD (PROGRAMMING-MISTAKE-DETECTOR)
 # e.g.
-# org.openecomp.dcae.apod.analytics.tca.worker.TCADMaaPSubscriberWorker=TooManyStaticImports
+# org.onap.dcae.apod.analytics.tca.worker.TCADMaaPSubscriberWorker=TooManyStaticImports
diff --git a/pom.xml b/pom.xml
index 1d4e92e..2f92260 100644 (file)
--- a/pom.xml
+++ b/pom.xml
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ ===============================LICENSE_START======================================\r
-  ~  dcae-analytics\r
-  ~ ================================================================================\r
-  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.\r
-  ~ ================================================================================\r
-  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
-  ~  you may not use this file except in compliance with the License.\r
-  ~   You may obtain a copy of the License at\r
-  ~\r
-  ~          http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~  Unless required by applicable law or agreed to in writing, software\r
-  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  ~  See the License for the specific language governing permissions and\r
-  ~  limitations under the License.\r
-  ~  ============================LICENSE_END===========================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-      <groupId>org.onap.oparent</groupId>\r
-      <artifactId>oparent</artifactId>\r
-      <version>0.1.1</version>\r
-      <relativePath/>\r
-    </parent>\r
-\r
-    <groupId>org.onap.dcaegen2.analytics.tca</groupId>\r
-    <artifactId>dcae-analytics</artifactId>\r
-    <version>2.1.0-SNAPSHOT</version>\r
-    <packaging>pom</packaging>\r
-\r
-    <name>dcaegen2-analytics-tca</name>\r
-    <description>Application Framework for DCAE Analytics</description>\r
-\r
-    <licenses>\r
-        <license>\r
-            <name>The Apache Software License, Version 2.0</name>\r
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\r
-        </license>\r
-    </licenses>\r
-\r
-    <properties>\r
-\r
-        <!-- PROJECT SETTINGS-->\r
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\r
-        <main.basedir>${project.basedir}</main.basedir>\r
-\r
-        <!--TEST SETTINGS -->\r
-        <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>\r
-\r
-        <!-- PROJECT DEPENDENCIES -->\r
-        <cdap.version>4.1.2</cdap.version>\r
-        <cask.common.version>0.7.1</cask.common.version>\r
-        <hadoop.version>2.3.0</hadoop.version>\r
-        <spark.version>1.6.1</spark.version>\r
-        <!-- NOTE: Jackson version should match spark version jackson dependency -->\r
-        <jackson.json.version>2.4.4</jackson.json.version>\r
-        <netty.http.version>0.16.0</netty.http.version>\r
-        <gson.version>2.2.4</gson.version>\r
-        <guava.version>13.0.1</guava.version>\r
-        <guice.version>3.0</guice.version>\r
-        <slf4j.version>1.7.5</slf4j.version>\r
-        <logback.version>1.0.9</logback.version>\r
-        <findbugs.jsr305.version>2.0.1</findbugs.jsr305.version>\r
-        <findbugs.annotations.version>3.0.0</findbugs.annotations.version>\r
-        <lombok.version>1.16.10</lombok.version>\r
-\r
-        <json.path.version>2.2.0</json.path.version>\r
-        <quartz.version>2.2.0</quartz.version>\r
-        <httpclient.version>4.5.2</httpclient.version>\r
-        <commons.lang3.version>3.5</commons.lang3.version>\r
-\r
-\r
-        <!--TESTING DEPENDENCIES -->\r
-        <junit.version>4.12</junit.version>\r
-        <jayway.jsonpath.version>2.2.0</jayway.jsonpath.version>\r
-        <jsonassert.version>1.4.0</jsonassert.version>\r
-        <mockito.version>2.5.7</mockito.version>\r
-        <cucumber.version>1.2.5</cucumber.version>\r
-\r
-\r
-        <!-- PLUGINS VERSIONS -->\r
-        <compiler.plugin.version>3.3</compiler.plugin.version>\r
-        <surefire.plugin.version>2.19.1</surefire.plugin.version>\r
-        <failsafe.plugin.version>2.19.1</failsafe.plugin.version>\r
-        <bundle.plugin.version>2.5.4</bundle.plugin.version>\r
-        <autorun.plugin.version>1.7</autorun.plugin.version>\r
-        <eclipe.plugin.version>2.10</eclipe.plugin.version>\r
-        <findbugs.plugin.version>3.0.2</findbugs.plugin.version>\r
-        <pmd.plugin.version>3.5</pmd.plugin.version>\r
-        <surefire.report.plugin.version>2.19.1</surefire.report.plugin.version>\r
-        <checkstyle.plugin.version>2.16</checkstyle.plugin.version>\r
-        <javadoc.plugin.version>2.10.4</javadoc.plugin.version>\r
-        <source.plugin.version>2.4</source.plugin.version>\r
-        <jar.plugin.version>2.4</jar.plugin.version>\r
-        <lombok.plugin.version>1.16.10.0</lombok.plugin.version>\r
-        <jgitflow.plugin.version>1.0-m5.1</jgitflow.plugin.version>\r
-        <gitcommitid.plugin.version>2.2.3</gitcommitid.plugin.version>\r
-        <maven.site.plugin>3.5.1</maven.site.plugin>\r
-        <jxr.plugin.version>2.5</jxr.plugin.version>\r
-        <project.info.reports.plugin.version>2.7</project.info.reports.plugin.version>\r
-\r
-        <!--PLUGIN SETTINGS -->\r
-        <compiler.source.version>1.7</compiler.source.version>\r
-        <compiler.target.version>1.7</compiler.target.version>\r
-        <unit.test.pattern>**/*Test.java</unit.test.pattern>\r
-        <skip.unit.tests>false</skip.unit.tests>\r
-        <integration.test.pattern>**/*IT.java</integration.test.pattern>\r
-        <skip.integration.tests>true</skip.integration.tests>\r
-        <pmd.violation.buildfail>true</pmd.violation.buildfail>\r
-        <findbugs.failOnError>true</findbugs.failOnError>\r
-        <checkstyle.failOnViolation>true</checkstyle.failOnViolation>\r
-        <checkstyle.file.name>checkstyle.xml</checkstyle.file.name>\r
-        <checkstyle.suppression.file.name>suppressions.xml</checkstyle.suppression.file.name>       \r
-        <dependency.locations.enabled>false</dependency.locations.enabled>\r
-        <nexusproxy>https://nexus.onap.org</nexusproxy>\r
-        <snapshots.path>content/repositories/snapshots/</snapshots.path>\r
-        <releases.path>content/repositories/releases/</releases.path>\r
-        <site.path>\r
-            content/sites/site/org/onap/dcaegen2/analytics/tca/${project.artifactId}/${project.version}\r
-        </site.path>\r
-    </properties>\r
-\r
-    <dependencyManagement>\r
-\r
-        <dependencies>\r
-\r
-            <!-- CDAP -->\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-api</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-etl-api</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-etl-api-spark</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-etl-realtime</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-data-pipeline</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-data-streams</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>org.apache.spark</groupId>\r
-                <artifactId>spark-streaming_2.10</artifactId>\r
-                <version>${spark.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.http</groupId>\r
-                <artifactId>netty-http</artifactId>\r
-                <version>${netty.http.version}</version>\r
-            </dependency>\r
-\r
-\r
-            <dependency>\r
-                <groupId>co.cask.common</groupId>\r
-                <artifactId>common-http</artifactId>\r
-                <version>${cask.common.version}</version>\r
-                <!-- exclude this, otherwise an old version of asm will get pulled in -->\r
-                <exclusions>\r
-                    <exclusion>\r
-                        <groupId>org.ow2.asm</groupId>\r
-                        <artifactId>asm-all</artifactId>\r
-                    </exclusion>\r
-                </exclusions>\r
-            </dependency>\r
-\r
-            <!-- HADOOP -->\r
-            <dependency>\r
-                <groupId>org.apache.hadoop</groupId>\r
-                <artifactId>hadoop-common</artifactId>\r
-                <version>${hadoop.version}</version>\r
-                <scope>provided</scope>\r
-                <exclusions>\r
-                    <exclusion>\r
-                        <groupId>commons-logging</groupId>\r
-                        <artifactId>commons-logging</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>log4j</groupId>\r
-                        <artifactId>log4j</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.slf4j</groupId>\r
-                        <artifactId>slf4j-log4j12</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.apache.avro</groupId>\r
-                        <artifactId>avro</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.apache.zookeeper</groupId>\r
-                        <artifactId>zookeeper</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>guava</artifactId>\r
-                        <groupId>com.google.guava</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>jersey-core</artifactId>\r
-                        <groupId>com.sun.jersey</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>jersey-json</artifactId>\r
-                        <groupId>com.sun.jersey</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>jersey-server</artifactId>\r
-                        <groupId>com.sun.jersey</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>servlet-api</artifactId>\r
-                        <groupId>javax.servlet</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.mortbay.jetty</groupId>\r
-                        <artifactId>jetty</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.mortbay.jetty</groupId>\r
-                        <artifactId>jetty-util</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>jasper-compiler</artifactId>\r
-                        <groupId>tomcat</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>jasper-runtime</artifactId>\r
-                        <groupId>tomcat</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>jsp-api</artifactId>\r
-                        <groupId>javax.servlet.jsp</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>slf4j-api</artifactId>\r
-                        <groupId>org.slf4j</groupId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <artifactId>httpcore</artifactId>\r
-                        <groupId>org.apache.httpcomponents</groupId>\r
-                    </exclusion>\r
-                </exclusions>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>org.apache.hadoop</groupId>\r
-                <artifactId>hadoop-mapreduce-client-core</artifactId>\r
-                <version>${hadoop.version}</version>\r
-                <scope>provided</scope>\r
-                <exclusions>\r
-                    <exclusion>\r
-                        <groupId>asm</groupId>\r
-                        <artifactId>asm</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>io.netty</groupId>\r
-                        <artifactId>netty</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.slf4j</groupId>\r
-                        <artifactId>slf4j-log4j12</artifactId>\r
-                    </exclusion>\r
-                </exclusions>\r
-            </dependency>\r
-\r
-\r
-            <!-- SPARK -->\r
-            <dependency>\r
-                <groupId>org.apache.spark</groupId>\r
-                <artifactId>spark-core_2.10</artifactId>\r
-                <version>${spark.version}</version>\r
-                <scope>provided</scope>\r
-                <exclusions>\r
-                    <exclusion>\r
-                        <groupId>asm</groupId>\r
-                        <artifactId>asm</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.slf4j</groupId>\r
-                        <artifactId>slf4j-log4j12</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>log4j</groupId>\r
-                        <artifactId>log4j</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.apache.hadoop</groupId>\r
-                        <artifactId>hadoop-client</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>com.esotericsoftware.reflectasm</groupId>\r
-                        <artifactId>reflectasm</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.apache.curator</groupId>\r
-                        <artifactId>curator-recipes</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.tachyonproject</groupId>\r
-                        <artifactId>tachyon-client</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.scala-lang</groupId>\r
-                        <artifactId>scala-compiler</artifactId>\r
-                    </exclusion>\r
-                    <exclusion>\r
-                        <groupId>org.eclipse.jetty.orbit</groupId>\r
-                        <artifactId>javax.servlet</artifactId>\r
-                    </exclusion>\r
-                </exclusions>\r
-            </dependency>\r
-\r
-            <!-- LOGGING -->\r
-            <dependency>\r
-                <groupId>org.slf4j</groupId>\r
-                <artifactId>slf4j-api</artifactId>\r
-                <version>${slf4j.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>ch.qos.logback</groupId>\r
-                <artifactId>logback-core</artifactId>\r
-                <version>${logback.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>ch.qos.logback</groupId>\r
-                <artifactId>logback-classic</artifactId>\r
-                <version>${logback.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <!-- UTILITIES -->\r
-            <dependency>\r
-                <groupId>com.google.guava</groupId>\r
-                <artifactId>guava</artifactId>\r
-                <version>${guava.version}</version>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>com.google.code.gson</groupId>\r
-                <artifactId>gson</artifactId>\r
-                <version>${gson.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-            <dependency>\r
-                <groupId>org.apache.commons</groupId>\r
-                <artifactId>commons-lang3</artifactId>\r
-                <version>${commons.lang3.version}</version>\r
-            </dependency>\r
-\r
-            <!-- FIND BUGS -->\r
-            <dependency>\r
-                <groupId>com.google.code.findbugs</groupId>\r
-                <artifactId>jsr305</artifactId>\r
-                <version>${findbugs.jsr305.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-            <dependency>\r
-                <groupId>com.google.code.findbugs</groupId>\r
-                <artifactId>annotations</artifactId>\r
-                <version>${findbugs.annotations.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-            <!-- JACKSON JSON -->\r
-            <dependency>\r
-                <groupId>com.fasterxml.jackson.core</groupId>\r
-                <artifactId>jackson-core</artifactId>\r
-                <version>${jackson.json.version}</version>\r
-            </dependency>\r
-            <dependency>\r
-                <groupId>com.fasterxml.jackson.core</groupId>\r
-                <artifactId>jackson-databind</artifactId>\r
-                <version>${jackson.json.version}</version>\r
-            </dependency>\r
-            <dependency>\r
-                <groupId>com.fasterxml.jackson.core</groupId>\r
-                <artifactId>jackson-annotations</artifactId>\r
-                <version>${jackson.json.version}</version>\r
-            </dependency>\r
-\r
-            <!-- JSON PATH -->\r
-            <dependency>\r
-                <groupId>com.jayway.jsonpath</groupId>\r
-                <artifactId>json-path</artifactId>\r
-                <version>${json.path.version}</version>\r
-            </dependency>\r
-\r
-            <!-- CODE GENERATION -->\r
-            <dependency>\r
-                <groupId>org.projectlombok</groupId>\r
-                <artifactId>lombok</artifactId>\r
-                <version>${lombok.version}</version>\r
-                <scope>provided</scope>\r
-            </dependency>\r
-\r
-\r
-            <!-- DEPENDENCY INJECTION -->\r
-            <dependency>\r
-                <groupId>com.google.inject</groupId>\r
-                <artifactId>guice</artifactId>\r
-                <version>${guice.version}</version>\r
-            </dependency>\r
-            <dependency>\r
-                <groupId>com.google.inject.extensions</groupId>\r
-                <artifactId>guice-assistedinject</artifactId>\r
-                <version>${guice.version}</version>\r
-            </dependency>\r
-            <dependency>\r
-                <groupId>com.google.inject.extensions</groupId>\r
-                <artifactId>guice-multibindings</artifactId>\r
-                <version>${guice.version}</version>\r
-            </dependency>\r
-\r
-            <!-- SCHEDULER -->\r
-            <dependency>\r
-                <groupId>org.quartz-scheduler</groupId>\r
-                <artifactId>quartz</artifactId>\r
-                <version>${quartz.version}</version>\r
-            </dependency>\r
-\r
-            <!-- HTTP CLIENT -->\r
-            <dependency>\r
-                <groupId>org.apache.httpcomponents</groupId>\r
-                <artifactId>httpclient</artifactId>\r
-                <version>${httpclient.version}</version>\r
-            </dependency>\r
-\r
-\r
-            <!-- TEST DEPENDENCIES -->\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>cdap-unit-test</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>test</scope>\r
-                <exclusions>\r
-                    <exclusion>\r
-                        <groupId>co.cask.cdap</groupId>\r
-                        <artifactId>cdap-explore-jdbc</artifactId>\r
-                    </exclusion>\r
-                </exclusions>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>co.cask.cdap</groupId>\r
-                <artifactId>hydrator-test</artifactId>\r
-                <version>${cdap.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>junit</groupId>\r
-                <artifactId>junit</artifactId>\r
-                <version>${junit.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>org.mockito</groupId>\r
-                <artifactId>mockito-core</artifactId>\r
-                <version>${mockito.version}</version>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>com.jayway.jsonpath</groupId>\r
-                <artifactId>json-path-assert</artifactId>\r
-                <version>${jayway.jsonpath.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>org.skyscreamer</groupId>\r
-                <artifactId>jsonassert</artifactId>\r
-                <version>${jsonassert.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-            <!-- BDD TEST DEPENDENCIES -->\r
-            <dependency>\r
-                <groupId>info.cukes</groupId>\r
-                <artifactId>cucumber-java</artifactId>\r
-                <version>${cucumber.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>info.cukes</groupId>\r
-                <artifactId>cucumber-guice</artifactId>\r
-                <version>${cucumber.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-            <dependency>\r
-                <groupId>info.cukes</groupId>\r
-                <artifactId>cucumber-junit</artifactId>\r
-                <version>${cucumber.version}</version>\r
-                <scope>test</scope>\r
-            </dependency>\r
-\r
-        </dependencies>\r
-        \r
-    </dependencyManagement>\r
-\r
-\r
-    <build>\r
-\r
-        <resources>\r
-            <resource>\r
-                <directory>${project.basedir}/src/main/resources</directory>\r
-            </resource>\r
-            <resource>\r
-                <directory>${project.build.directory}/git</directory>\r
-            </resource>\r
-        </resources>\r
-\r
-        <extensions>\r
-            <extension>\r
-                <groupId>org.apache.maven.wagon</groupId>\r
-                <artifactId>wagon-webdav-jackrabbit</artifactId>\r
-                <version>1.0-beta-7</version>\r
-            </extension>\r
-        </extensions>\r
-\r
-        <pluginManagement>\r
-\r
-            <plugins>\r
-\r
-                <!-- COMPILER PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-compiler-plugin</artifactId>\r
-                    <version>${compiler.plugin.version}</version>\r
-                    <configuration>\r
-                        <source>${compiler.target.version}</source>\r
-                        <target>${compiler.source.version}</target>\r
-                    </configuration>\r
-                </plugin>\r
-\r
-                <!-- MAVEN SOURCE PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-source-plugin</artifactId>\r
-                    <version>${source.plugin.version}</version>\r
-                    <configuration>\r
-                        <excludeResources>true</excludeResources>\r
-                    </configuration>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>attach-sources</id>\r
-                            <phase>verify</phase>\r
-                            <goals>\r
-                                <goal>jar-no-fork</goal>\r
-                            </goals>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-\r
-                <!-- MAVEN JAVADOC PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-javadoc-plugin</artifactId>\r
-                    <version>${javadoc.plugin.version}</version>\r
-                    <configuration>\r
-                        <!-- minimize console output messages -->\r
-                        <quiet>true</quiet>\r
-                        <verbose>false</verbose>\r
-                        <useStandardDocletOptions>false</useStandardDocletOptions>\r
-                    </configuration>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>aggregate</id>\r
-                            <phase>site</phase>\r
-                            <goals>\r
-                                <goal>aggregate</goal>\r
-                            </goals>\r
-                        </execution>\r
-                        <execution>\r
-                            <id>attach-javadoc</id>\r
-                            <goals>\r
-                                <goal>jar</goal>\r
-                            </goals>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- MAVEN BUNDLE PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.felix</groupId>\r
-                    <artifactId>maven-bundle-plugin</artifactId>\r
-                    <version>${bundle.plugin.version}</version>\r
-                    <extensions>true</extensions>\r
-                    <configuration>\r
-                        <instructions>\r
-                            <Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>\r
-                            <Embed-Transitive>true</Embed-Transitive>\r
-                            <Embed-Directory>lib</Embed-Directory>\r
-                        </instructions>\r
-                    </configuration>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>Bundling CDAP Jar</id>\r
-                            <phase>package</phase>\r
-                            <goals>\r
-                                <goal>bundle</goal>\r
-                            </goals>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- MAVEN AUTO RUN PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-antrun-plugin</artifactId>\r
-                    <version>${autorun.plugin.version}</version>\r
-                </plugin>\r
-\r
-                <!-- SUREFIRE TEST PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-surefire-plugin</artifactId>\r
-                    <version>${surefire.plugin.version}</version>\r
-                    <configuration>\r
-                        <skipTests>${skip.unit.tests}</skipTests>\r
-                        <argLine>-Xmx2048m -Djava.awt.headless=true -XX:+UseConcMarkSweepGC\r
-                            -XX:OnOutOfMemoryError="kill -9 %p" -XX:+HeapDumpOnOutOfMemoryError\r
-                        </argLine>\r
-                        <redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>\r
-                        <parallel>methods</parallel>\r
-                        <threadCount>8</threadCount>\r
-                        <forkCount>8</forkCount>\r
-                        <reuseForks>true</reuseForks>\r
-                        <reportFormat>xml</reportFormat>\r
-                        <trimStackTrace>false</trimStackTrace>\r
-                        <systemPropertyVariables>\r
-                            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>\r
-                            <logback.configurationFile>\r
-                                ${basedir}/src/test/resources/logback-test.xml\r
-                            </logback.configurationFile>\r
-                            <HADOOP_HOME>${project.build.directory}</HADOOP_HOME>\r
-                        </systemPropertyVariables>\r
-                        <includes>\r
-                            <include>${unit.test.pattern}</include>\r
-                        </includes>\r
-                        <excludes>\r
-                            <exclude>${integration.test.pattern}</exclude>\r
-                        </excludes>\r
-                        <!-- Sets the VM argument line used when unit tests are run. -->\r
-                        <argLine>${surefireArgLine}</argLine>\r
-                    </configuration>\r
-                    <dependencies>\r
-                        <dependency>\r
-                            <groupId>org.apache.maven.surefire</groupId>\r
-                            <artifactId>surefire-junit47</artifactId>\r
-                            <version>${surefire.plugin.version}</version>\r
-                        </dependency>\r
-                    </dependencies>\r
-                </plugin>\r
-\r
-                <!-- FAIL SAFE PLUGIN FOR INTEGRATION TEST -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-failsafe-plugin</artifactId>\r
-                    <version>${failsafe.plugin.version}</version>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>integration-tests</id>\r
-                            <goals>\r
-                                <goal>integration-test</goal>\r
-                                <goal>verify</goal>\r
-                            </goals>\r
-                            <configuration>\r
-                                <skipTests>${skip.integration.tests}</skipTests>\r
-                                <!-- Sets the VM argument line used when integration tests are run. -->\r
-                                <!--suppress MavenModelInspection -->\r
-                                <argLine>${failsafeArgLine}</argLine>\r
-                            </configuration>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.codehaus.mojo</groupId>\r
-                    <artifactId>findbugs-maven-plugin</artifactId>\r
-                    <version>${findbugs.plugin.version}</version>\r
-                    <configuration>\r
-                        <effort>Max</effort>\r
-                        <threshold>Low</threshold>\r
-                        <xmlOutput>true</xmlOutput>\r
-                        <!-- BUILD FAIL ON FINDBUGS ERRORS -->\r
-                        <failOnError>${findbugs.failOnError}</failOnError>\r
-                        <excludeFilterFile>${main.basedir}/findbugs-exclude.xml</excludeFilterFile>\r
-                        <outputDirectory>${project.reporting.outputDirectory}/findbugs</outputDirectory>\r
-                        <findbugsXmlOutputDirectory>${project.reporting.outputDirectory}/findbugs\r
-                        </findbugsXmlOutputDirectory>\r
-                    </configuration>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>analyze-compile</id>\r
-                            <phase>compile</phase>\r
-                            <goals>\r
-                                <goal>check</goal>\r
-                            </goals>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- PMD PLUGIN SETUP -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-pmd-plugin</artifactId>\r
-                    <version>${pmd.plugin.version}</version>\r
-                    <configuration>\r
-                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>\r
-                        <targetJdk>${compiler.target.version}</targetJdk>\r
-                        <linkXRef>false</linkXRef>\r
-                        <excludes>\r
-                            <!-- IGNORE PMD & CPD ANALYTICS MODEL FACADE OBJECTS -->\r
-                            <exclude>**/model/facade/**/*.java</exclude>\r
-                        </excludes>\r
-                        <!-- BUILD FAIL ON PMD VIOLATION -->\r
-                        <failOnViolation>${pmd.violation.buildfail}</failOnViolation>\r
-                        <targetDirectory>${project.reporting.outputDirectory}/pmd</targetDirectory>\r
-                    </configuration>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>pmd-check</id>\r
-                            <goals>\r
-                                <goal>check</goal>\r
-                            </goals>\r
-                            <configuration>\r
-                                <printFailingErrors>true</printFailingErrors>\r
-                                <excludeFromFailureFile>${main.basedir}/pmd-exclude.properties</excludeFromFailureFile>\r
-                            </configuration>\r
-                        </execution>\r
-                        <execution>\r
-                            <id>cpd-check</id>\r
-                            <goals>\r
-                                <goal>cpd-check</goal>\r
-                            </goals>\r
-                            <configuration>\r
-                                <printFailingErrors>true</printFailingErrors>\r
-                                <excludeFromFailureFile>${main.basedir}/cpd-exclude.properties</excludeFromFailureFile>\r
-                            </configuration>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- CHECKSTYLE PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-checkstyle-plugin</artifactId>\r
-                    <version>${checkstyle.plugin.version}</version>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>validate</id>\r
-                            <phase>validate</phase>\r
-                            <configuration>\r
-                                <configLocation>${checkstyle.file.name}</configLocation>\r
-                                <suppressionsLocation>${checkstyle.suppression.file.name}</suppressionsLocation>\r
-                                <encoding>UTF-8</encoding>\r
-                                <consoleOutput>true</consoleOutput>\r
-                                <!-- BUILD FAIL ON CHECKSTYLE VIOLATION -->\r
-                                <failOnViolation>${checkstyle.failOnViolation}</failOnViolation>\r
-                                <includeTestSourceDirectory>true</includeTestSourceDirectory>\r
-                                <outputFile>${project.reporting.outputDirectory}/checkstyle</outputFile>\r
-                            </configuration>\r
-                            <goals>\r
-                                <goal>check</goal>\r
-                            </goals>\r
-                        </execution>\r
-                    </executions>\r
-                    <dependencies>\r
-                        <dependency>\r
-                            <groupId>com.puppycrawl.tools</groupId>\r
-                            <artifactId>checkstyle</artifactId>\r
-                            <version>6.19</version>\r
-                        </dependency>\r
-                    </dependencies>\r
-                </plugin>\r
-\r
-                <!-- ECLIPSE PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-eclipse-plugin</artifactId>\r
-                    <version>${eclipe.plugin.version}</version>\r
-                </plugin>\r
-\r
-\r
-                <!-- LOMBOK PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.projectlombok</groupId>\r
-                    <artifactId>lombok-maven-plugin</artifactId>\r
-                    <version>${lombok.plugin.version}</version>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>delombok</id>\r
-                            <phase>generate-sources</phase>\r
-                            <goals>\r
-                                <goal>delombok</goal>\r
-                            </goals>\r
-                            <configuration>\r
-                                <addOutputDirectory>false</addOutputDirectory>\r
-                                <sourceDirectory>src/main/java</sourceDirectory>\r
-                            </configuration>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- GIT COMMIT ID PLUGIN -->\r
-                <plugin>\r
-                    <groupId>pl.project13.maven</groupId>\r
-                    <artifactId>git-commit-id-plugin</artifactId>\r
-                    <version>${gitcommitid.plugin.version}</version>\r
-                    <executions>\r
-                        <execution>\r
-                            <id>generate-git-properties</id>\r
-                            <phase>generate-resources</phase>\r
-                            <goals>\r
-                                <goal>revision</goal>\r
-                            </goals>\r
-                            <configuration>\r
-                                <failOnNoGitDirectory>false</failOnNoGitDirectory>\r
-                                <generateGitPropertiesFile>true</generateGitPropertiesFile>\r
-                                <generateGitPropertiesFilename>\r
-                                    ${project.build.directory}/git/git.properties\r
-                                </generateGitPropertiesFilename>\r
-                            </configuration>\r
-                        </execution>\r
-                    </executions>\r
-                </plugin>\r
-\r
-                <!-- JGIT FLOW PLUGIN -->\r
-                <plugin>\r
-                    <groupId>external.atlassian.jgitflow</groupId>\r
-                    <artifactId>jgitflow-maven-plugin</artifactId>\r
-                    <version>${jgitflow.plugin.version}</version>\r
-                    <configuration>\r
-                        <!-- Enable this to push to origin using SSH keys -->\r
-                        <enableSshAgent>true</enableSshAgent>\r
-                        <!-- Keep your maven sub modules at the same version as the parent POM -->\r
-                        <autoVersionSubmodules>true</autoVersionSubmodules>\r
-                        <!--\r
-                          Pushing in-development features to origin allows all devs to see what each other\r
-                          are working on\r
-                        -->\r
-                        <pushFeatures>true</pushFeatures>\r
-                        <!--\r
-                          This allows the CI server (e.g. Jenkins) to automatically push new releases to\r
-                          origin; you can then either manually deploy them or, if you are doing Continuous\r
-                          Deployments, auto-deploy them to prod\r
-                        -->\r
-                        <pushReleases>true</pushReleases>\r
-                        <!--\r
-                          Hot Fixes should be pushed to origin as well so that any dev can pick them up\r
-                        -->\r
-                        <pushHotfixes>true</pushHotfixes>\r
-                        <!--\r
-                          Prevents deployments from dev workstations so that they can be done by a CI\r
-                          server\r
-                        -->\r
-                        <flowInitContext>\r
-                            <masterBranchName>master</masterBranchName>\r
-                            <developBranchName>develop</developBranchName>\r
-                            <featureBranchPrefix>feature</featureBranchPrefix>\r
-                            <releaseBranchPrefix>release</releaseBranchPrefix>\r
-                            <hotfixBranchPrefix>hotfix</hotfixBranchPrefix>\r
-                        </flowInitContext>\r
-                        <noDeploy>true</noDeploy>\r
-                    </configuration>\r
-                </plugin>\r
-\r
-                <!-- JAR PLUGIN -->\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-jar-plugin</artifactId>\r
-                    <version>${jar.plugin.version}</version>\r
-                    <configuration>\r
-                        <archive>\r
-                            <manifest>\r
-                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>\r
-                            </manifest>\r
-                            <manifestEntries>\r
-                                <Implementation-Build-Version>${project.version}</Implementation-Build-Version>\r
-                            </manifestEntries>\r
-                        </archive>\r
-                    </configuration>\r
-                </plugin>\r
-\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-site-plugin</artifactId>\r
-                    <version>${maven.site.plugin}</version>\r
-                </plugin>\r
-\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-jxr-plugin</artifactId>\r
-                    <version>${jxr.plugin.version}</version>\r
-                </plugin>\r
-\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-project-info-reports-plugin</artifactId>\r
-                    <version>${project.info.reports.plugin.version}</version>\r
-                    <configuration>\r
-                        <dependencyDetailsEnabled>false</dependencyDetailsEnabled>\r
-                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>\r
-                    </configuration>\r
-                </plugin>\r
-\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-surefire-report-plugin</artifactId>\r
-                    <version>${surefire.report.plugin.version}</version>\r
-                </plugin>\r
-\r
-            </plugins>\r
-\r
-        </pluginManagement>\r
-\r
-        <plugins>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-compiler-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-jar-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-surefire-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-failsafe-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-source-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-javadoc-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-pmd-plugin</artifactId>\r
-            </plugin>\r
-\r
-           <!--  <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>findbugs-maven-plugin</artifactId>\r
-            </plugin>\r
- -->\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-checkstyle-plugin</artifactId>\r
-                <inherited>false</inherited>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>external.atlassian.jgitflow</groupId>\r
-                <artifactId>jgitflow-maven-plugin</artifactId>\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>pl.project13.maven</groupId>\r
-                <artifactId>git-commit-id-plugin</artifactId>\r
-            </plugin>\r
-\r
-        </plugins>\r
-    </build>\r
-\r
-    <reporting>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-site-plugin</artifactId>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-checkstyle-plugin</artifactId>\r
-                <configuration>\r
-                    <configLocation>${checkstyle.file.name}</configLocation>\r
-                    <suppressionsLocation>${checkstyle.suppression.file.name}</suppressionsLocation>\r
-                </configuration>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-jxr-plugin</artifactId>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-pmd-plugin</artifactId>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-project-info-reports-plugin</artifactId>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-surefire-report-plugin</artifactId>\r
-            </plugin>\r
-        </plugins>\r
-    </reporting>\r
-\r
-    <profiles>\r
-        <profile>\r
-            <id>doclint-java8-disable</id>\r
-            <activation>\r
-                <jdk>[1.8,)</jdk>\r
-            </activation>\r
-            <build>\r
-                <plugins>\r
-                    <plugin>\r
-                        <groupId>org.apache.maven.plugins</groupId>\r
-                        <artifactId>maven-javadoc-plugin</artifactId>\r
-                        <configuration>\r
-                            <additionalparam>-Xdoclint:none</additionalparam>\r
-                        </configuration>\r
-                    </plugin>\r
-                </plugins>\r
-            </build>\r
-        </profile>\r
-    </profiles>\r
-\r
-    <modules>\r
-        <module>dcae-analytics-test</module>\r
-        <module>dcae-analytics-model</module>\r
-        <module>dcae-analytics-common</module>\r
-        <module>dcae-analytics-dmaap</module>\r
-        <module>dcae-analytics-tca</module>\r
-        <module>dcae-analytics-cdap-common</module>\r
-        <module>dcae-analytics-cdap-tca</module>\r
-        <module>dcae-analytics-cdap-plugins</module>\r
-        <module>dcae-analytics-it</module>\r
-        <module>dcae-analytics-aai</module>\r
-    </modules>\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ ===============================LICENSE_START======================================
+  ~  dcae-analytics
+  ~ ================================================================================
+  ~    Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
+  ~ ================================================================================
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~
+  ~          http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~  ============================LICENSE_END===========================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+      <groupId>org.onap.oparent</groupId>
+      <artifactId>oparent</artifactId>
+      <version>0.1.1</version>
+      <relativePath/>
+    </parent>
+
+    <groupId>org.onap.dcaegen2.analytics.tca</groupId>
+    <artifactId>dcae-analytics</artifactId>
+    <version>2.1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>dcaegen2-analytics-tca</name>
+    <description>Application Framework for DCAE Analytics</description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+        </license>
+    </licenses>
+
+    <properties>
+
+        <!-- PROJECT SETTINGS-->
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <main.basedir>${project.basedir}</main.basedir>
+
+        <!--TEST SETTINGS -->
+        <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
+
+        <!-- PROJECT DEPENDENCIES -->
+        <cdap.version>4.1.2</cdap.version>
+        <cask.common.version>0.7.1</cask.common.version>
+        <hadoop.version>2.3.0</hadoop.version>
+        <spark.version>1.6.1</spark.version>
+        <!-- NOTE: Jackson version should match spark version jackson dependency -->
+        <jackson.json.version>2.4.4</jackson.json.version>
+        <netty.http.version>0.16.0</netty.http.version>
+        <gson.version>2.2.4</gson.version>
+        <guava.version>13.0.1</guava.version>
+        <guice.version>3.0</guice.version>
+        <slf4j.version>1.7.5</slf4j.version>
+        <logback.version>1.0.9</logback.version>
+        <findbugs.jsr305.version>2.0.1</findbugs.jsr305.version>
+        <findbugs.annotations.version>3.0.0</findbugs.annotations.version>
+        <lombok.version>1.16.10</lombok.version>
+
+        <json.path.version>2.2.0</json.path.version>
+        <quartz.version>2.2.0</quartz.version>
+        <httpclient.version>4.5.2</httpclient.version>
+        <commons.lang3.version>3.5</commons.lang3.version>
+
+
+        <!--TESTING DEPENDENCIES -->
+        <junit.version>4.12</junit.version>
+        <jayway.jsonpath.version>2.2.0</jayway.jsonpath.version>
+        <jsonassert.version>1.4.0</jsonassert.version>
+        <mockito.version>2.5.7</mockito.version>
+        <cucumber.version>1.2.5</cucumber.version>
+
+
+        <!-- PLUGINS VERSIONS -->
+        <compiler.plugin.version>3.3</compiler.plugin.version>
+        <surefire.plugin.version>2.19.1</surefire.plugin.version>
+        <failsafe.plugin.version>2.19.1</failsafe.plugin.version>
+        <bundle.plugin.version>2.5.4</bundle.plugin.version>
+        <autorun.plugin.version>1.7</autorun.plugin.version>
+        <eclipe.plugin.version>2.10</eclipe.plugin.version>
+        <findbugs.plugin.version>3.0.2</findbugs.plugin.version>
+        <pmd.plugin.version>3.5</pmd.plugin.version>
+        <surefire.report.plugin.version>2.19.1</surefire.report.plugin.version>
+        <checkstyle.plugin.version>2.16</checkstyle.plugin.version>
+        <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
+        <source.plugin.version>2.4</source.plugin.version>
+        <jar.plugin.version>2.4</jar.plugin.version>
+        <lombok.plugin.version>1.16.10.0</lombok.plugin.version>
+        <jgitflow.plugin.version>1.0-m5.1</jgitflow.plugin.version>
+        <gitcommitid.plugin.version>2.2.3</gitcommitid.plugin.version>
+        <maven.site.plugin>3.5.1</maven.site.plugin>
+        <jxr.plugin.version>2.5</jxr.plugin.version>
+        <project.info.reports.plugin.version>2.7</project.info.reports.plugin.version>
+
+        <!--PLUGIN SETTINGS -->
+        <compiler.source.version>1.7</compiler.source.version>
+        <compiler.target.version>1.7</compiler.target.version>
+        <unit.test.pattern>**/*Test.java</unit.test.pattern>
+        <skip.unit.tests>false</skip.unit.tests>
+        <integration.test.pattern>**/*IT.java</integration.test.pattern>
+        <skip.integration.tests>true</skip.integration.tests>
+        <pmd.violation.buildfail>true</pmd.violation.buildfail>
+        <findbugs.failOnError>true</findbugs.failOnError>
+        <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
+        <checkstyle.file.name>checkstyle.xml</checkstyle.file.name>
+        <checkstyle.suppression.file.name>suppressions.xml</checkstyle.suppression.file.name>       
+        <dependency.locations.enabled>false</dependency.locations.enabled>
+        <nexusproxy>https://nexus.onap.org</nexusproxy>
+        <snapshots.path>content/repositories/snapshots/</snapshots.path>
+        <releases.path>content/repositories/releases/</releases.path>
+        <site.path>
+            content/sites/site/org/onap/dcaegen2/analytics/tca/${project.artifactId}/${project.version}
+        </site.path>
+    </properties>
+
+    <dependencyManagement>
+
+        <dependencies>
+
+            <!-- CDAP -->
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-api</artifactId>
+                <version>${cdap.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-etl-api</artifactId>
+                <version>${cdap.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-etl-api-spark</artifactId>
+                <version>${cdap.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-etl-realtime</artifactId>
+                <version>${cdap.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-data-pipeline</artifactId>
+                <version>${cdap.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-data-streams</artifactId>
+                <version>${cdap.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.spark</groupId>
+                <artifactId>spark-streaming_2.10</artifactId>
+                <version>${spark.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.http</groupId>
+                <artifactId>netty-http</artifactId>
+                <version>${netty.http.version}</version>
+            </dependency>
+
+
+            <dependency>
+                <groupId>co.cask.common</groupId>
+                <artifactId>common-http</artifactId>
+                <version>${cask.common.version}</version>
+                <!-- exclude this, otherwise an old version of asm will get pulled in -->
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.ow2.asm</groupId>
+                        <artifactId>asm-all</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!-- HADOOP -->
+            <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-common</artifactId>
+                <version>${hadoop.version}</version>
+                <scope>provided</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>commons-logging</groupId>
+                        <artifactId>commons-logging</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>log4j</groupId>
+                        <artifactId>log4j</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.slf4j</groupId>
+                        <artifactId>slf4j-log4j12</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.avro</groupId>
+                        <artifactId>avro</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.zookeeper</groupId>
+                        <artifactId>zookeeper</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>guava</artifactId>
+                        <groupId>com.google.guava</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>jersey-core</artifactId>
+                        <groupId>com.sun.jersey</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>jersey-json</artifactId>
+                        <groupId>com.sun.jersey</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>jersey-server</artifactId>
+                        <groupId>com.sun.jersey</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>servlet-api</artifactId>
+                        <groupId>javax.servlet</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.mortbay.jetty</groupId>
+                        <artifactId>jetty</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.mortbay.jetty</groupId>
+                        <artifactId>jetty-util</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>jasper-compiler</artifactId>
+                        <groupId>tomcat</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>jasper-runtime</artifactId>
+                        <groupId>tomcat</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>jsp-api</artifactId>
+                        <groupId>javax.servlet.jsp</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>slf4j-api</artifactId>
+                        <groupId>org.slf4j</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>httpcore</artifactId>
+                        <groupId>org.apache.httpcomponents</groupId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-mapreduce-client-core</artifactId>
+                <version>${hadoop.version}</version>
+                <scope>provided</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>asm</groupId>
+                        <artifactId>asm</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>io.netty</groupId>
+                        <artifactId>netty</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.slf4j</groupId>
+                        <artifactId>slf4j-log4j12</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+
+            <!-- SPARK -->
+            <dependency>
+                <groupId>org.apache.spark</groupId>
+                <artifactId>spark-core_2.10</artifactId>
+                <version>${spark.version}</version>
+                <scope>provided</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>asm</groupId>
+                        <artifactId>asm</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.slf4j</groupId>
+                        <artifactId>slf4j-log4j12</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>log4j</groupId>
+                        <artifactId>log4j</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.hadoop</groupId>
+                        <artifactId>hadoop-client</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>com.esotericsoftware.reflectasm</groupId>
+                        <artifactId>reflectasm</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.curator</groupId>
+                        <artifactId>curator-recipes</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.tachyonproject</groupId>
+                        <artifactId>tachyon-client</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.scala-lang</groupId>
+                        <artifactId>scala-compiler</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.eclipse.jetty.orbit</groupId>
+                        <artifactId>javax.servlet</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!-- LOGGING -->
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${slf4j.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>ch.qos.logback</groupId>
+                <artifactId>logback-core</artifactId>
+                <version>${logback.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>ch.qos.logback</groupId>
+                <artifactId>logback-classic</artifactId>
+                <version>${logback.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <!-- UTILITIES -->
+            <dependency>
+                <groupId>com.google.guava</groupId>
+                <artifactId>guava</artifactId>
+                <version>${guava.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.google.code.gson</groupId>
+                <artifactId>gson</artifactId>
+                <version>${gson.version}</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-lang3</artifactId>
+                <version>${commons.lang3.version}</version>
+            </dependency>
+
+            <!-- FIND BUGS -->
+            <dependency>
+                <groupId>com.google.code.findbugs</groupId>
+                <artifactId>jsr305</artifactId>
+                <version>${findbugs.jsr305.version}</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>com.google.code.findbugs</groupId>
+                <artifactId>annotations</artifactId>
+                <version>${findbugs.annotations.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <!-- JACKSON JSON -->
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-core</artifactId>
+                <version>${jackson.json.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-databind</artifactId>
+                <version>${jackson.json.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-annotations</artifactId>
+                <version>${jackson.json.version}</version>
+            </dependency>
+
+            <!-- JSON PATH -->
+            <dependency>
+                <groupId>com.jayway.jsonpath</groupId>
+                <artifactId>json-path</artifactId>
+                <version>${json.path.version}</version>
+            </dependency>
+
+            <!-- CODE GENERATION -->
+            <dependency>
+                <groupId>org.projectlombok</groupId>
+                <artifactId>lombok</artifactId>
+                <version>${lombok.version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+
+            <!-- DEPENDENCY INJECTION -->
+            <dependency>
+                <groupId>com.google.inject</groupId>
+                <artifactId>guice</artifactId>
+                <version>${guice.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.inject.extensions</groupId>
+                <artifactId>guice-assistedinject</artifactId>
+                <version>${guice.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.inject.extensions</groupId>
+                <artifactId>guice-multibindings</artifactId>
+                <version>${guice.version}</version>
+            </dependency>
+
+            <!-- SCHEDULER -->
+            <dependency>
+                <groupId>org.quartz-scheduler</groupId>
+                <artifactId>quartz</artifactId>
+                <version>${quartz.version}</version>
+            </dependency>
+
+            <!-- HTTP CLIENT -->
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>${httpclient.version}</version>
+            </dependency>
+
+
+            <!-- TEST DEPENDENCIES -->
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>cdap-unit-test</artifactId>
+                <version>${cdap.version}</version>
+                <scope>test</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>co.cask.cdap</groupId>
+                        <artifactId>cdap-explore-jdbc</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>co.cask.cdap</groupId>
+                <artifactId>hydrator-test</artifactId>
+                <version>${cdap.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${junit.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-core</artifactId>
+                <version>${mockito.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.jayway.jsonpath</groupId>
+                <artifactId>json-path-assert</artifactId>
+                <version>${jayway.jsonpath.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.skyscreamer</groupId>
+                <artifactId>jsonassert</artifactId>
+                <version>${jsonassert.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <!-- BDD TEST DEPENDENCIES -->
+            <dependency>
+                <groupId>info.cukes</groupId>
+                <artifactId>cucumber-java</artifactId>
+                <version>${cucumber.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>info.cukes</groupId>
+                <artifactId>cucumber-guice</artifactId>
+                <version>${cucumber.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>info.cukes</groupId>
+                <artifactId>cucumber-junit</artifactId>
+                <version>${cucumber.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+        </dependencies>
+        
+    </dependencyManagement>
+
+
+    <build>
+
+        <resources>
+            <resource>
+                <directory>${project.basedir}/src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>${project.build.directory}/git</directory>
+            </resource>
+        </resources>
+
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-webdav-jackrabbit</artifactId>
+                <version>1.0-beta-7</version>
+            </extension>
+        </extensions>
+
+        <pluginManagement>
+
+            <plugins>
+
+                <!-- COMPILER PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>${compiler.plugin.version}</version>
+                    <configuration>
+                        <source>${compiler.target.version}</source>
+                        <target>${compiler.source.version}</target>
+                    </configuration>
+                </plugin>
+
+                <!-- MAVEN SOURCE PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-source-plugin</artifactId>
+                    <version>${source.plugin.version}</version>
+                    <configuration>
+                        <excludeResources>true</excludeResources>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>attach-sources</id>
+                            <phase>verify</phase>
+                            <goals>
+                                <goal>jar-no-fork</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+
+                <!-- MAVEN JAVADOC PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>${javadoc.plugin.version}</version>
+                    <configuration>
+                        <!-- minimize console output messages -->
+                        <quiet>true</quiet>
+                        <verbose>false</verbose>
+                        <useStandardDocletOptions>false</useStandardDocletOptions>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>aggregate</id>
+                            <phase>site</phase>
+                            <goals>
+                                <goal>aggregate</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>attach-javadoc</id>
+                            <goals>
+                                <goal>jar</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- MAVEN BUNDLE PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>${bundle.plugin.version}</version>
+                    <extensions>true</extensions>
+                    <configuration>
+                        <instructions>
+                            <Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
+                            <Embed-Transitive>true</Embed-Transitive>
+                            <Embed-Directory>lib</Embed-Directory>
+                        </instructions>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>Bundling CDAP Jar</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>bundle</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- MAVEN AUTO RUN PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>${autorun.plugin.version}</version>
+                </plugin>
+
+                <!-- SUREFIRE TEST PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>${surefire.plugin.version}</version>
+                    <configuration>
+                        <skipTests>${skip.unit.tests}</skipTests>
+                        <argLine>-Xmx2048m -Djava.awt.headless=true -XX:+UseConcMarkSweepGC
+                            -XX:OnOutOfMemoryError="kill -9 %p" -XX:+HeapDumpOnOutOfMemoryError
+                        </argLine>
+                        <redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
+                        <parallel>methods</parallel>
+                        <threadCount>8</threadCount>
+                        <forkCount>8</forkCount>
+                        <reuseForks>true</reuseForks>
+                        <reportFormat>xml</reportFormat>
+                        <trimStackTrace>false</trimStackTrace>
+                        <systemPropertyVariables>
+                            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
+                            <logback.configurationFile>
+                                ${basedir}/src/test/resources/logback-test.xml
+                            </logback.configurationFile>
+                            <HADOOP_HOME>${project.build.directory}</HADOOP_HOME>
+                        </systemPropertyVariables>
+                        <includes>
+                            <include>${unit.test.pattern}</include>
+                        </includes>
+                        <excludes>
+                            <exclude>${integration.test.pattern}</exclude>
+                        </excludes>
+                        <!-- Sets the VM argument line used when unit tests are run. -->
+                        <argLine>${surefireArgLine}</argLine>
+                    </configuration>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.apache.maven.surefire</groupId>
+                            <artifactId>surefire-junit47</artifactId>
+                            <version>${surefire.plugin.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+
+                <!-- FAIL SAFE PLUGIN FOR INTEGRATION TEST -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <version>${failsafe.plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>integration-tests</id>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                            <configuration>
+                                <skipTests>${skip.integration.tests}</skipTests>
+                                <!-- Sets the VM argument line used when integration tests are run. -->
+                                <!--suppress MavenModelInspection -->
+                                <argLine>${failsafeArgLine}</argLine>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>findbugs-maven-plugin</artifactId>
+                    <version>${findbugs.plugin.version}</version>
+                    <configuration>
+                        <effort>Max</effort>
+                        <threshold>Low</threshold>
+                        <xmlOutput>true</xmlOutput>
+                        <!-- BUILD FAIL ON FINDBUGS ERRORS -->
+                        <failOnError>${findbugs.failOnError}</failOnError>
+                        <excludeFilterFile>${main.basedir}/findbugs-exclude.xml</excludeFilterFile>
+                        <outputDirectory>${project.reporting.outputDirectory}/findbugs</outputDirectory>
+                        <findbugsXmlOutputDirectory>${project.reporting.outputDirectory}/findbugs
+                        </findbugsXmlOutputDirectory>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>analyze-compile</id>
+                            <phase>compile</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- PMD PLUGIN SETUP -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-pmd-plugin</artifactId>
+                    <version>${pmd.plugin.version}</version>
+                    <configuration>
+                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
+                        <targetJdk>${compiler.target.version}</targetJdk>
+                        <linkXRef>false</linkXRef>
+                        <excludes>
+                            <!-- IGNORE PMD & CPD ANALYTICS MODEL FACADE OBJECTS -->
+                            <exclude>**/model/facade/**/*.java</exclude>
+                        </excludes>
+                        <!-- BUILD FAIL ON PMD VIOLATION -->
+                        <failOnViolation>${pmd.violation.buildfail}</failOnViolation>
+                        <targetDirectory>${project.reporting.outputDirectory}/pmd</targetDirectory>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>pmd-check</id>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                            <configuration>
+                                <printFailingErrors>true</printFailingErrors>
+                                <excludeFromFailureFile>${main.basedir}/pmd-exclude.properties</excludeFromFailureFile>
+                            </configuration>
+                        </execution>
+                        <execution>
+                            <id>cpd-check</id>
+                            <goals>
+                                <goal>cpd-check</goal>
+                            </goals>
+                            <configuration>
+                                <printFailingErrors>true</printFailingErrors>
+                                <excludeFromFailureFile>${main.basedir}/cpd-exclude.properties</excludeFromFailureFile>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- CHECKSTYLE PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <version>${checkstyle.plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>validate</id>
+                            <phase>validate</phase>
+                            <configuration>
+                                <configLocation>${checkstyle.file.name}</configLocation>
+                                <suppressionsLocation>${checkstyle.suppression.file.name}</suppressionsLocation>
+                                <encoding>UTF-8</encoding>
+                                <consoleOutput>true</consoleOutput>
+                                <!-- BUILD FAIL ON CHECKSTYLE VIOLATION -->
+                                <failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
+                                <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                                <outputFile>${project.reporting.outputDirectory}/checkstyle</outputFile>
+                            </configuration>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>com.puppycrawl.tools</groupId>
+                            <artifactId>checkstyle</artifactId>
+                            <version>6.19</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+
+                <!-- ECLIPSE PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-eclipse-plugin</artifactId>
+                    <version>${eclipe.plugin.version}</version>
+                </plugin>
+
+
+                <!-- LOMBOK PLUGIN -->
+                <plugin>
+                    <groupId>org.projectlombok</groupId>
+                    <artifactId>lombok-maven-plugin</artifactId>
+                    <version>${lombok.plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>delombok</id>
+                            <phase>generate-sources</phase>
+                            <goals>
+                                <goal>delombok</goal>
+                            </goals>
+                            <configuration>
+                                <addOutputDirectory>false</addOutputDirectory>
+                                <sourceDirectory>src/main/java</sourceDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- GIT COMMIT ID PLUGIN -->
+                <plugin>
+                    <groupId>pl.project13.maven</groupId>
+                    <artifactId>git-commit-id-plugin</artifactId>
+                    <version>${gitcommitid.plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>generate-git-properties</id>
+                            <phase>generate-resources</phase>
+                            <goals>
+                                <goal>revision</goal>
+                            </goals>
+                            <configuration>
+                                <failOnNoGitDirectory>false</failOnNoGitDirectory>
+                                <generateGitPropertiesFile>true</generateGitPropertiesFile>
+                                <generateGitPropertiesFilename>
+                                    ${project.build.directory}/git/git.properties
+                                </generateGitPropertiesFilename>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- JGIT FLOW PLUGIN -->
+                <plugin>
+                    <groupId>external.atlassian.jgitflow</groupId>
+                    <artifactId>jgitflow-maven-plugin</artifactId>
+                    <version>${jgitflow.plugin.version}</version>
+                    <configuration>
+                        <!-- Enable this to push to origin using SSH keys -->
+                        <enableSshAgent>true</enableSshAgent>
+                        <!-- Keep your maven sub modules at the same version as the parent POM -->
+                        <autoVersionSubmodules>true</autoVersionSubmodules>
+                        <!--
+                          Pushing in-development features to origin allows all devs to see what each other
+                          are working on
+                        -->
+                        <pushFeatures>true</pushFeatures>
+                        <!--
+                          This allows the CI server (e.g. Jenkins) to automatically push new releases to
+                          origin; you can then either manually deploy them or, if you are doing Continuous
+                          Deployments, auto-deploy them to prod
+                        -->
+                        <pushReleases>true</pushReleases>
+                        <!--
+                          Hot Fixes should be pushed to origin as well so that any dev can pick them up
+                        -->
+                        <pushHotfixes>true</pushHotfixes>
+                        <!--
+                          Prevents deployments from dev workstations so that they can be done by a CI
+                          server
+                        -->
+                        <flowInitContext>
+                            <masterBranchName>master</masterBranchName>
+                            <developBranchName>develop</developBranchName>
+                            <featureBranchPrefix>feature</featureBranchPrefix>
+                            <releaseBranchPrefix>release</releaseBranchPrefix>
+                            <hotfixBranchPrefix>hotfix</hotfixBranchPrefix>
+                        </flowInitContext>
+                        <noDeploy>true</noDeploy>
+                    </configuration>
+                </plugin>
+
+                <!-- JAR PLUGIN -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>${jar.plugin.version}</version>
+                    <configuration>
+                        <archive>
+                            <manifest>
+                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                            </manifest>
+                            <manifestEntries>
+                                <Implementation-Build-Version>${project.version}</Implementation-Build-Version>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>${maven.site.plugin}</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jxr-plugin</artifactId>
+                    <version>${jxr.plugin.version}</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>${project.info.reports.plugin.version}</version>
+                    <configuration>
+                        <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
+                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-report-plugin</artifactId>
+                    <version>${surefire.report.plugin.version}</version>
+                </plugin>
+
+            </plugins>
+
+        </pluginManagement>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+
+           <!--  <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+            </plugin>
+ -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <inherited>false</inherited>
+            </plugin>
+
+            <plugin>
+                <groupId>external.atlassian.jgitflow</groupId>
+                <artifactId>jgitflow-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-site-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <configLocation>${checkstyle.file.name}</configLocation>
+                    <suppressionsLocation>${checkstyle.suppression.file.name}</suppressionsLocation>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jxr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <profiles>
+        <profile>
+            <id>doclint-java8-disable</id>
+            <activation>
+                <jdk>[1.8,)</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-javadoc-plugin</artifactId>
+                        <configuration>
+                            <additionalparam>-Xdoclint:none</additionalparam>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+    <modules>
+        <module>dcae-analytics-test</module>
+        <module>dcae-analytics-model</module>
+        <module>dcae-analytics-common</module>
+        <module>dcae-analytics-dmaap</module>
+        <module>dcae-analytics-tca</module>
+        <module>dcae-analytics-cdap-common</module>
+        <module>dcae-analytics-cdap-tca</module>
+        <module>dcae-analytics-cdap-plugins</module>
+        <module>dcae-analytics-it</module>
+        <module>dcae-analytics-aai</module>
+    </modules>
+
+</project>