TCA: Replace any openecomp reference by onap
[dcaegen2/analytics/tca.git] / dcae-analytics-dmaap / src / test / java / org / onap / dcae / apod / analytics / dmaap / BaseAnalyticsDMaaPUnitTest.java
@@ -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);
+    }
+
+
+}