aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsunil unnava <sunil.unnava@att.com>2018-10-23 10:31:46 -0400
committersunil unnava <sunil.unnava@att.com>2018-10-23 10:33:54 -0400
commit0cb18b0baa2cf750e557262d821bbf2a03326bbe (patch)
tree8ca6880c9cc4f3bfc9d76575ef03ca647863415a /src
parent9775bb11c919b0a8d89d81abf1b1a76bb7592f78 (diff)
update the package name
Issue-ID: DMAAP-858 Change-Id: Ia69621ea6ad2ec2ec525800af2a7d3f73aef82ed Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/HostSelector.java (renamed from src/main/java/com/att/nsa/mr/client/HostSelector.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRBatchingPublisher.java (renamed from src/main/java/com/att/nsa/mr/client/MRBatchingPublisher.java)4
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRClient.java (renamed from src/main/java/com/att/nsa/mr/client/MRClient.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java (renamed from src/main/java/com/att/nsa/mr/client/MRClientBuilders.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRClientFactory.java (renamed from src/main/java/com/att/nsa/mr/client/MRClientFactory.java)12
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRConsumer.java (renamed from src/main/java/com/att/nsa/mr/client/MRConsumer.java)4
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRIdentityManager.java (renamed from src/main/java/com/att/nsa/mr/client/MRIdentityManager.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRPublisher.java (renamed from src/main/java/com/att/nsa/mr/client/MRPublisher.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRTopicManager.java (renamed from src/main/java/com/att/nsa/mr/client/MRTopicManager.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/Clock.java (renamed from src/main/java/com/att/nsa/mr/client/impl/Clock.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/DmaapClientUtil.java (renamed from src/main/java/com/att/nsa/mr/client/impl/DmaapClientUtil.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRBaseClient.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRBatchPublisher.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRClientVersionInfo.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRClientVersionInfo.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRConstants.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRConstants.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRConsumerImpl.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRConsumerImpl.java)12
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRFormat.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRFormat.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRMetaClient.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRMetaClient.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java (renamed from src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java)10
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/response/MRConsumerResponse.java (renamed from src/main/java/com/att/nsa/mr/client/response/MRConsumerResponse.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/response/MRPublisherResponse.java (renamed from src/main/java/com/att/nsa/mr/client/response/MRPublisherResponse.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/dme/client/DefaultLoggingFailoverFaultHandler.java (renamed from src/main/java/com/att/nsa/mr/dme/client/DefaultLoggingFailoverFaultHandler.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandler.java (renamed from src/main/java/com/att/nsa/mr/dme/client/HeaderReplyHandler.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandler.java (renamed from src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/dme/client/PreferredRouteRequestHandler.java (renamed from src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java)4
-rw-r--r--src/main/java/org/onap/dmaap/mr/dme/client/SimpleExampleConsumer.java (renamed from src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/dme/client/SimpleExamplePublisher.java (renamed from src/main/java/com/att/nsa/mr/dme/client/SimpleExamplePublisher.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/logging/MRAppender.java (renamed from src/main/java/com/att/nsa/mr/logging/MRAppender.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/ConsolePublisher.java (renamed from src/main/java/com/att/nsa/mr/test/clients/ConsolePublisher.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/ProtocolTypeConstants.java (renamed from src/main/java/com/att/nsa/mr/test/clients/ProtocolTypeConstants.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/SampleConsumer.java (renamed from src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/SamplePublisher.java (renamed from src/main/java/com/att/nsa/mr/test/clients/SamplePublisher.java)10
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumer.java (renamed from src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerWithReturnResponse.java (renamed from src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerWithReturnResponse.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisher.java (renamed from src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherWithResponse.java (renamed from src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherWithResponse.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/support/MRBatchingPublisherMock.java (renamed from src/main/java/com/att/nsa/mr/test/support/MRBatchingPublisherMock.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/test/support/MRConsumerMock.java (renamed from src/main/java/com/att/nsa/mr/test/support/MRConsumerMock.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/ApiKeyCommand.java (renamed from src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java)10
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/AuthCommand.java (renamed from src/main/java/com/att/nsa/mr/tools/AuthCommand.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/ClusterCommand.java (renamed from src/main/java/com/att/nsa/mr/tools/ClusterCommand.java)4
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/MRCommandContext.java (renamed from src/main/java/com/att/nsa/mr/tools/MRCommandContext.java)4
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/MRTool.java (renamed from src/main/java/com/att/nsa/mr/tools/MRTool.java)4
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/MessageCommand.java (renamed from src/main/java/com/att/nsa/mr/tools/MessageCommand.java)12
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/ToolsUtil.java (renamed from src/main/java/com/att/nsa/mr/tools/ToolsUtil.java)6
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/TopicCommand.java (renamed from src/main/java/com/att/nsa/mr/tools/TopicCommand.java)8
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/TraceCommand.java (renamed from src/main/java/com/att/nsa/mr/tools/TraceCommand.java)2
-rw-r--r--src/main/java/org/onap/dmaap/mr/tools/ValidatorUtil.java (renamed from src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java)4
-rw-r--r--src/test/java/com/att/nsa/mr/client/response/TestRunner.java41
-rw-r--r--src/test/java/com/att/nsa/mr/test/clients/TestRunner.java41
-rw-r--r--src/test/java/com/att/nsa/mr/test/support/TestRunner.java41
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/HostSelectorTest.java (renamed from src/test/java/com/att/nsa/mr/client/HostSelectorTest.java)136
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/client/JUnitTestSuite.java)86
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/MRClientBuildersTest.java (renamed from src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java)496
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/MRClientFactoryTest.java (renamed from src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java)502
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/TestRunner.java (renamed from src/test/java/com/att/nsa/mr/tools/TestRunner.java)82
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/DMaapClientUtilTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/DMaapClientUtilTest.java)2
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRBaseClientTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java)2
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRBatchPublisherTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRBatchPublisherTest.java)2
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRConstantsTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRConstantsTest.java)4
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRConsumerImplTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java)8
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRMetaClientTest.java)258
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRSimplerBatchConsumerTest.java)152
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisherTest.java (renamed from src/test/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisherTest.java)192
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/client/response/JUnitTestSuite.java)86
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java (renamed from src/test/java/com/att/nsa/mr/client/response/MRConsumerResponseTest.java)188
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java (renamed from src/test/java/com/att/nsa/mr/client/response/MRPublisherResponseTest.java)208
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java (renamed from src/test/java/com/att/nsa/mr/client/TestRunner.java)82
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/DefaultLoggingFailoverFaultHandlerTest.java (renamed from src/test/java/com/att/nsa/mr/dme/client/DefaultLoggingFailoverFaultHandlerTest.java)138
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java (renamed from src/test/java/com/att/nsa/mr/dme/client/HeaderReplyHandlerTest.java)158
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/dme/client/JUnitTestSuite.java)88
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java (renamed from src/test/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandlerTest.java)176
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteRequestHandlerTest.java (renamed from src/test/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandlerTest.java)148
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/SimpleExamplePublisherTest.java (renamed from src/test/java/com/att/nsa/mr/dme/client/SimpleExamplePublisherTest.java)136
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/TestRunner.java (renamed from src/test/java/com/att/nsa/mr/logging/TestRunner.java)82
-rw-r--r--src/test/java/org/onap/dmaap/mr/logging/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/logging/JUnitTestSuite.java)86
-rw-r--r--src/test/java/org/onap/dmaap/mr/logging/MRAppenderTest.java (renamed from src/test/java/com/att/nsa/mr/logging/MRAppenderTest.java)368
-rw-r--r--src/test/java/org/onap/dmaap/mr/logging/TestRunner.java (renamed from src/test/java/com/att/nsa/mr/dme/client/TestRunner.java)82
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/ConsolePublisherTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/ConsolePublisherTest.java)110
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/test/clients/JUnitTestSuite.java)90
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/ProtocolTypeConstantsTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/ProtocolTypeConstantsTest.java)122
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/SampleConsumerTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/SampleConsumerTest.java)108
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/SamplePublisherTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/SamplePublisherTest.java)110
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerTest.java)110
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerWithReturnResponseTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerWithReturnResponseTest.java)108
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherTest.java)160
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherWithResponseTest.java (renamed from src/test/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherWithResponseTest.java)136
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/clients/TestRunner.java41
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/support/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/test/support/JUnitTestSuite.java)86
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/support/MRBatchingPublisherMockTest.java (renamed from src/test/java/com/att/nsa/mr/test/support/MRBatchingPublisherMockTest.java)382
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/support/MRConsumerMockTest.java (renamed from src/test/java/com/att/nsa/mr/test/support/MRConsumerMockTest.java)348
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/support/TestRunner.java41
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/ApiKeyCommandTest.java (renamed from src/test/java/com/att/nsa/mr/tools/ApiKeyCommandTest.java)434
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/AuthCommandTest.java (renamed from src/test/java/com/att/nsa/mr/tools/AuthCommandTest.java)226
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/ClusterCommandTest.java (renamed from src/test/java/com/att/nsa/mr/tools/ClusterCommandTest.java)212
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/JUnitTestSuite.java (renamed from src/test/java/com/att/nsa/mr/tools/JUnitTestSuite.java)88
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/MRCommandContextTest.java (renamed from src/test/java/com/att/nsa/mr/tools/MRCommandContextTest.java)330
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/MessageCommandTest.java (renamed from src/test/java/com/att/nsa/mr/tools/MessageCommandTest.java)428
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/TestRunner.java41
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/ToolsUtilTest.java (renamed from src/test/java/com/att/nsa/mr/tools/ToolsUtilTest.java)4
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/TopicCommandTest.java (renamed from src/test/java/com/att/nsa/mr/tools/TopicCommandTest.java)448
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/TraceCommandTest.java (renamed from src/test/java/com/att/nsa/mr/tools/TraceCommandTest.java)204
-rw-r--r--src/test/java/org/onap/dmaap/mr/tools/ValidatorUtilTest.java (renamed from src/test/java/com/att/nsa/mr/tools/ValidatorUtilTest.java)4
103 files changed, 4349 insertions, 4349 deletions
diff --git a/src/main/java/com/att/nsa/mr/client/HostSelector.java b/src/main/java/org/onap/dmaap/mr/client/HostSelector.java
index 63ef404..9bd73f9 100644
--- a/src/main/java/com/att/nsa/mr/client/HostSelector.java
+++ b/src/main/java/org/onap/dmaap/mr/client/HostSelector.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.util.Collection;
import java.util.Iterator;
diff --git a/src/main/java/com/att/nsa/mr/client/MRBatchingPublisher.java b/src/main/java/org/onap/dmaap/mr/client/MRBatchingPublisher.java
index 875b5a3..df440bb 100644
--- a/src/main/java/com/att/nsa/mr/client/MRBatchingPublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRBatchingPublisher.java
@@ -19,12 +19,12 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
/**
* A MR batching publisher is a publisher with additional functionality
diff --git a/src/main/java/com/att/nsa/mr/client/MRClient.java b/src/main/java/org/onap/dmaap/mr/client/MRClient.java
index f3a8f43..8cbf9e0 100644
--- a/src/main/java/com/att/nsa/mr/client/MRClient.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRClient.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import org.slf4j.Logger;
diff --git a/src/main/java/com/att/nsa/mr/client/MRClientBuilders.java b/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java
index 73ef5c4..60e0666 100644
--- a/src/main/java/com/att/nsa/mr/client/MRClientBuilders.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java
@@ -21,7 +21,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.net.MalformedURLException;
import java.util.Collection;
@@ -31,9 +31,9 @@ import java.util.UUID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.att.nsa.mr.client.impl.MRConsumerImpl;
-import com.att.nsa.mr.client.impl.MRMetaClient;
-import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
+import org.onap.dmaap.mr.client.impl.MRConsumerImpl;
+import org.onap.dmaap.mr.client.impl.MRMetaClient;
+import org.onap.dmaap.mr.client.impl.MRSimplerBatchPublisher;
/**
* A collection of builders for various types of MR API clients
diff --git a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java b/src/main/java/org/onap/dmaap/mr/client/MRClientFactory.java
index 689190e..dc9d555 100644
--- a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRClientFactory.java
@@ -21,7 +21,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.io.File;
import java.io.FileNotFoundException;
@@ -37,11 +37,11 @@ import java.util.UUID;
import javax.ws.rs.core.MultivaluedMap;
-import com.att.nsa.mr.client.impl.MRConsumerImpl;
-import com.att.nsa.mr.client.impl.MRMetaClient;
-import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
-import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
-import com.att.nsa.mr.tools.ValidatorUtil;
+import org.onap.dmaap.mr.client.impl.MRConsumerImpl;
+import org.onap.dmaap.mr.client.impl.MRMetaClient;
+import org.onap.dmaap.mr.client.impl.MRSimplerBatchPublisher;
+import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants;
+import org.onap.dmaap.mr.tools.ValidatorUtil;
/**
* A factory for MR clients.<br/>
diff --git a/src/main/java/com/att/nsa/mr/client/MRConsumer.java b/src/main/java/org/onap/dmaap/mr/client/MRConsumer.java
index 444eb7c..b2f7563 100644
--- a/src/main/java/com/att/nsa/mr/client/MRConsumer.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRConsumer.java
@@ -19,11 +19,11 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.io.IOException;
-import com.att.nsa.mr.client.response.MRConsumerResponse;
+import org.onap.dmaap.mr.client.response.MRConsumerResponse;
public interface MRConsumer extends MRClient
{
diff --git a/src/main/java/com/att/nsa/mr/client/MRIdentityManager.java b/src/main/java/org/onap/dmaap/mr/client/MRIdentityManager.java
index 5483761..1905f82 100644
--- a/src/main/java/com/att/nsa/mr/client/MRIdentityManager.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRIdentityManager.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.io.IOException;
diff --git a/src/main/java/com/att/nsa/mr/client/MRPublisher.java b/src/main/java/org/onap/dmaap/mr/client/MRPublisher.java
index 651c548..e900229 100644
--- a/src/main/java/com/att/nsa/mr/client/MRPublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRPublisher.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.io.IOException;
import java.util.Collection;
diff --git a/src/main/java/com/att/nsa/mr/client/MRTopicManager.java b/src/main/java/org/onap/dmaap/mr/client/MRTopicManager.java
index 13524bd..54ca7ec 100644
--- a/src/main/java/com/att/nsa/mr/client/MRTopicManager.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRTopicManager.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client;
+package org.onap.dmaap.mr.client;
import java.io.IOException;
import java.util.Set;
diff --git a/src/main/java/com/att/nsa/mr/client/impl/Clock.java b/src/main/java/org/onap/dmaap/mr/client/impl/Clock.java
index ace791e..6670399 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/Clock.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/Clock.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
public class Clock
{
diff --git a/src/main/java/com/att/nsa/mr/client/impl/DmaapClientUtil.java b/src/main/java/org/onap/dmaap/mr/client/impl/DmaapClientUtil.java
index a3a2ce1..b06290a 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/DmaapClientUtil.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/DmaapClientUtil.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRBaseClient.java
index 76bf5ce..ecea21c 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRBaseClient.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.net.MalformedURLException;
import java.util.Collection;
@@ -41,9 +41,9 @@ import org.slf4j.LoggerFactory;
import com.att.nsa.apiClient.http.CacheUse;
import com.att.nsa.apiClient.http.HttpClient;
-import com.att.nsa.mr.client.MRClient;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
+import org.onap.dmaap.mr.client.MRClient;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants;
public class MRBaseClient extends HttpClient implements MRClient {
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRBatchPublisher.java
index 7d1e396..bcd4403 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRBatchPublisher.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -40,8 +40,8 @@ import org.slf4j.LoggerFactory;
import com.att.nsa.apiClient.http.HttpClient;
import com.att.nsa.apiClient.http.HttpException;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
/**
* This is a batching publisher class that allows the client to publish messages
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRClientVersionInfo.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRClientVersionInfo.java
index bb6299d..ed23918 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRClientVersionInfo.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRClientVersionInfo.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.IOException;
import java.io.InputStream;
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRConstants.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRConstants.java
index cb0fc31..f6d9578 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRConstants.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRConstants.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRConsumerImpl.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRConsumerImpl.java
index bc156ea..a1a52aa 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRConsumerImpl.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRConsumerImpl.java
@@ -19,15 +19,15 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import com.att.aft.dme2.api.DME2Client;
import com.att.aft.dme2.api.DME2Exception;
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
-import com.att.nsa.mr.client.response.MRConsumerResponse;
-import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.response.MRConsumerResponse;
+import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRFormat.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRFormat.java
index 1028adf..538f1e3 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRFormat.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRFormat.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
enum MRFormat
{
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRMetaClient.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRMetaClient.java
index 609540b..9051b99 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRMetaClient.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRMetaClient.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -37,8 +37,8 @@ import org.slf4j.LoggerFactory;
import com.att.nsa.apiClient.credentials.ApiCredential;
import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
-import com.att.nsa.mr.client.MRIdentityManager;
-import com.att.nsa.mr.client.MRTopicManager;
+import org.onap.dmaap.mr.client.MRIdentityManager;
+import org.onap.dmaap.mr.client.MRTopicManager;
public class MRMetaClient extends MRBaseClient implements MRTopicManager, MRIdentityManager
{
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java b/src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java
index 4f44d30..c5eb3ba 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -51,10 +51,10 @@ import org.json.JSONTokener;
import com.att.aft.dme2.api.DME2Client;
import com.att.aft.dme2.api.DME2Exception;
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
-import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
+import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants;
public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingPublisher {
private static final Logger logger = LoggerFactory.getLogger(MRSimplerBatchPublisher.class);
diff --git a/src/main/java/com/att/nsa/mr/client/response/MRConsumerResponse.java b/src/main/java/org/onap/dmaap/mr/client/response/MRConsumerResponse.java
index 102794e..5dc3da0 100644
--- a/src/main/java/com/att/nsa/mr/client/response/MRConsumerResponse.java
+++ b/src/main/java/org/onap/dmaap/mr/client/response/MRConsumerResponse.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.response;
+package org.onap.dmaap.mr.client.response;
public class MRConsumerResponse {
diff --git a/src/main/java/com/att/nsa/mr/client/response/MRPublisherResponse.java b/src/main/java/org/onap/dmaap/mr/client/response/MRPublisherResponse.java
index 96c39d6..f0630be 100644
--- a/src/main/java/com/att/nsa/mr/client/response/MRPublisherResponse.java
+++ b/src/main/java/org/onap/dmaap/mr/client/response/MRPublisherResponse.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.response;
+package org.onap.dmaap.mr.client.response;
/**
* Response for Publisher
diff --git a/src/main/java/com/att/nsa/mr/dme/client/DefaultLoggingFailoverFaultHandler.java b/src/main/java/org/onap/dmaap/mr/dme/client/DefaultLoggingFailoverFaultHandler.java
index 4f04dec..a44d858 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/DefaultLoggingFailoverFaultHandler.java
+++ b/src/main/java/org/onap/dmaap/mr/dme/client/DefaultLoggingFailoverFaultHandler.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.dme.client;
+package org.onap.dmaap.mr.dme.client;
diff --git a/src/main/java/com/att/nsa/mr/dme/client/HeaderReplyHandler.java b/src/main/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandler.java
index 4363902..da0ba62 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/HeaderReplyHandler.java
+++ b/src/main/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandler.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.dme.client;
+package org.onap.dmaap.mr.dme.client;
import java.util.Map;
@@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.util.DME2ExchangeFaultContext;
import com.att.aft.dme2.api.util.DME2ExchangeReplyHandler;
import com.att.aft.dme2.api.util.DME2ExchangeResponseContext;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.impl.MRSimplerBatchPublisher;
diff --git a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java b/src/main/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandler.java
index 2da5ce9..967ccf3 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java
+++ b/src/main/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandler.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.dme.client;
+package org.onap.dmaap.mr.dme.client;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStream;
@@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.util.DME2ExchangeFaultContext;
import com.att.aft.dme2.api.util.DME2ExchangeReplyHandler;
import com.att.aft.dme2.api.util.DME2ExchangeResponseContext;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.impl.MRSimplerBatchPublisher;
public class PreferredRouteReplyHandler implements DME2ExchangeReplyHandler {
private Logger fLog = LoggerFactory.getLogger ( this.getClass().getName () );
diff --git a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java b/src/main/java/org/onap/dmaap/mr/dme/client/PreferredRouteRequestHandler.java
index fbc32a7..4c2e546 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java
+++ b/src/main/java/org/onap/dmaap/mr/dme/client/PreferredRouteRequestHandler.java
@@ -19,14 +19,14 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.dme.client;
+package org.onap.dmaap.mr.dme.client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.util.DME2ExchangeRequestContext;
import com.att.aft.dme2.api.util.DME2ExchangeRequestHandler;
-import com.att.nsa.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRClientFactory;
public class PreferredRouteRequestHandler implements DME2ExchangeRequestHandler {
private Logger logger = LoggerFactory.getLogger(this.getClass().getName());
diff --git a/src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java b/src/main/java/org/onap/dmaap/mr/dme/client/SimpleExampleConsumer.java
index ce0138c..6fb02a5 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java
+++ b/src/main/java/org/onap/dmaap/mr/dme/client/SimpleExampleConsumer.java
@@ -20,7 +20,7 @@
*
*******************************************************************************/
-package com.att.nsa.mr.dme.client;
+package org.onap.dmaap.mr.dme.client;
import java.util.Map;
@@ -29,8 +29,8 @@ import org.slf4j.LoggerFactory;
import javax.ws.rs.core.MultivaluedMap;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
import java.util.List;
diff --git a/src/main/java/com/att/nsa/mr/dme/client/SimpleExamplePublisher.java b/src/main/java/org/onap/dmaap/mr/dme/client/SimpleExamplePublisher.java
index f9e830c..edb3994 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/SimpleExamplePublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/dme/client/SimpleExamplePublisher.java
@@ -20,7 +20,7 @@
*
*******************************************************************************/
-package com.att.nsa.mr.dme.client;
+package org.onap.dmaap.mr.dme.client;
import java.io.IOException;
@@ -33,9 +33,9 @@ import javax.ws.rs.core.MultivaluedMap;
import org.json.JSONObject;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRPublisher.message;
/**
* An example of how to use the Java publisher.
diff --git a/src/main/java/com/att/nsa/mr/logging/MRAppender.java b/src/main/java/org/onap/dmaap/mr/logging/MRAppender.java
index 4bb3e71..8842b14 100644
--- a/src/main/java/com/att/nsa/mr/logging/MRAppender.java
+++ b/src/main/java/org/onap/dmaap/mr/logging/MRAppender.java
@@ -22,7 +22,7 @@
/**
*
*/
-package com.att.nsa.mr.logging;
+package org.onap.dmaap.mr.logging;
import java.io.IOException;
@@ -32,8 +32,8 @@ import org.slf4j.LoggerFactory;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.spi.LoggingEvent;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRPublisher;
/**
* @author author
diff --git a/src/main/java/com/att/nsa/mr/test/clients/ConsolePublisher.java b/src/main/java/org/onap/dmaap/mr/test/clients/ConsolePublisher.java
index 60971c1..62e4cda 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/ConsolePublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/ConsolePublisher.java
@@ -20,7 +20,7 @@
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.io.BufferedReader;
import java.io.IOException;
@@ -32,9 +32,9 @@ import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRPublisher.message;
/**
* A simple publisher that reads from std in, sending each line as a message.
diff --git a/src/main/java/com/att/nsa/mr/test/clients/ProtocolTypeConstants.java b/src/main/java/org/onap/dmaap/mr/test/clients/ProtocolTypeConstants.java
index a4a176e..6ece7f7 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/ProtocolTypeConstants.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/ProtocolTypeConstants.java
@@ -22,7 +22,7 @@
/**
*
*/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
/**
* @author author
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java b/src/main/java/org/onap/dmaap/mr/test/clients/SampleConsumer.java
index 44e5205..1f78be1 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/SampleConsumer.java
@@ -19,15 +19,15 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.util.LinkedList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
public class SampleConsumer {
private SampleConsumer() {
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SamplePublisher.java b/src/main/java/org/onap/dmaap/mr/test/clients/SamplePublisher.java
index 0233dcb..29d7f85 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SamplePublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/SamplePublisher.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.io.IOException;
import java.util.List;
@@ -29,10 +29,10 @@ import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRClientBuilders.PublisherBuilder;
-import com.att.nsa.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRClientBuilders.PublisherBuilder;
+import org.onap.dmaap.mr.client.MRPublisher.message;
public class SamplePublisher {
public static void main ( String[] args ) throws IOException, InterruptedException
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumer.java
index 0e3ee5a..a7f283c 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumer.java
@@ -20,7 +20,7 @@
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.io.File;
import java.io.FileReader;
@@ -30,8 +30,8 @@ import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
public class SimpleExampleConsumer {
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerWithReturnResponse.java b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerWithReturnResponse.java
index 433ab9f..2e514b0 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerWithReturnResponse.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerWithReturnResponse.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.io.File;
import java.io.FileReader;
@@ -29,9 +29,9 @@ import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
-import com.att.nsa.mr.client.response.MRConsumerResponse;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.response.MRConsumerResponse;
public class SimpleExampleConsumerWithReturnResponse {
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisher.java
index 8a6c586..770d916 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisher.java
@@ -20,7 +20,7 @@
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.io.File;
import java.io.FileReader;
@@ -33,9 +33,9 @@ import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRPublisher.message;
/**
* An example of how to use the Java publisher.
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherWithResponse.java b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherWithResponse.java
index 9d179b2..33d1164 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherWithResponse.java
+++ b/src/main/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherWithResponse.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.test.clients;
+package org.onap.dmaap.mr.test.clients;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
@@ -28,9 +28,9 @@ import java.util.List;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
/**
*An example of how to use the Java publisher.
* @author author
diff --git a/src/main/java/com/att/nsa/mr/test/support/MRBatchingPublisherMock.java b/src/main/java/org/onap/dmaap/mr/test/support/MRBatchingPublisherMock.java
index 56bec36..3e64c35 100644
--- a/src/main/java/com/att/nsa/mr/test/support/MRBatchingPublisherMock.java
+++ b/src/main/java/org/onap/dmaap/mr/test/support/MRBatchingPublisherMock.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.test.support;
+package org.onap.dmaap.mr.test.support;
import java.util.Collection;
import java.util.LinkedList;
@@ -28,8 +28,8 @@ import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
/**
* A helper for unit testing systems that use a MRPublisher. When setting
diff --git a/src/main/java/com/att/nsa/mr/test/support/MRConsumerMock.java b/src/main/java/org/onap/dmaap/mr/test/support/MRConsumerMock.java
index c731030..afa36ea 100644
--- a/src/main/java/com/att/nsa/mr/test/support/MRConsumerMock.java
+++ b/src/main/java/org/onap/dmaap/mr/test/support/MRConsumerMock.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.test.support;
+package org.onap.dmaap.mr.test.support;
import java.io.IOException;
import java.util.LinkedList;
@@ -27,8 +27,8 @@ import java.util.List;
import org.slf4j.Logger;
-import com.att.nsa.mr.client.MRConsumer;
-import com.att.nsa.mr.client.response.MRConsumerResponse;
+import org.onap.dmaap.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.response.MRConsumerResponse;
/**
* A helper for unit testing systems that use a MRConsumer. When setting
diff --git a/src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java b/src/main/java/org/onap/dmaap/mr/tools/ApiKeyCommand.java
index df28fc0..a2396d8 100644
--- a/src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/ApiKeyCommand.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
@@ -32,10 +32,10 @@ import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRIdentityManager;
-import com.att.nsa.mr.client.MRClient.MRApiException;
-import com.att.nsa.mr.client.MRIdentityManager.ApiKey;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRIdentityManager;
+import org.onap.dmaap.mr.client.MRClient.MRApiException;
+import org.onap.dmaap.mr.client.MRIdentityManager.ApiKey;
public class ApiKeyCommand implements Command<MRCommandContext>
{
diff --git a/src/main/java/com/att/nsa/mr/tools/AuthCommand.java b/src/main/java/org/onap/dmaap/mr/tools/AuthCommand.java
index 72f226b..26a70f0 100644
--- a/src/main/java/com/att/nsa/mr/tools/AuthCommand.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/AuthCommand.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.PrintStream;
diff --git a/src/main/java/com/att/nsa/mr/tools/ClusterCommand.java b/src/main/java/org/onap/dmaap/mr/tools/ClusterCommand.java
index 5ecaf7c..c4ef5e4 100644
--- a/src/main/java/com/att/nsa/mr/tools/ClusterCommand.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/ClusterCommand.java
@@ -19,13 +19,13 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.PrintStream;
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.impl.MRConsumerImpl;
+import org.onap.dmaap.mr.client.impl.MRConsumerImpl;
public class ClusterCommand implements Command<MRCommandContext>
{
diff --git a/src/main/java/com/att/nsa/mr/tools/MRCommandContext.java b/src/main/java/org/onap/dmaap/mr/tools/MRCommandContext.java
index e512769..5d13b30 100644
--- a/src/main/java/com/att/nsa/mr/tools/MRCommandContext.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/MRCommandContext.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.util.Collection;
import java.util.LinkedList;
@@ -27,7 +27,7 @@ import java.util.LinkedList;
import com.att.nsa.apiClient.http.HttpClient;
import com.att.nsa.apiClient.http.HttpTracer;
import com.att.nsa.cmdtool.CommandContext;
-import com.att.nsa.mr.client.MRClient;
+import org.onap.dmaap.mr.client.MRClient;
public class MRCommandContext implements CommandContext
{
diff --git a/src/main/java/com/att/nsa/mr/tools/MRTool.java b/src/main/java/org/onap/dmaap/mr/tools/MRTool.java
index 7f1effd..a37fa79 100644
--- a/src/main/java/com/att/nsa/mr/tools/MRTool.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/MRTool.java
@@ -19,12 +19,12 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.IOException;
import com.att.nsa.cmdtool.CommandLineTool;
-import com.att.nsa.mr.client.impl.MRClientVersionInfo;
+import org.onap.dmaap.mr.client.impl.MRClientVersionInfo;
public class MRTool extends CommandLineTool<MRCommandContext>
{
diff --git a/src/main/java/com/att/nsa/mr/tools/MessageCommand.java b/src/main/java/org/onap/dmaap/mr/tools/MessageCommand.java
index 54e92ae..5016c95 100644
--- a/src/main/java/com/att/nsa/mr/tools/MessageCommand.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/MessageCommand.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
@@ -31,11 +31,11 @@ import org.slf4j.LoggerFactory;
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
-import com.att.nsa.mr.client.MRClientBuilders.PublisherBuilder;
-import com.att.nsa.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.MRClientBuilders.PublisherBuilder;
+import org.onap.dmaap.mr.client.MRPublisher.message;
public class MessageCommand implements Command<MRCommandContext>
{
diff --git a/src/main/java/com/att/nsa/mr/tools/ToolsUtil.java b/src/main/java/org/onap/dmaap/mr/tools/ToolsUtil.java
index 45b21d1..72e7fbf 100644
--- a/src/main/java/com/att/nsa/mr/tools/ToolsUtil.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/ToolsUtil.java
@@ -18,10 +18,10 @@
* ============LICENSE_END=========================================================
*/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientBuilders.PublisherBuilder;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientBuilders.PublisherBuilder;
public final class ToolsUtil {
diff --git a/src/main/java/com/att/nsa/mr/tools/TopicCommand.java b/src/main/java/org/onap/dmaap/mr/tools/TopicCommand.java
index 4b1151e..278b04f 100644
--- a/src/main/java/com/att/nsa/mr/tools/TopicCommand.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/TopicCommand.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
@@ -32,9 +32,9 @@ import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRTopicManager;
-import com.att.nsa.mr.client.MRTopicManager.TopicInfo;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRTopicManager;
+import org.onap.dmaap.mr.client.MRTopicManager.TopicInfo;
public class TopicCommand implements Command<MRCommandContext>
{
diff --git a/src/main/java/com/att/nsa/mr/tools/TraceCommand.java b/src/main/java/org/onap/dmaap/mr/tools/TraceCommand.java
index 0489172..95edf5b 100644
--- a/src/main/java/com/att/nsa/mr/tools/TraceCommand.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/TraceCommand.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.io.PrintStream;
import java.net.URI;
diff --git a/src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java b/src/main/java/org/onap/dmaap/mr/tools/ValidatorUtil.java
index 0539582..cdba1e0 100644
--- a/src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java
+++ b/src/main/java/org/onap/dmaap/mr/tools/ValidatorUtil.java
@@ -19,11 +19,11 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import java.util.Properties;
-import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
+import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants;
public class ValidatorUtil {
diff --git a/src/test/java/com/att/nsa/mr/client/response/TestRunner.java b/src/test/java/com/att/nsa/mr/client/response/TestRunner.java
deleted file mode 100644
index f2abadc..0000000
--- a/src/test/java/com/att/nsa/mr/client/response/TestRunner.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client.response;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/TestRunner.java b/src/test/java/com/att/nsa/mr/test/clients/TestRunner.java
deleted file mode 100644
index 39bbbb3..0000000
--- a/src/test/java/com/att/nsa/mr/test/clients/TestRunner.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
diff --git a/src/test/java/com/att/nsa/mr/test/support/TestRunner.java b/src/test/java/com/att/nsa/mr/test/support/TestRunner.java
deleted file mode 100644
index 4e8651c..0000000
--- a/src/test/java/com/att/nsa/mr/test/support/TestRunner.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.support;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
diff --git a/src/test/java/com/att/nsa/mr/client/HostSelectorTest.java b/src/test/java/org/onap/dmaap/mr/client/HostSelectorTest.java
index fd6dee8..ecc4b51 100644
--- a/src/test/java/com/att/nsa/mr/client/HostSelectorTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/HostSelectorTest.java
@@ -1,68 +1,68 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-
-public class HostSelectorTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
-
- @Test
- public void testSelectBaseHost() {
-
- HostSelector selector = new HostSelector("host");
-
- selector.selectBaseHost();
- assertTrue(true);
-
-
- }
-
- @Test
- public void testReportReachabilityProblem() {
-
- HostSelector selector = new HostSelector("host");
-
- selector.reportReachabilityProblem(100, null);
- assertTrue(true);
-
-
- }
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+
+public class HostSelectorTest {
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+
+ @Test
+ public void testSelectBaseHost() {
+
+ HostSelector selector = new HostSelector("host");
+
+ selector.selectBaseHost();
+ assertTrue(true);
+
+
+ }
+
+ @Test
+ public void testReportReachabilityProblem() {
+
+ HostSelector selector = new HostSelector("host");
+
+ selector.reportReachabilityProblem(100, null);
+ assertTrue(true);
+
+
+ }
+}
+
diff --git a/src/test/java/com/att/nsa/mr/client/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/client/JUnitTestSuite.java
index 095e1d8..b791b51 100644
--- a/src/test/java/com/att/nsa/mr/client/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/client/JUnitTestSuite.java
@@ -1,43 +1,43 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ HostSelectorTest.class, MRClientBuildersTest.class, MRClientFactoryTest.class})
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ HostSelectorTest.class, MRClientBuildersTest.class, MRClientFactoryTest.class})
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java b/src/test/java/org/onap/dmaap/mr/client/MRClientBuildersTest.java
index 9a0a3ce..388a91c 100644
--- a/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/MRClientBuildersTest.java
@@ -1,248 +1,248 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright © 2018 IBM.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRClient;
-import com.att.nsa.mr.client.MRClientBuilders;
-
-public class MRClientBuildersTest {
-
- private Collection<String> hostSet = new ArrayList<String>();
- private MRClientBuilders.ConsumerBuilder builder = null;
- private MRClientBuilders.PublisherBuilder pBuilder = null;
- private String[] hostArray = new String[10];
-
- @Before
- public void setUp() throws Exception {
-
- for (int i = 0; i < 10; i++) {
- hostSet.add("host" + (i + 1));
- hostArray[i] = "host" + (i + 1);
- }
-
- builder = new MRClientBuilders.ConsumerBuilder();
-
- pBuilder = new MRClientBuilders.PublisherBuilder();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testUsingHosts() {
-
- builder.usingHosts("hostList");
- assertTrue(true);
-
- }
-
- @Test
- public void testUsingHosts2() {
-
- builder.usingHosts(hostSet);
- assertTrue(true);
-
- }
-
- @Test
- public void testOnTopic() {
-
- builder.onTopic("testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testKnownAs() {
-
- builder.knownAs("CG1", "23");
- assertTrue(true);
-
- }
-
- @Test
- public void testAuthenticatedBy() {
-
- builder.authenticatedBy("apikey", "apisecret");
- assertTrue(true);
-
- }
-
- @Test
- public void testWaitAtServer() {
-
- builder.waitAtServer(100);
- assertTrue(true);
-
- }
-
- @Test
- public void testReceivingAtMost() {
-
- builder.receivingAtMost(100);
- assertTrue(true);
-
- }
-
- @Test
- public void testWithServerSideFilter() {
-
- builder.withServerSideFilter("filter");
- assertTrue(true);
-
- }
-
- @Test
- public void testBuild() {
-
- try {
-
- builder.build();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- }
-
- @Test
- public void testUsingHosts3() {
-
- pBuilder.usingHosts("testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testUsingHosts4() {
-
- pBuilder.usingHosts(hostArray);
- assertTrue(true);
-
- }
-
- @Test
- public void testUsingHosts5() {
-
- pBuilder.usingHosts(hostSet);
- assertTrue(true);
-
- }
-
- @Test
- public void testOnTopic2() {
-
- pBuilder.onTopic("testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testLimitBatch() {
-
- pBuilder.limitBatch(100, 10);
- assertTrue(true);
-
- }
-
- @Test
- public void testWithCompresion() {
-
- pBuilder.withCompresion();
- assertTrue(true);
-
- }
-
- @Test
- public void testWithoutCompresion() {
-
- pBuilder.withoutCompresion();
- assertTrue(true);
-
- }
-
- @Test
- public void testEnableCompresion() {
-
- pBuilder.enableCompresion(true);
- assertTrue(true);
-
- }
-
- @Test
- public void testAuthenticatedBy2() {
-
- pBuilder.authenticatedBy("apikey", "apisecret");
- assertTrue(true);
-
- }
-
- @Test
- public void testBuild2() {
-
- try {
-
- pBuilder.build();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- }
-
- @Test
- public void test$testInject() {
-
- try {
-
- MRClientBuilders.$testInject(builder.build());
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- }
-
- @Test
- public void test$testInject2() {
-
- try {
-
- MRClientBuilders.$testInject(pBuilder.build());
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRClient;
+import org.onap.dmaap.mr.client.MRClientBuilders;
+
+public class MRClientBuildersTest {
+
+ private Collection<String> hostSet = new ArrayList<String>();
+ private MRClientBuilders.ConsumerBuilder builder = null;
+ private MRClientBuilders.PublisherBuilder pBuilder = null;
+ private String[] hostArray = new String[10];
+
+ @Before
+ public void setUp() throws Exception {
+
+ for (int i = 0; i < 10; i++) {
+ hostSet.add("host" + (i + 1));
+ hostArray[i] = "host" + (i + 1);
+ }
+
+ builder = new MRClientBuilders.ConsumerBuilder();
+
+ pBuilder = new MRClientBuilders.PublisherBuilder();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testUsingHosts() {
+
+ builder.usingHosts("hostList");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testUsingHosts2() {
+
+ builder.usingHosts(hostSet);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testOnTopic() {
+
+ builder.onTopic("testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testKnownAs() {
+
+ builder.knownAs("CG1", "23");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAuthenticatedBy() {
+
+ builder.authenticatedBy("apikey", "apisecret");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testWaitAtServer() {
+
+ builder.waitAtServer(100);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testReceivingAtMost() {
+
+ builder.receivingAtMost(100);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testWithServerSideFilter() {
+
+ builder.withServerSideFilter("filter");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testBuild() {
+
+ try {
+
+ builder.build();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ }
+
+ @Test
+ public void testUsingHosts3() {
+
+ pBuilder.usingHosts("testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testUsingHosts4() {
+
+ pBuilder.usingHosts(hostArray);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testUsingHosts5() {
+
+ pBuilder.usingHosts(hostSet);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testOnTopic2() {
+
+ pBuilder.onTopic("testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testLimitBatch() {
+
+ pBuilder.limitBatch(100, 10);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testWithCompresion() {
+
+ pBuilder.withCompresion();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testWithoutCompresion() {
+
+ pBuilder.withoutCompresion();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testEnableCompresion() {
+
+ pBuilder.enableCompresion(true);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAuthenticatedBy2() {
+
+ pBuilder.authenticatedBy("apikey", "apisecret");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testBuild2() {
+
+ try {
+
+ pBuilder.build();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ }
+
+ @Test
+ public void test$testInject() {
+
+ try {
+
+ MRClientBuilders.$testInject(builder.build());
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ }
+
+ @Test
+ public void test$testInject2() {
+
+ try {
+
+ MRClientBuilders.$testInject(pBuilder.build());
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ }
+}
diff --git a/src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java b/src/test/java/org/onap/dmaap/mr/client/MRClientFactoryTest.java
index 7ea091b..0d151b9 100644
--- a/src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/MRClientFactoryTest.java
@@ -1,252 +1,252 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright © 2018 IBM.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRClient;
-import com.att.nsa.mr.client.MRClientBuilders;
-import com.att.nsa.mr.client.MRClientFactory;
-
-public class MRClientFactoryTest {
-
- private Collection<String> hostSet = new ArrayList<String>();
-
- private String[] hostArray = new String[10];
-
- @Before
- public void setUp() throws Exception {
-
- for (int i = 0; i < 10; i++) {
- hostSet.add("host" + (i + 1));
- hostArray[i] = "host" + (i + 1);
- }
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testCreateConsumer() {
-
- MRClientFactory.createConsumer("hostList hostList2", "testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer2() {
-
- MRClientFactory.createConsumer(hostSet, "testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer3() {
-
- MRClientFactory.createConsumer(hostSet, "testTopic", "filter");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer4() {
-
- MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer5() {
-
- MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100);
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer6() {
-
- MRClientFactory.createConsumer("hostList", "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer7() {
-
- MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateSimplePublisher() {
-
- MRClientFactory.createSimplePublisher("hostList", "testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher1() {
-
- MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10);
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher2() {
-
- MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10, true);
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher3() {
-
- MRClientFactory.createBatchingPublisher(hostArray, "testTopic", 100, 10, true);
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher4() {
-
- MRClientFactory.createBatchingPublisher(hostSet, "testTopic", 100, 10, true);
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher5() {
-
- MRClientFactory.createBatchingPublisher("host", "testTopic", "username", "password", 100, 10, true,
- "protocolFlag");
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher6() {
-
- try {
- MRClientFactory.createBatchingPublisher("/producer");
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateBatchingPublisher7() {
-
- try {
- MRClientFactory.createBatchingPublisher("/producer", true);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateIdentityManager() {
-
- MRClientFactory.createIdentityManager(hostSet, "apikey", "apisecret");
-
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateTopicManager() {
-
- MRClientFactory.createTopicManager(hostSet, "apikey", "apisecret");
-
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer8() {
-
- try {
- MRClientFactory.createConsumer("/consumer");
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer9() {
-
- MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", "protocolFlag",
- "/consumer", 1, 2);
-
- assertTrue(true);
-
- }
-
- @Test
- public void testCreateConsumer10() {
-
- MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", 1, 2, "protocolFlag",
- "/consumer");
-
- assertTrue(true);
-
- }
-
- @Test
- public void test$testInject() {
-
- MRClientFactory.$testInject(null);
- assertTrue(true);
-
- }
-
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRClient;
+import org.onap.dmaap.mr.client.MRClientBuilders;
+import org.onap.dmaap.mr.client.MRClientFactory;
+
+public class MRClientFactoryTest {
+
+ private Collection<String> hostSet = new ArrayList<String>();
+
+ private String[] hostArray = new String[10];
+
+ @Before
+ public void setUp() throws Exception {
+
+ for (int i = 0; i < 10; i++) {
+ hostSet.add("host" + (i + 1));
+ hostArray[i] = "host" + (i + 1);
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testCreateConsumer() {
+
+ MRClientFactory.createConsumer("hostList hostList2", "testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer2() {
+
+ MRClientFactory.createConsumer(hostSet, "testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer3() {
+
+ MRClientFactory.createConsumer(hostSet, "testTopic", "filter");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer4() {
+
+ MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer5() {
+
+ MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer6() {
+
+ MRClientFactory.createConsumer("hostList", "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer7() {
+
+ MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateSimplePublisher() {
+
+ MRClientFactory.createSimplePublisher("hostList", "testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher1() {
+
+ MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher2() {
+
+ MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10, true);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher3() {
+
+ MRClientFactory.createBatchingPublisher(hostArray, "testTopic", 100, 10, true);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher4() {
+
+ MRClientFactory.createBatchingPublisher(hostSet, "testTopic", 100, 10, true);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher5() {
+
+ MRClientFactory.createBatchingPublisher("host", "testTopic", "username", "password", 100, 10, true,
+ "protocolFlag");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher6() {
+
+ try {
+ MRClientFactory.createBatchingPublisher("/producer");
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateBatchingPublisher7() {
+
+ try {
+ MRClientFactory.createBatchingPublisher("/producer", true);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateIdentityManager() {
+
+ MRClientFactory.createIdentityManager(hostSet, "apikey", "apisecret");
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateTopicManager() {
+
+ MRClientFactory.createTopicManager(hostSet, "apikey", "apisecret");
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer8() {
+
+ try {
+ MRClientFactory.createConsumer("/consumer");
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer9() {
+
+ MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", "protocolFlag",
+ "/consumer", 1, 2);
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCreateConsumer10() {
+
+ MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", 1, 2, "protocolFlag",
+ "/consumer");
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void test$testInject() {
+
+ MRClientFactory.$testInject(null);
+ assertTrue(true);
+
+ }
+
} \ No newline at end of file
diff --git a/src/test/java/com/att/nsa/mr/tools/TestRunner.java b/src/test/java/org/onap/dmaap/mr/client/TestRunner.java
index 728752b..f9b8a86 100644
--- a/src/test/java/com/att/nsa/mr/tools/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/client/TestRunner.java
@@ -1,41 +1,41 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/impl/DMaapClientUtilTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/DMaapClientUtilTest.java
index 9841adb..6fb31a6 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/DMaapClientUtilTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/DMaapClientUtilTest.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRBaseClientTest.java
index 055c94f..6fe0e70 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRBaseClientTest.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRBatchPublisherTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRBatchPublisherTest.java
index 19b58e9..f13e7fa 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRBatchPublisherTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRBatchPublisherTest.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.IOException;
import java.util.Arrays;
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRConstantsTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRConstantsTest.java
index ed918b5..3a427e0 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRConstantsTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRConstantsTest.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.IOException;
import java.util.ArrayList;
@@ -31,7 +31,7 @@ import junit.framework.TestCase;
import org.apache.http.HttpHost;
import org.junit.Test;
-import com.att.nsa.mr.client.impl.MRConstants;
+import org.onap.dmaap.mr.client.impl.MRConstants;
public class MRConstantsTest extends TestCase
{
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRConsumerImplTest.java
index bfac947..5d8dccd 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRConsumerImplTest.java
@@ -19,7 +19,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package com.att.nsa.mr.client.impl;
+package org.onap.dmaap.mr.client.impl;
import java.io.IOException;
import java.util.LinkedList;
@@ -29,9 +29,9 @@ import junit.framework.TestCase;
import org.junit.Test;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.impl.MRConstants;
-import com.att.nsa.mr.client.impl.MRConsumerImpl;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.impl.MRConstants;
+import org.onap.dmaap.mr.client.impl.MRConsumerImpl;
public class MRConsumerImplTest extends TestCase
{
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRMetaClientTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java
index 4a3650f..6c2b219 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRMetaClientTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java
@@ -1,129 +1,129 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * org.onap.dmaap
- * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
- *******************************************************************************/
-package com.att.nsa.mr.client.impl;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.Set;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*;
-import static org.junit.Assert.assertTrue;
-
-import com.att.nsa.apiClient.http.HttpException;
-import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
-import com.att.nsa.mr.client.MRClient.MRApiException;
-import com.att.nsa.mr.client.MRTopicManager.TopicInfo;
-import com.github.tomakehurst.wiremock.junit.WireMockRule;
-
-
-public class MRMetaClientTest {
-
- @Rule public WireMockRule wireMock = new WireMockRule();
-
- @Before
- public void setUp(){
- wireMock.stubFor(get(urlEqualTo("/topics"))
- .willReturn(aResponse().withBody("{\"topics\":[\"topic1\",\"topic2\"]}").withHeader("Content-Type", "application/json")));
- wireMock.stubFor(get(urlEqualTo("/topics/topic1"))
- .willReturn(aResponse().withBody("{\"topics\":[\"topic1\",\"topic2\"]}").withHeader("Content-Type", "application/json")));
- wireMock.stubFor(post(urlEqualTo("/topics/create"))
- .willReturn(aResponse().withStatus(200)));
- }
-
- @Test
- public void getTopicsTest()
- {
- final Collection<String> hosts = new LinkedList<String> ();
- hosts.add ( "localhost:" + wireMock.port() );
-
- MRMetaClient c;
- try {
- c = new MRMetaClient(hosts);
- Set<String> setString=c.getTopics();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
-
- // assertEquals ("http://localhost:8080/events/" + "topic/cg/cid", url );
-
- }
-
- @Test
- public void getTopicMetadataTest() {
- final Collection<String> hosts = new LinkedList<String> ();
- hosts.add ( "localhost:" + wireMock.port() );
-
- final String topic ="topic1";
-
- MRMetaClient c;
- try {
- c = new MRMetaClient(hosts);
- TopicInfo topicInfo=c.getTopicMetadata(topic);
- } catch (IOException | HttpObjectNotFoundException e) {
- e.printStackTrace();
- }
-
- }
-
- @Test
- public void testcreateTopic(){
- final Collection<String> hosts = new LinkedList<String> ();
- hosts.add ( "localhost:" + wireMock.port() );
-
- MRMetaClient c;
- try {
- c = new MRMetaClient(hosts);
- c.createTopic("topic1", "testTopic", 1, 1);
- } catch (IOException | HttpException e) {
- e.printStackTrace();
- }
- }
- @Test
- public void testupdateApiKey(){
- final Collection<String> hosts = new LinkedList<String> ();
- hosts.add ( "localhost:" + wireMock.port() );
-
- MRMetaClient c;
- try {
- c = new MRMetaClient(hosts);
- c.updateCurrentApiKey("test@onap.com", "test email");
- }catch (HttpException e) {
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- catch (NullPointerException e) {
- assertTrue(true);
- }
-
- }
-
-
-}
+/*******************************************************************************
+ * ============LICENSE_START=======================================================
+ * org.onap.dmaap
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
+ *******************************************************************************/
+package org.onap.dmaap.mr.client.impl;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
+import static org.junit.Assert.assertTrue;
+
+import com.att.nsa.apiClient.http.HttpException;
+import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
+import org.onap.dmaap.mr.client.MRClient.MRApiException;
+import org.onap.dmaap.mr.client.MRTopicManager.TopicInfo;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+
+public class MRMetaClientTest {
+
+ @Rule public WireMockRule wireMock = new WireMockRule();
+
+ @Before
+ public void setUp(){
+ wireMock.stubFor(get(urlEqualTo("/topics"))
+ .willReturn(aResponse().withBody("{\"topics\":[\"topic1\",\"topic2\"]}").withHeader("Content-Type", "application/json")));
+ wireMock.stubFor(get(urlEqualTo("/topics/topic1"))
+ .willReturn(aResponse().withBody("{\"topics\":[\"topic1\",\"topic2\"]}").withHeader("Content-Type", "application/json")));
+ wireMock.stubFor(post(urlEqualTo("/topics/create"))
+ .willReturn(aResponse().withStatus(200)));
+ }
+
+ @Test
+ public void getTopicsTest()
+ {
+ final Collection<String> hosts = new LinkedList<String> ();
+ hosts.add ( "localhost:" + wireMock.port() );
+
+ MRMetaClient c;
+ try {
+ c = new MRMetaClient(hosts);
+ Set<String> setString=c.getTopics();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+
+ // assertEquals ("http://localhost:8080/events/" + "topic/cg/cid", url );
+
+ }
+
+ @Test
+ public void getTopicMetadataTest() {
+ final Collection<String> hosts = new LinkedList<String> ();
+ hosts.add ( "localhost:" + wireMock.port() );
+
+ final String topic ="topic1";
+
+ MRMetaClient c;
+ try {
+ c = new MRMetaClient(hosts);
+ TopicInfo topicInfo=c.getTopicMetadata(topic);
+ } catch (IOException | HttpObjectNotFoundException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void testcreateTopic(){
+ final Collection<String> hosts = new LinkedList<String> ();
+ hosts.add ( "localhost:" + wireMock.port() );
+
+ MRMetaClient c;
+ try {
+ c = new MRMetaClient(hosts);
+ c.createTopic("topic1", "testTopic", 1, 1);
+ } catch (IOException | HttpException e) {
+ e.printStackTrace();
+ }
+ }
+ @Test
+ public void testupdateApiKey(){
+ final Collection<String> hosts = new LinkedList<String> ();
+ hosts.add ( "localhost:" + wireMock.port() );
+
+ MRMetaClient c;
+ try {
+ c = new MRMetaClient(hosts);
+ c.updateCurrentApiKey("test@onap.com", "test email");
+ }catch (HttpException e) {
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ catch (NullPointerException e) {
+ assertTrue(true);
+ }
+
+ }
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRSimplerBatchConsumerTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java
index 506d277..af02c2f 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRSimplerBatchConsumerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java
@@ -1,76 +1,76 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * org.onap.dmaap
- * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
- *******************************************************************************/
-
-package com.att.nsa.mr.client.impl;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
-
-public class MRSimplerBatchConsumerTest {
-
- File outFile;
- @Before
- public void setUp() throws Exception {
- Properties properties = new Properties();
- properties.load(MRSimplerBatchConsumerTest.class.getClassLoader().getResourceAsStream("dme2/consumer.properties"));
-
- String routeFilePath="dme2/preferredRoute.txt";
-
- File file = new File(MRSimplerBatchConsumerTest.class.getClassLoader().getResource(routeFilePath).getFile());
- properties.put("DME2preferredRouterFilePath", MRSimplerBatchConsumerTest.class.getClassLoader().getResource(routeFilePath).getFile());
-
- outFile = new File(file.getParent() + "/consumer_tmp.properties");
- properties.store(new FileOutputStream(outFile), "");
- }
-
- @Test
- public void testSend() throws IOException, InterruptedException {
-
- final MRConsumer cc = MRClientFactory.createConsumer(outFile.getPath());
-
- try {
- for(String msg : cc.fetch()){
- System.out.println(msg);
- }
- } catch (Exception e) {
- System.err.println ( e.getClass().getName () + ": " + e.getMessage () );
- }
-
- }
-
-
-}
+/*******************************************************************************
+ * ============LICENSE_START=======================================================
+ * org.onap.dmaap
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
+ *******************************************************************************/
+
+package org.onap.dmaap.mr.client.impl;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
+
+public class MRSimplerBatchConsumerTest {
+
+ File outFile;
+ @Before
+ public void setUp() throws Exception {
+ Properties properties = new Properties();
+ properties.load(MRSimplerBatchConsumerTest.class.getClassLoader().getResourceAsStream("dme2/consumer.properties"));
+
+ String routeFilePath="dme2/preferredRoute.txt";
+
+ File file = new File(MRSimplerBatchConsumerTest.class.getClassLoader().getResource(routeFilePath).getFile());
+ properties.put("DME2preferredRouterFilePath", MRSimplerBatchConsumerTest.class.getClassLoader().getResource(routeFilePath).getFile());
+
+ outFile = new File(file.getParent() + "/consumer_tmp.properties");
+ properties.store(new FileOutputStream(outFile), "");
+ }
+
+ @Test
+ public void testSend() throws IOException, InterruptedException {
+
+ final MRConsumer cc = MRClientFactory.createConsumer(outFile.getPath());
+
+ try {
+ for(String msg : cc.fetch()){
+ System.out.println(msg);
+ }
+ } catch (Exception e) {
+ System.err.println ( e.getClass().getName () + ": " + e.getMessage () );
+ }
+
+ }
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisherTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisherTest.java
index 5b8d580..2f9b519 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisherTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisherTest.java
@@ -1,96 +1,96 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * org.onap.dmaap
- * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
- *******************************************************************************/
-
-package com.att.nsa.mr.client.impl;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.client.response.MRPublisherResponse;
-
-public class MRSimplerBatchPublisherTest {
-
- File outFile;
- @Before
- public void setUp() throws Exception {
- Properties properties = new Properties();
- properties.load(MRSimplerBatchPublisherTest.class.getClassLoader().getResourceAsStream("dme2/producer.properties"));
-
- String routeFilePath="dme2/preferredRoute.txt";
-
- File file = new File(MRSimplerBatchPublisherTest.class.getClassLoader().getResource(routeFilePath).getFile());
- properties.put("DME2preferredRouterFilePath", MRSimplerBatchPublisherTest.class.getClassLoader().getResource(routeFilePath).getFile());
-
- outFile = new File(file.getParent() + "/producer_tmp.properties");
- properties.store(new FileOutputStream(outFile), "");
- }
-
- @Test
- public void testSend() throws IOException, InterruptedException {
-
- final MRSimplerBatchPublisher pub = (MRSimplerBatchPublisher)MRClientFactory.createBatchingPublisher(outFile.getPath());
-
- //publish some messages
- final JSONObject msg1 = new JSONObject ();
- pub.send ( "MyPartitionKey", msg1.toString () );
-
- final List<message> stuck = pub.close ( 1, TimeUnit.SECONDS );
- if ( stuck.size () > 0 ) {
- System.out.println( stuck.size() + " messages unsent" );
- }
- else
- {
- System.out.println ( "Clean exit; all messages sent." );
- }
-
-
- }
-
- @Test
- public void testSendBatchWithResponse() throws IOException, InterruptedException {
-
- final MRSimplerBatchPublisher pub = (MRSimplerBatchPublisher)MRClientFactory.createBatchingPublisher(outFile.getPath(), true);
-
- //publish some messages
- final JSONObject msg1 = new JSONObject ();
- pub.send ( "MyPartitionKey", msg1.toString () );
- MRPublisherResponse pubResponse = new MRPublisherResponse();
- pub.setPubResponse(pubResponse);
-
- MRPublisherResponse mrPublisherResponse = pub.sendBatchWithResponse();
- Assert.assertEquals(1, mrPublisherResponse.getPendingMsgs());
-
- }
-
-}
+/*******************************************************************************
+ * ============LICENSE_START=======================================================
+ * org.onap.dmaap
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
+ *******************************************************************************/
+
+package org.onap.dmaap.mr.client.impl;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.client.response.MRPublisherResponse;
+
+public class MRSimplerBatchPublisherTest {
+
+ File outFile;
+ @Before
+ public void setUp() throws Exception {
+ Properties properties = new Properties();
+ properties.load(MRSimplerBatchPublisherTest.class.getClassLoader().getResourceAsStream("dme2/producer.properties"));
+
+ String routeFilePath="dme2/preferredRoute.txt";
+
+ File file = new File(MRSimplerBatchPublisherTest.class.getClassLoader().getResource(routeFilePath).getFile());
+ properties.put("DME2preferredRouterFilePath", MRSimplerBatchPublisherTest.class.getClassLoader().getResource(routeFilePath).getFile());
+
+ outFile = new File(file.getParent() + "/producer_tmp.properties");
+ properties.store(new FileOutputStream(outFile), "");
+ }
+
+ @Test
+ public void testSend() throws IOException, InterruptedException {
+
+ final MRSimplerBatchPublisher pub = (MRSimplerBatchPublisher)MRClientFactory.createBatchingPublisher(outFile.getPath());
+
+ //publish some messages
+ final JSONObject msg1 = new JSONObject ();
+ pub.send ( "MyPartitionKey", msg1.toString () );
+
+ final List<message> stuck = pub.close ( 1, TimeUnit.SECONDS );
+ if ( stuck.size () > 0 ) {
+ System.out.println( stuck.size() + " messages unsent" );
+ }
+ else
+ {
+ System.out.println ( "Clean exit; all messages sent." );
+ }
+
+
+ }
+
+ @Test
+ public void testSendBatchWithResponse() throws IOException, InterruptedException {
+
+ final MRSimplerBatchPublisher pub = (MRSimplerBatchPublisher)MRClientFactory.createBatchingPublisher(outFile.getPath(), true);
+
+ //publish some messages
+ final JSONObject msg1 = new JSONObject ();
+ pub.send ( "MyPartitionKey", msg1.toString () );
+ MRPublisherResponse pubResponse = new MRPublisherResponse();
+ pub.setPubResponse(pubResponse);
+
+ MRPublisherResponse mrPublisherResponse = pub.sendBatchWithResponse();
+ Assert.assertEquals(1, mrPublisherResponse.getPendingMsgs());
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/response/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java
index 90b10a9..1cfaef4 100644
--- a/src/test/java/com/att/nsa/mr/client/response/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java
@@ -1,43 +1,43 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client.response;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ MRConsumerResponseTest.class, MRPublisherResponseTest.class,})
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client.response;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ MRConsumerResponseTest.class, MRPublisherResponseTest.class,})
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/response/MRConsumerResponseTest.java b/src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java
index 036a216..3f727a4 100644
--- a/src/test/java/com/att/nsa/mr/client/response/MRConsumerResponseTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java
@@ -1,94 +1,94 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client.response;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-
-public class MRConsumerResponseTest {
- private MRConsumerResponse test = null;
-
- @Before
- public void setUp() throws Exception {
- test = new MRConsumerResponse();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetResponseCode() {
-
- test.getResponseCode();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetResponseCode() {
-
- test.setResponseCode("200");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetResponseMessage() {
-
- test.getResponseMessage();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetResponseMessage() {
-
- test.setResponseMessage("responseMessage");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetActualMessages() {
-
- test.getActualMessages();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetActualMessages() {
-
- test.setActualMessages(null);
- assertTrue(true);
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client.response;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+
+public class MRConsumerResponseTest {
+ private MRConsumerResponse test = null;
+
+ @Before
+ public void setUp() throws Exception {
+ test = new MRConsumerResponse();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetResponseCode() {
+
+ test.getResponseCode();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetResponseCode() {
+
+ test.setResponseCode("200");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetResponseMessage() {
+
+ test.getResponseMessage();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetResponseMessage() {
+
+ test.setResponseMessage("responseMessage");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetActualMessages() {
+
+ test.getActualMessages();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetActualMessages() {
+
+ test.setActualMessages(null);
+ assertTrue(true);
+
+ }
+}
diff --git a/src/test/java/com/att/nsa/mr/client/response/MRPublisherResponseTest.java b/src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java
index 60e64ad..f4957db 100644
--- a/src/test/java/com/att/nsa/mr/client/response/MRPublisherResponseTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java
@@ -1,104 +1,104 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client.response;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-
-public class MRPublisherResponseTest {
- private MRPublisherResponse response = null;
-
- @Before
- public void setUp() throws Exception {
- response = new MRPublisherResponse();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetResponseCode() {
-
- response.getResponseCode();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetResponseCode() {
-
- response.setResponseCode("200");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetResponseMessage() {
-
- response.getResponseMessage();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetResponseMessage() {
-
- response.setResponseMessage("responseMessage");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetPendingMsgs() {
-
- response.getPendingMsgs();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetPendingMsgs() {
-
- response.setPendingMsgs(5);
- assertTrue(true);
-
- }
-
- @Test
- public void testToString() {
-
- response.toString();
- assertTrue(true);
-
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client.response;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+
+public class MRPublisherResponseTest {
+ private MRPublisherResponse response = null;
+
+ @Before
+ public void setUp() throws Exception {
+ response = new MRPublisherResponse();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetResponseCode() {
+
+ response.getResponseCode();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetResponseCode() {
+
+ response.setResponseCode("200");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetResponseMessage() {
+
+ response.getResponseMessage();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetResponseMessage() {
+
+ response.setResponseMessage("responseMessage");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetPendingMsgs() {
+
+ response.getPendingMsgs();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetPendingMsgs() {
+
+ response.setPendingMsgs(5);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testToString() {
+
+ response.toString();
+ assertTrue(true);
+
+ }
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/client/TestRunner.java b/src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java
index 814354c..9bf5880 100644
--- a/src/test/java/com/att/nsa/mr/client/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java
@@ -1,41 +1,41 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.client;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.client.response;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/DefaultLoggingFailoverFaultHandlerTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/DefaultLoggingFailoverFaultHandlerTest.java
index 5f67f6d..b1c7e15 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/DefaultLoggingFailoverFaultHandlerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/DefaultLoggingFailoverFaultHandlerTest.java
@@ -1,69 +1,69 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Listener;
-
-public class DefaultLoggingFailoverFaultHandlerTest {
- private DefaultLoggingFailoverFaultHandler handler = null;
-
- @Before
- public void setUp() throws Exception {
- handler = new DefaultLoggingFailoverFaultHandler();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testHandleEndpointFailover() {
-
- /* handler.handleEndpointFailover(null);
- assertTrue(true);*/
-
- }
-
- @Test
- public void testHandleRouteOfferFailover() {
-
- /* handler.handleRouteOfferFailover(null);
- assertTrue(true);
-*/
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Listener;
+
+public class DefaultLoggingFailoverFaultHandlerTest {
+ private DefaultLoggingFailoverFaultHandler handler = null;
+
+ @Before
+ public void setUp() throws Exception {
+ handler = new DefaultLoggingFailoverFaultHandler();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testHandleEndpointFailover() {
+
+ /* handler.handleEndpointFailover(null);
+ assertTrue(true);*/
+
+ }
+
+ @Test
+ public void testHandleRouteOfferFailover() {
+
+ /* handler.handleRouteOfferFailover(null);
+ assertTrue(true);
+*/
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/HeaderReplyHandlerTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java
index bdcff83..df236c9 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/HeaderReplyHandlerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java
@@ -1,79 +1,79 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Listener;
-
-public class HeaderReplyHandlerTest {
- private HeaderReplyHandler handler = null;
-
- @Before
- public void setUp() throws Exception {
- handler = new HeaderReplyHandler();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testHandleFault() {
-
- handler.handleFault(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testHandleEndpointFault() {
-
- handler.handleEndpointFault(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testHandleReply() {
-
- handler.handleReply(null);
- assertTrue(true);
-
- }
-
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Listener;
+
+public class HeaderReplyHandlerTest {
+ private HeaderReplyHandler handler = null;
+
+ @Before
+ public void setUp() throws Exception {
+ handler = new HeaderReplyHandler();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testHandleFault() {
+
+ handler.handleFault(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testHandleEndpointFault() {
+
+ handler.handleEndpointFault(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testHandleReply() {
+
+ handler.handleReply(null);
+ assertTrue(true);
+
+ }
+
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/dme/client/JUnitTestSuite.java
index 3ce48a4..0d4c69a 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/JUnitTestSuite.java
@@ -1,44 +1,44 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ DefaultLoggingFailoverFaultHandlerTest.class, HeaderReplyHandlerTest.class,PreferredRouteReplyHandlerTest.class,
- PreferredRouteRequestHandlerTest.class,SimpleExamplePublisherTest.class })
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ DefaultLoggingFailoverFaultHandlerTest.class, HeaderReplyHandlerTest.class,PreferredRouteReplyHandlerTest.class,
+ PreferredRouteRequestHandlerTest.class,SimpleExamplePublisherTest.class })
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandlerTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java
index 28f138d..5aa3018 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandlerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java
@@ -1,88 +1,88 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Listener;
-
-public class PreferredRouteReplyHandlerTest {
- private PreferredRouteReplyHandler handler = null;
-
- @Before
- public void setUp() throws Exception {
- handler = new PreferredRouteReplyHandler();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testHandleReply() {
-
-// handler.handleReply(null);
-// assertTrue(true);
-
- }
-
- @Test
- public void testHandleFault() {
-/*
- handler.handleFault(null);
- assertTrue(true);
-*/
- }
-
- @Test
- public void testHandleEndpointFault() {
-
-/* handler.handleEndpointFault(null);
- assertTrue(true);*/
-
- }
-
- @Test
- public void testRouteWriter() {
-/*
- handler.routeWriter("routeKey", "routeValue");
- assertTrue(true);
-*/
- }
-
-
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Listener;
+
+public class PreferredRouteReplyHandlerTest {
+ private PreferredRouteReplyHandler handler = null;
+
+ @Before
+ public void setUp() throws Exception {
+ handler = new PreferredRouteReplyHandler();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testHandleReply() {
+
+// handler.handleReply(null);
+// assertTrue(true);
+
+ }
+
+ @Test
+ public void testHandleFault() {
+/*
+ handler.handleFault(null);
+ assertTrue(true);
+*/
+ }
+
+ @Test
+ public void testHandleEndpointFault() {
+
+/* handler.handleEndpointFault(null);
+ assertTrue(true);*/
+
+ }
+
+ @Test
+ public void testRouteWriter() {
+/*
+ handler.routeWriter("routeKey", "routeValue");
+ assertTrue(true);
+*/
+ }
+
+
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandlerTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteRequestHandlerTest.java
index 86f220c..cf5b607 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandlerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteRequestHandlerTest.java
@@ -1,74 +1,74 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Listener;
-
-public class PreferredRouteRequestHandlerTest {
- private PreferredRouteRequestHandler handler = null;
-
- @Before
- public void setUp() throws Exception {
- handler = new PreferredRouteRequestHandler();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testHandleRequest() {
-
- /* handler.handleRequest(null);
- assertTrue(true);*/
-
- }
-
- @Test
- public void testReadRoute() {
-
-// try {
-// handler.readRoute("routeKey");
-// } catch (NullPointerException e) {
-// assertTrue(true);
-// }
-//
-// assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Listener;
+
+public class PreferredRouteRequestHandlerTest {
+ private PreferredRouteRequestHandler handler = null;
+
+ @Before
+ public void setUp() throws Exception {
+ handler = new PreferredRouteRequestHandler();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testHandleRequest() {
+
+ /* handler.handleRequest(null);
+ assertTrue(true);*/
+
+ }
+
+ @Test
+ public void testReadRoute() {
+
+// try {
+// handler.readRoute("routeKey");
+// } catch (NullPointerException e) {
+// assertTrue(true);
+// }
+//
+// assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/SimpleExamplePublisherTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/SimpleExamplePublisherTest.java
index 67051b1..1240d8b 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/SimpleExamplePublisherTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/SimpleExamplePublisherTest.java
@@ -1,68 +1,68 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Listener;
-
-public class SimpleExamplePublisherTest {
- private SimpleExamplePublisher pub = null;
-
- @Before
- public void setUp() throws Exception {
- pub = new SimpleExamplePublisher();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testPublishMessage() {
-
- try {
- pub.publishMessage("/producer");
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Listener;
+
+public class SimpleExamplePublisherTest {
+ private SimpleExamplePublisher pub = null;
+
+ @Before
+ public void setUp() throws Exception {
+ pub = new SimpleExamplePublisher();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testPublishMessage() {
+
+ try {
+ pub.publishMessage("/producer");
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/logging/TestRunner.java b/src/test/java/org/onap/dmaap/mr/dme/client/TestRunner.java
index 415156f..74928c9 100644
--- a/src/test/java/com/att/nsa/mr/logging/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/TestRunner.java
@@ -1,41 +1,41 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.logging;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.dme.client;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/logging/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/logging/JUnitTestSuite.java
index 43fe365..8828d1c 100644
--- a/src/test/java/com/att/nsa/mr/logging/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/logging/JUnitTestSuite.java
@@ -1,43 +1,43 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.logging;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ MRAppenderTest.class, })
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.logging;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ MRAppenderTest.class, })
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/logging/MRAppenderTest.java b/src/test/java/org/onap/dmaap/mr/logging/MRAppenderTest.java
index 0a59d97..8332606 100644
--- a/src/test/java/com/att/nsa/mr/logging/MRAppenderTest.java
+++ b/src/test/java/org/onap/dmaap/mr/logging/MRAppenderTest.java
@@ -1,184 +1,184 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.logging;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-
-public class MRAppenderTest {
- private MRAppender appender = null;
-
- @Before
- public void setUp() throws Exception {
- appender = new MRAppender();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testClose() {
- try {
- appender.close();
- } catch (NullPointerException e) {
- assertTrue(true);
- }
-
- assertTrue(true);
-
- }
-
- @Test
- public void testRequiresLayout() {
-
- appender.requiresLayout();
- assertTrue(true);
-
- }
-
- @Test
- public void testAppend() {
-
- try {
- appender.append(null);
- } catch (NullPointerException e) {
- assertTrue(true);
- }
-
- assertTrue(true);
-
- }
-
- @Test
- public void testActivateOptions() {
-
- appender.activateOptions();
- assertTrue(true);
-
- }
-
- @Test
- public void testGetTopic() {
-
- appender.getTopic();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetTopic() {
-
- appender.setTopic("testTopic");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetPartition() {
-
- appender.getPartition();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetPartition() {
-
- appender.setPartition("partition");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetHosts() {
-
- appender.getHosts();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetHosts() {
-
- appender.setHosts("hosts");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetMaxBatchSize() {
-
- appender.getMaxBatchSize();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetMaxBatchSize() {
-
- appender.setMaxBatchSize(20);
- assertTrue(true);
-
- }
-
- @Test
- public void testGetMaxAgeMs() {
-
- appender.getMaxAgeMs();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetMaxAgeMs() {
-
- appender.setMaxAgeMs(15);
- assertTrue(true);
-
- }
-
- @Test
- public void testIsCompress() {
-
- appender.isCompress();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetCompress() {
-
- appender.setCompress(true);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.logging;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+
+public class MRAppenderTest {
+ private MRAppender appender = null;
+
+ @Before
+ public void setUp() throws Exception {
+ appender = new MRAppender();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testClose() {
+ try {
+ appender.close();
+ } catch (NullPointerException e) {
+ assertTrue(true);
+ }
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testRequiresLayout() {
+
+ appender.requiresLayout();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAppend() {
+
+ try {
+ appender.append(null);
+ } catch (NullPointerException e) {
+ assertTrue(true);
+ }
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testActivateOptions() {
+
+ appender.activateOptions();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetTopic() {
+
+ appender.getTopic();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetTopic() {
+
+ appender.setTopic("testTopic");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetPartition() {
+
+ appender.getPartition();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetPartition() {
+
+ appender.setPartition("partition");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetHosts() {
+
+ appender.getHosts();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetHosts() {
+
+ appender.setHosts("hosts");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetMaxBatchSize() {
+
+ appender.getMaxBatchSize();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetMaxBatchSize() {
+
+ appender.setMaxBatchSize(20);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetMaxAgeMs() {
+
+ appender.getMaxAgeMs();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetMaxAgeMs() {
+
+ appender.setMaxAgeMs(15);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testIsCompress() {
+
+ appender.isCompress();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetCompress() {
+
+ appender.setCompress(true);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/dme/client/TestRunner.java b/src/test/java/org/onap/dmaap/mr/logging/TestRunner.java
index 08be6da..8e77136 100644
--- a/src/test/java/com/att/nsa/mr/dme/client/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/logging/TestRunner.java
@@ -1,41 +1,41 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.dme.client;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
-
-public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
-
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.logging;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/ConsolePublisherTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/ConsolePublisherTest.java
index 5ccd10c..218e6c8 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/ConsolePublisherTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/ConsolePublisherTest.java
@@ -1,55 +1,55 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ConsolePublisherTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testMain() {
-
- try {
- ConsolePublisher.main(null);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ConsolePublisherTest {
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ ConsolePublisher.main(null);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/test/clients/JUnitTestSuite.java
index 49e22de..eb0ca3d 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/JUnitTestSuite.java
@@ -1,45 +1,45 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ SimpleExamplePublisherTest.class, ProtocolTypeConstantsTest.class,
- SampleConsumerTest.class, SamplePublisherTest.class, SimpleExampleConsumerTest.class, ConsolePublisherTest.class,
- SimpleExamplePublisherWithResponseTest.class, SimpleExampleConsumerWithReturnResponseTest.class,})
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ SimpleExamplePublisherTest.class, ProtocolTypeConstantsTest.class,
+ SampleConsumerTest.class, SamplePublisherTest.class, SimpleExampleConsumerTest.class, ConsolePublisherTest.class,
+ SimpleExamplePublisherWithResponseTest.class, SimpleExampleConsumerWithReturnResponseTest.class,})
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/ProtocolTypeConstantsTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/ProtocolTypeConstantsTest.java
index ce4b72c..52310bf 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/ProtocolTypeConstantsTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/ProtocolTypeConstantsTest.java
@@ -1,61 +1,61 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ProtocolTypeConstantsTest {
- private ProtocolTypeConstants constants = null;
-
- @Before
- public void setUp() throws Exception {
- // constants = new ProtocolTypeConstants();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetValue() {
-
- try {
- constants.getValue();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ProtocolTypeConstantsTest {
+ private ProtocolTypeConstants constants = null;
+
+ @Before
+ public void setUp() throws Exception {
+ // constants = new ProtocolTypeConstants();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetValue() {
+
+ try {
+ constants.getValue();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/SampleConsumerTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/SampleConsumerTest.java
index f950fc6..6c5d93f 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/SampleConsumerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/SampleConsumerTest.java
@@ -1,54 +1,54 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SampleConsumerTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testMain() {
-
- try {
- SampleConsumer.main( new String[0]);
- } catch (Exception e) {
- assertTrue(true);
- }
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SampleConsumerTest {
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ SampleConsumer.main( new String[0]);
+ } catch (Exception e) {
+ assertTrue(true);
+ }
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/SamplePublisherTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/SamplePublisherTest.java
index 5ad4407..3a012a7 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/SamplePublisherTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/SamplePublisherTest.java
@@ -1,55 +1,55 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SamplePublisherTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testMain() {
-
- try {
- SamplePublisher.main( new String[0]);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- assertTrue(true);
- }
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SamplePublisherTest {
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ SamplePublisher.main( new String[0]);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ assertTrue(true);
+ }
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerTest.java
index 1887ff9..310ea45 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerTest.java
@@ -1,55 +1,55 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SimpleExampleConsumerTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testMain() {
-
- try {
- SimpleExampleConsumer.main(null);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SimpleExampleConsumerTest {
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ SimpleExampleConsumer.main(null);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerWithReturnResponseTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerWithReturnResponseTest.java
index f6f2deb..3c3b3d7 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/SimpleExampleConsumerWithReturnResponseTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExampleConsumerWithReturnResponseTest.java
@@ -1,54 +1,54 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SimpleExampleConsumerWithReturnResponseTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testMain() {
-
- try {
- SimpleExampleConsumerWithReturnResponse.main(null);
- } catch (Exception e) {
- // TODO Auto-generated catch block e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SimpleExampleConsumerWithReturnResponseTest {
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ SimpleExampleConsumerWithReturnResponse.main(null);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherTest.java
index b30d523..43faf5e 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherTest.java
@@ -1,80 +1,80 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SimpleExamplePublisherTest {
- private SimpleExamplePublisher pub = null;
-
- @Before
- public void setUp() throws Exception {
- pub = new SimpleExamplePublisher();
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testPublishMessage() {
- try {
- pub.publishMessage("/producer");
- } catch (NullPointerException e) {
- assertTrue(true);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- assertTrue(true);
-
- }
-
- @Test
- public void testMain() {
-
- try {
- SimpleExamplePublisher.main(null);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SimpleExamplePublisherTest {
+ private SimpleExamplePublisher pub = null;
+
+ @Before
+ public void setUp() throws Exception {
+ pub = new SimpleExamplePublisher();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testPublishMessage() {
+ try {
+ pub.publishMessage("/producer");
+ } catch (NullPointerException e) {
+ assertTrue(true);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ SimpleExamplePublisher.main(null);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherWithResponseTest.java b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherWithResponseTest.java
index d408a33..44dd7cf 100644
--- a/src/test/java/com/att/nsa/mr/test/clients/SimpleExamplePublisherWithResponseTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/SimpleExamplePublisherWithResponseTest.java
@@ -1,68 +1,68 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.clients;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SimpleExamplePublisherWithResponseTest {
-
- private SimpleExamplePublisherWithResponse pub = null;
-
- @Before
- public void setUp() throws Exception {
- pub = new SimpleExamplePublisherWithResponse();
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testMain() {
-
- try {
- SimpleExamplePublisherWithResponse.main( new String[0]);
- } catch (Exception e) {
- assertTrue(true);
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testPublishMessage() {
-
- try {
- pub.publishMessage("/producer", 100);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SimpleExamplePublisherWithResponseTest {
+
+ private SimpleExamplePublisherWithResponse pub = null;
+
+ @Before
+ public void setUp() throws Exception {
+ pub = new SimpleExamplePublisherWithResponse();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testMain() {
+
+ try {
+ SimpleExamplePublisherWithResponse.main( new String[0]);
+ } catch (Exception e) {
+ assertTrue(true);
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testPublishMessage() {
+
+ try {
+ pub.publishMessage("/producer", 100);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+}
diff --git a/src/test/java/org/onap/dmaap/mr/test/clients/TestRunner.java b/src/test/java/org/onap/dmaap/mr/test/clients/TestRunner.java
new file mode 100644
index 0000000..7e3d724
--- /dev/null
+++ b/src/test/java/org/onap/dmaap/mr/test/clients/TestRunner.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.clients;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/support/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/test/support/JUnitTestSuite.java
index 8d18e1c..6c2e0fc 100644
--- a/src/test/java/com/att/nsa/mr/test/support/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/test/support/JUnitTestSuite.java
@@ -1,43 +1,43 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.support;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ MRBatchingPublisherMockTest.class, MRConsumerMockTest.class,})
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.support;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ MRBatchingPublisherMockTest.class, MRConsumerMockTest.class,})
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/test/support/MRBatchingPublisherMockTest.java b/src/test/java/org/onap/dmaap/mr/test/support/MRBatchingPublisherMockTest.java
index 3666c25..1d6bd7c 100644
--- a/src/test/java/com/att/nsa/mr/test/support/MRBatchingPublisherMockTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/support/MRBatchingPublisherMockTest.java
@@ -1,191 +1,191 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.support;
-
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Listener;
-
-public class MRBatchingPublisherMockTest {
- private MRBatchingPublisherMock pub = null;
-
- private MRBatchingPublisherMock.Entry entry = null;
-
- @Before
- public void setUp() throws Exception {
- pub = new MRBatchingPublisherMock();
- entry = pub.new Entry("partition", "msg");
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testToString() {
-
- entry.toString();
- assertTrue(true);
-
- }
-
- @Test
- public void testAddListener() {
-
- pub.addListener(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testGetCaptures() {
-
- pub.getCaptures();
- assertTrue(true);
-
- }
-
- @Test
- public void testGetCaptures2() {
-
- pub.getCaptures(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testReceived() {
-
- pub.received();
- assertTrue(true);
-
- }
-
- @Test
- public void testResend() {
-
- pub.reset();
- assertTrue(true);
-
- }
-
- @Test
- public void testSend() {
-
- pub.send("partition", "msg");
- assertTrue(true);
-
- }
-
- @Test
- public void testSend2() {
-
- pub.send("msg");
- assertTrue(true);
-
- }
-
- @Test
- public void testSend3() {
- //sending message m obj
- pub.send(new ArrayList<message>());
- assertTrue(true);
-
- }
-
- @Test
- public void testSend4() {
- //sending collection of message m objects
- pub.send(new message("partition", "msg"));
- assertTrue(true);
-
- }
-
- @Test
- public void testSendBatchWithResponse() {
-
- pub.sendBatchWithResponse();
- assertTrue(true);
-
- }
-
- @Test
- public void testLogTo() {
-
- pub.logTo(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testClearApiCredentials() {
-
- pub.clearApiCredentials();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetApiCredentials() {
-
- pub.setApiCredentials("apikey", "apisecret");
- assertTrue(true);
-
- }
-
- @Test
- public void testClose() {
-
- pub.close();
- assertTrue(true);
-
- }
-
- @Test
- public void testClose2() {
-
- pub.close(100, null);
- assertTrue(true);
-
- }
-
- @Test
- public void testGetPendingMessageCount() {
-
- pub.getPendingMessageCount();
- assertTrue(true);
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.support;
+
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Listener;
+
+public class MRBatchingPublisherMockTest {
+ private MRBatchingPublisherMock pub = null;
+
+ private MRBatchingPublisherMock.Entry entry = null;
+
+ @Before
+ public void setUp() throws Exception {
+ pub = new MRBatchingPublisherMock();
+ entry = pub.new Entry("partition", "msg");
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testToString() {
+
+ entry.toString();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddListener() {
+
+ pub.addListener(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetCaptures() {
+
+ pub.getCaptures();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetCaptures2() {
+
+ pub.getCaptures(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testReceived() {
+
+ pub.received();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testResend() {
+
+ pub.reset();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSend() {
+
+ pub.send("partition", "msg");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSend2() {
+
+ pub.send("msg");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSend3() {
+ //sending message m obj
+ pub.send(new ArrayList<message>());
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSend4() {
+ //sending collection of message m objects
+ pub.send(new message("partition", "msg"));
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSendBatchWithResponse() {
+
+ pub.sendBatchWithResponse();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testLogTo() {
+
+ pub.logTo(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testClearApiCredentials() {
+
+ pub.clearApiCredentials();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetApiCredentials() {
+
+ pub.setApiCredentials("apikey", "apisecret");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testClose() {
+
+ pub.close();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testClose2() {
+
+ pub.close(100, null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetPendingMessageCount() {
+
+ pub.getPendingMessageCount();
+ assertTrue(true);
+
+ }
+}
diff --git a/src/test/java/com/att/nsa/mr/test/support/MRConsumerMockTest.java b/src/test/java/org/onap/dmaap/mr/test/support/MRConsumerMockTest.java
index 2a4f50a..9ae49e0 100644
--- a/src/test/java/com/att/nsa/mr/test/support/MRConsumerMockTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/support/MRConsumerMockTest.java
@@ -1,174 +1,174 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.test.support;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Entry;
-
-public class MRConsumerMockTest {
- private MRConsumerMock cons = null;
- private MRConsumerMock.Entry entry = null;
-
- @Before
- public void setUp() throws Exception {
- cons = new MRConsumerMock();
- entry = cons.new Entry(100, 200, "statusMsg");
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testClose() {
-
- cons.close();
- assertTrue(true);
-
- }
-
- @Test
- public void testRun() {
- try {
- entry.run();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- assertTrue(true);
-
- }
-
- @Test
- public void testSetApiCredentials() {
- cons.setApiCredentials("apikey", "apisecret");
- assertTrue(true);
-
- }
-
- @Test
- public void testClearApiCredentials() {
- cons.clearApiCredentials();
- assertTrue(true);
-
- }
-
- @Test
- public void testAdd() {
- cons.add(entry);
- assertTrue(true);
-
- }
-
- @Test
- public void testAddImmediateMsg() {
- cons.addImmediateMsg("ImmediateMsg");
- assertTrue(true);
-
- }
-
- @Test
- public void testAddDelayedMsg() {
- cons.addDelayedMsg(100, "msg");
- assertTrue(true);
-
- }
-
- @Test
- public void testAddImmediateMsgGroup() {
- cons.addImmediateMsgGroup(new ArrayList<String>());
- assertTrue(true);
-
- }
-
- @Test
- public void testAddDelayedMsgGroup() {
- cons.addDelayedMsgGroup(100,new ArrayList<String>());
- assertTrue(true);
-
- }
-
- @Test
- public void testAddImmediateError() {
- cons.addImmediateError(200, "OK");
- assertTrue(true);
-
- }
-
- @Test
- public void testFetch() {
- try {
- cons.fetch();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testFetch2() {
- try {
- cons.fetch(100, 200);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testLogTo() {
- cons.logTo(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testFetchWithReturnConsumerResponse() {
- cons.fetchWithReturnConsumerResponse();
- assertTrue(true);
-
- }
-
- @Test
- public void testGetchWithReturnConsumerResponse() {
- cons.fetchWithReturnConsumerResponse(100,200);
- assertTrue(true);
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.support;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Entry;
+
+public class MRConsumerMockTest {
+ private MRConsumerMock cons = null;
+ private MRConsumerMock.Entry entry = null;
+
+ @Before
+ public void setUp() throws Exception {
+ cons = new MRConsumerMock();
+ entry = cons.new Entry(100, 200, "statusMsg");
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testClose() {
+
+ cons.close();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testRun() {
+ try {
+ entry.run();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetApiCredentials() {
+ cons.setApiCredentials("apikey", "apisecret");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testClearApiCredentials() {
+ cons.clearApiCredentials();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAdd() {
+ cons.add(entry);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddImmediateMsg() {
+ cons.addImmediateMsg("ImmediateMsg");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddDelayedMsg() {
+ cons.addDelayedMsg(100, "msg");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddImmediateMsgGroup() {
+ cons.addImmediateMsgGroup(new ArrayList<String>());
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddDelayedMsgGroup() {
+ cons.addDelayedMsgGroup(100,new ArrayList<String>());
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddImmediateError() {
+ cons.addImmediateError(200, "OK");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testFetch() {
+ try {
+ cons.fetch();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testFetch2() {
+ try {
+ cons.fetch(100, 200);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testLogTo() {
+ cons.logTo(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testFetchWithReturnConsumerResponse() {
+ cons.fetchWithReturnConsumerResponse();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetchWithReturnConsumerResponse() {
+ cons.fetchWithReturnConsumerResponse(100,200);
+ assertTrue(true);
+
+ }
+}
diff --git a/src/test/java/org/onap/dmaap/mr/test/support/TestRunner.java b/src/test/java/org/onap/dmaap/mr/test/support/TestRunner.java
new file mode 100644
index 0000000..0a09a14
--- /dev/null
+++ b/src/test/java/org/onap/dmaap/mr/test/support/TestRunner.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.test.support;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/ApiKeyCommandTest.java b/src/test/java/org/onap/dmaap/mr/tools/ApiKeyCommandTest.java
index e5bd722..e022bf5 100644
--- a/src/test/java/com/att/nsa/mr/tools/ApiKeyCommandTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/ApiKeyCommandTest.java
@@ -1,217 +1,217 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.nsa.apiClient.credentials.ApiCredential;
-import com.att.nsa.apiClient.http.HttpException;
-import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
-import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.MRClient.MRApiException;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRIdentityManager;
-import com.att.nsa.mr.client.MRIdentityManager.ApiKey;
-
-@RunWith(PowerMockRunner.class)
-@PrepareForTest({ MRClientFactory.class })
-public class ApiKeyCommandTest {
-
- @InjectMocks
- private ApiKeyCommand command;
- @Mock
- private MRIdentityManager tm;
- @Mock
- private ApiKey ti;
- @Mock
- private ApiKey key;
- @Mock
- private ApiCredential ac;
- @Mock
- private PrintStream printStream;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- PowerMockito.mockStatic(MRClientFactory.class);
- PowerMockito.when(MRClientFactory.createIdentityManager(Arrays.asList("localhost"), null, null)).thenReturn(tm);
- PowerMockito.when(tm.getApiKey("testtopic")).thenReturn(key);
- PowerMockito.when(tm.createApiKey("testtopic", "1")).thenReturn(ac);
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetMatches() {
-
- command.getMatches();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckReady() {
-
- try {
- command.checkReady(new MRCommandContext());
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute() {
-
- String[] parts1 = { "create", "testtopic", "1" };
- String[] parts2 = { "list", "testtopic", "1" };
- String[] parts3 = { "revoke", "write", "read" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
- }
-
- @Test
- public void testExecute_error1() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
- PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new IOException("error"));
- String[] parts1 = { "create", "testtopic", "1" };
- String[] parts2 = { "list", "testtopic", "1" };
- String[] parts3 = { "revoke", "write", "read" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
- }
-
- }
-
- @Test
- public void testExecute_error2() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
- PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new MRApiException("error"));
- String[] parts1 = { "create", "testtopic", "1" };
- String[] parts2 = { "list", "testtopic", "1" };
- String[] parts3 = { "revoke", "write", "read" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(),printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
- }
-
- @Test
- public void testExecute_error3() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
- PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new HttpException(500, "error"));
- String[] parts1 = { "create", "testtopic", "1" };
- String[] parts2 = { "list", "testtopic", "1" };
- String[] parts3 = { "revoke", "write", "read" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
- }
-
- }
-
- @Test
- public void testExecute_error4() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
- PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new HttpObjectNotFoundException("error"));
- String[] parts1 = { "create", "testtopic", "1" };
- String[] parts2 = { "list", "testtopic", "1" };
- String[] parts3 = { "revoke", "write", "read" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
- }
-
- @Test
- public void testDisplayHelp() {
-
- command.displayHelp(printStream);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.att.nsa.apiClient.credentials.ApiCredential;
+import com.att.nsa.apiClient.http.HttpException;
+import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
+import com.att.nsa.cmdtool.CommandNotReadyException;
+import org.onap.dmaap.mr.client.MRClient.MRApiException;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRIdentityManager;
+import org.onap.dmaap.mr.client.MRIdentityManager.ApiKey;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ MRClientFactory.class })
+public class ApiKeyCommandTest {
+
+ @InjectMocks
+ private ApiKeyCommand command;
+ @Mock
+ private MRIdentityManager tm;
+ @Mock
+ private ApiKey ti;
+ @Mock
+ private ApiKey key;
+ @Mock
+ private ApiCredential ac;
+ @Mock
+ private PrintStream printStream;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ PowerMockito.mockStatic(MRClientFactory.class);
+ PowerMockito.when(MRClientFactory.createIdentityManager(Arrays.asList("localhost"), null, null)).thenReturn(tm);
+ PowerMockito.when(tm.getApiKey("testtopic")).thenReturn(key);
+ PowerMockito.when(tm.createApiKey("testtopic", "1")).thenReturn(ac);
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetMatches() {
+
+ command.getMatches();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckReady() {
+
+ try {
+ command.checkReady(new MRCommandContext());
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute() {
+
+ String[] parts1 = { "create", "testtopic", "1" };
+ String[] parts2 = { "list", "testtopic", "1" };
+ String[] parts3 = { "revoke", "write", "read" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+ }
+
+ @Test
+ public void testExecute_error1() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
+ PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new IOException("error"));
+ String[] parts1 = { "create", "testtopic", "1" };
+ String[] parts2 = { "list", "testtopic", "1" };
+ String[] parts3 = { "revoke", "write", "read" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+ }
+
+ }
+
+ @Test
+ public void testExecute_error2() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
+ PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new MRApiException("error"));
+ String[] parts1 = { "create", "testtopic", "1" };
+ String[] parts2 = { "list", "testtopic", "1" };
+ String[] parts3 = { "revoke", "write", "read" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(),printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+ }
+
+ @Test
+ public void testExecute_error3() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
+ PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new HttpException(500, "error"));
+ String[] parts1 = { "create", "testtopic", "1" };
+ String[] parts2 = { "list", "testtopic", "1" };
+ String[] parts3 = { "revoke", "write", "read" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+ }
+
+ }
+
+ @Test
+ public void testExecute_error4() throws HttpObjectNotFoundException, HttpException, MRApiException, IOException {
+ PowerMockito.when(tm.getApiKey("testtopic")).thenThrow(new HttpObjectNotFoundException("error"));
+ String[] parts1 = { "create", "testtopic", "1" };
+ String[] parts2 = { "list", "testtopic", "1" };
+ String[] parts3 = { "revoke", "write", "read" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+ }
+
+ @Test
+ public void testDisplayHelp() {
+
+ command.displayHelp(printStream);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/AuthCommandTest.java b/src/test/java/org/onap/dmaap/mr/tools/AuthCommandTest.java
index fdb7671..9f9011a 100644
--- a/src/test/java/com/att/nsa/mr/tools/AuthCommandTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/AuthCommandTest.java
@@ -1,113 +1,113 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.PrintStream;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.nsa.cmdtool.CommandNotReadyException;
-
-@RunWith(PowerMockRunner.class)
-public class AuthCommandTest {
- @InjectMocks
- private AuthCommand command = null;
- @Mock
- private PrintStream printStream;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetMatches() {
-
- command.getMatches();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckReady() {
-
- try {
- command.checkReady(new MRCommandContext());
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute() {
-
- try {
- String[] parts = new String[5];
- command.execute(parts, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute1() {
-
- try {
- String[] parts = { "userName", "password" };
- command.execute(parts, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testDisplayHelp() {
-
- command.displayHelp(printStream);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.PrintStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.att.nsa.cmdtool.CommandNotReadyException;
+
+@RunWith(PowerMockRunner.class)
+public class AuthCommandTest {
+ @InjectMocks
+ private AuthCommand command = null;
+ @Mock
+ private PrintStream printStream;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetMatches() {
+
+ command.getMatches();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckReady() {
+
+ try {
+ command.checkReady(new MRCommandContext());
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute() {
+
+ try {
+ String[] parts = new String[5];
+ command.execute(parts, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute1() {
+
+ try {
+ String[] parts = { "userName", "password" };
+ command.execute(parts, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testDisplayHelp() {
+
+ command.displayHelp(printStream);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/ClusterCommandTest.java b/src/test/java/org/onap/dmaap/mr/tools/ClusterCommandTest.java
index cf9c1a7..0dc2f64 100644
--- a/src/test/java/com/att/nsa/mr/tools/ClusterCommandTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/ClusterCommandTest.java
@@ -1,106 +1,106 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.FileNotFoundException;
-import java.io.PrintStream;
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.nsa.cmdtool.CommandNotReadyException;
-
-@RunWith(PowerMockRunner.class)
-public class ClusterCommandTest {
- @InjectMocks
- private ClusterCommand command;
- @Mock
- private MRCommandContext context;
- @Mock
- private PrintStream printStream;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- PowerMockito.when(context.getCluster()).thenReturn(Arrays.asList("localhost"));
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetMatches() {
-
- command.getMatches();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckReady() {
-
- try {
- command.checkReady(context);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute() throws FileNotFoundException, CommandNotReadyException {
- String[] parts = { "create", "testtopic", "1", "1" };
- command.execute(parts, context, printStream);
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute1() throws FileNotFoundException, CommandNotReadyException {
- String[] parts = {};
- command.execute(parts, context, printStream);
- assertTrue(true);
-
- }
-
- @Test
- public void testDisplayHelp() {
-
- command.displayHelp(printStream);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.FileNotFoundException;
+import java.io.PrintStream;
+import java.util.Arrays;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.att.nsa.cmdtool.CommandNotReadyException;
+
+@RunWith(PowerMockRunner.class)
+public class ClusterCommandTest {
+ @InjectMocks
+ private ClusterCommand command;
+ @Mock
+ private MRCommandContext context;
+ @Mock
+ private PrintStream printStream;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ PowerMockito.when(context.getCluster()).thenReturn(Arrays.asList("localhost"));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetMatches() {
+
+ command.getMatches();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckReady() {
+
+ try {
+ command.checkReady(context);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute() throws FileNotFoundException, CommandNotReadyException {
+ String[] parts = { "create", "testtopic", "1", "1" };
+ command.execute(parts, context, printStream);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute1() throws FileNotFoundException, CommandNotReadyException {
+ String[] parts = {};
+ command.execute(parts, context, printStream);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testDisplayHelp() {
+
+ command.displayHelp(printStream);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/tools/JUnitTestSuite.java
index 6e882d4..ca79f9b 100644
--- a/src/test/java/com/att/nsa/mr/tools/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/JUnitTestSuite.java
@@ -1,44 +1,44 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import junit.framework.TestSuite;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
-
-@RunWith(Suite.class)
-@SuiteClasses({ ApiKeyCommandTest.class, AuthCommandTest.class, ClusterCommandTest.class,
- MessageCommandTest.class, MRCommandContextTest.class, TopicCommandTest.class, TraceCommandTest.class,})
-
-public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
-
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.apache.log4j.Logger;
+
+@RunWith(Suite.class)
+@SuiteClasses({ ApiKeyCommandTest.class, AuthCommandTest.class, ClusterCommandTest.class,
+ MessageCommandTest.class, MRCommandContextTest.class, TopicCommandTest.class, TraceCommandTest.class,})
+
+public class JUnitTestSuite {
+ private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/MRCommandContextTest.java b/src/test/java/org/onap/dmaap/mr/tools/MRCommandContextTest.java
index 23ef0a1..038e321 100644
--- a/src/test/java/com/att/nsa/mr/tools/MRCommandContextTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/MRCommandContextTest.java
@@ -1,165 +1,165 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.att.nsa.apiClient.http.HttpTracer;
-import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.HostSelector;
-import com.att.nsa.mr.client.MRClient;
-import com.att.nsa.mr.client.MRPublisher.message;
-import com.att.nsa.mr.test.support.MRBatchingPublisherMock.Entry;
-
-public class MRCommandContextTest {
- private MRCommandContext command = null;
- private String[] parts = new String[5];
-
- @Before
- public void setUp() throws Exception {
- command = new MRCommandContext();
-
- for (int i = 0; i < parts.length; i++) {
- parts[i] = "String" + (i + 1);
- }
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testRequestShutdown() {
-
- command.requestShutdown();
- assertTrue(true);
-
- }
-
- @Test
- public void testShouldContinue() {
-
- command.shouldContinue();
- assertTrue(true);
-
- }
-
- @Test
- public void testSetAuth() {
-
- command.setAuth("key", "pwd");
- assertTrue(true);
-
- }
-
- @Test
- public void testClearAuth() {
-
- command.clearAuth();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckClusterReady() {
-
- command.checkClusterReady();
- assertTrue(true);
-
- }
-
- @Test
- public void testGetCluster() {
-
- command.getCluster();
- assertTrue(true);
-
- }
-
- @Test
- public void testClearCluster() {
-
- command.clearCluster();
- assertTrue(true);
-
- }
-
- @Test
- public void testAddClusterHost() {
-
- command.addClusterHost("host");
- assertTrue(true);
-
- }
-
- @Test
- public void testGetApiKey() {
-
- command.getApiKey();
- assertTrue(true);
-
- }
-
- @Test
- public void testGetApiPwd() {
-
- command.getApiPwd();
- assertTrue(true);
-
- }
-
- @Test
- public void testUseTracer() {
-
- command.useTracer(null);
- assertTrue(true);
-
- }
-
- @Test
- public void testNoTracer() {
-
- command.noTracer();
- assertTrue(true);
-
- }
-
- @Test
- public void testApplyTracer() {
-
- command.applyTracer(null);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.att.nsa.apiClient.http.HttpTracer;
+import com.att.nsa.cmdtool.CommandNotReadyException;
+import org.onap.dmaap.mr.client.HostSelector;
+import org.onap.dmaap.mr.client.MRClient;
+import org.onap.dmaap.mr.client.MRPublisher.message;
+import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Entry;
+
+public class MRCommandContextTest {
+ private MRCommandContext command = null;
+ private String[] parts = new String[5];
+
+ @Before
+ public void setUp() throws Exception {
+ command = new MRCommandContext();
+
+ for (int i = 0; i < parts.length; i++) {
+ parts[i] = "String" + (i + 1);
+ }
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testRequestShutdown() {
+
+ command.requestShutdown();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testShouldContinue() {
+
+ command.shouldContinue();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testSetAuth() {
+
+ command.setAuth("key", "pwd");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testClearAuth() {
+
+ command.clearAuth();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckClusterReady() {
+
+ command.checkClusterReady();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetCluster() {
+
+ command.getCluster();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testClearCluster() {
+
+ command.clearCluster();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testAddClusterHost() {
+
+ command.addClusterHost("host");
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetApiKey() {
+
+ command.getApiKey();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testGetApiPwd() {
+
+ command.getApiPwd();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testUseTracer() {
+
+ command.useTracer(null);
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testNoTracer() {
+
+ command.noTracer();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testApplyTracer() {
+
+ command.applyTracer(null);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/MessageCommandTest.java b/src/test/java/org/onap/dmaap/mr/tools/MessageCommandTest.java
index 638d067..f32cb43 100644
--- a/src/test/java/com/att/nsa/mr/tools/MessageCommandTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/MessageCommandTest.java
@@ -1,214 +1,214 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRConsumer;
-import com.att.nsa.mr.client.MRTopicManager.TopicInfo;
-
-@RunWith(PowerMockRunner.class)
-@PrepareForTest({ MRClientFactory.class, ToolsUtil.class })
-public class MessageCommandTest {
- @InjectMocks
- private MessageCommand command;
- @Mock
- private MRConsumer tm;
- @Mock
- private TopicInfo ti;
- @Mock
- private MRBatchingPublisher pub;
- @Mock
- private MRConsumer cc;
- @Mock
- private PrintStream printStream;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- PowerMockito.mockStatic(MRClientFactory.class);
- PowerMockito.mockStatic(ToolsUtil.class);
- PowerMockito.when(MRClientFactory.createConsumer(Arrays.asList("localhost"), "testtopic", "2", "3", -1, -1,
- null, null, null)).thenReturn(cc);
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetMatches() {
-
- command.getMatches();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckReady() {
-
- try {
- command.checkReady(new MRCommandContext());
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute() {
-
- String[] parts1 = { "read", "testtopic", "2", "3" };
- String[] parts2 = { "write", "testtopic", "2", "3" };
- List<String[]> parts = Arrays.asList(parts1, parts2);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- MRCommandContext context = new MRCommandContext();
- PowerMockito.when(ToolsUtil.createBatchPublisher(context, "testtopic")).thenReturn(pub);
- try {
- command.execute(part, context, printStream);
- } catch (CommandNotReadyException e) {
- assertTrue(true);
- }
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute_error1() {
- try {
- PowerMockito.doThrow(new Exception()).when(cc).fetch();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- String[] parts1 = { "read", "testtopic", "2", "3" };
- String[] parts2 = { "write", "testtopic", "2", "3" };
- List<String[]> parts = Arrays.asList(parts1, parts2);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- MRCommandContext context = new MRCommandContext();
- PowerMockito.when(ToolsUtil.createBatchPublisher(context, "testtopic")).thenReturn(pub);
- try {
- command.execute(part, context, printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute_error2() {
- try {
- PowerMockito.doThrow(new IOException()).when(pub).close(500, TimeUnit.MILLISECONDS);
- PowerMockito.doThrow(new IOException()).when(pub).send("2", "3");
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- String[] parts1 = { "read", "testtopic", "2", "3" };
- String[] parts2 = { "write", "testtopic", "2", "3" };
- List<String[]> parts = Arrays.asList(parts1, parts2);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- MRCommandContext context = new MRCommandContext();
- PowerMockito.when(ToolsUtil.createBatchPublisher(context, "testtopic")).thenReturn(pub);
- try {
- command.execute(part, context, printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- assertTrue(true);
-
- }
-
- /*
- * @Test public void testExecute_error3() {
- *
- * try { PowerMockito.doThrow(new IOException()).when(pub).send("2", "3");
- * PowerMockito.doThrow(new InterruptedException()).when(pub).close(500,
- * TimeUnit.MILLISECONDS); } catch (IOException e) { // TODO Auto-generated
- * catch block e.printStackTrace(); } catch (InterruptedException e) { //
- * TODO Auto-generated catch block e.printStackTrace(); } String[] parts1 =
- * { "read", "testtopic", "2", "3" }; String[] parts2 = { "write",
- * "testtopic", "2", "3" }; List<String[]> parts = Arrays.asList(parts1,
- * parts2); for (Iterator iterator = parts.iterator(); iterator.hasNext();)
- * { String[] part = (String[]) iterator.next(); PrintStream printStream =
- * new PrintStream(System.out);
- *
- * MRCommandContext context = new MRCommandContext();
- * PowerMockito.when(ToolsUtil.createBatchPublisher(context,
- * "testtopic")).thenReturn(pub); try { command.execute(part, context,
- * printStream); } catch (CommandNotReadyException e) { // TODO
- * Auto-generated catch block e.printStackTrace(); } } assertTrue(true);
- *
- * }
- */
-
- @Test
- public void testDisplayHelp() {
-
- command.displayHelp(printStream);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.att.nsa.cmdtool.CommandNotReadyException;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRConsumer;
+import org.onap.dmaap.mr.client.MRTopicManager.TopicInfo;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ MRClientFactory.class, ToolsUtil.class })
+public class MessageCommandTest {
+ @InjectMocks
+ private MessageCommand command;
+ @Mock
+ private MRConsumer tm;
+ @Mock
+ private TopicInfo ti;
+ @Mock
+ private MRBatchingPublisher pub;
+ @Mock
+ private MRConsumer cc;
+ @Mock
+ private PrintStream printStream;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ PowerMockito.mockStatic(MRClientFactory.class);
+ PowerMockito.mockStatic(ToolsUtil.class);
+ PowerMockito.when(MRClientFactory.createConsumer(Arrays.asList("localhost"), "testtopic", "2", "3", -1, -1,
+ null, null, null)).thenReturn(cc);
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetMatches() {
+
+ command.getMatches();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckReady() {
+
+ try {
+ command.checkReady(new MRCommandContext());
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute() {
+
+ String[] parts1 = { "read", "testtopic", "2", "3" };
+ String[] parts2 = { "write", "testtopic", "2", "3" };
+ List<String[]> parts = Arrays.asList(parts1, parts2);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ MRCommandContext context = new MRCommandContext();
+ PowerMockito.when(ToolsUtil.createBatchPublisher(context, "testtopic")).thenReturn(pub);
+ try {
+ command.execute(part, context, printStream);
+ } catch (CommandNotReadyException e) {
+ assertTrue(true);
+ }
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute_error1() {
+ try {
+ PowerMockito.doThrow(new Exception()).when(cc).fetch();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ String[] parts1 = { "read", "testtopic", "2", "3" };
+ String[] parts2 = { "write", "testtopic", "2", "3" };
+ List<String[]> parts = Arrays.asList(parts1, parts2);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ MRCommandContext context = new MRCommandContext();
+ PowerMockito.when(ToolsUtil.createBatchPublisher(context, "testtopic")).thenReturn(pub);
+ try {
+ command.execute(part, context, printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute_error2() {
+ try {
+ PowerMockito.doThrow(new IOException()).when(pub).close(500, TimeUnit.MILLISECONDS);
+ PowerMockito.doThrow(new IOException()).when(pub).send("2", "3");
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ String[] parts1 = { "read", "testtopic", "2", "3" };
+ String[] parts2 = { "write", "testtopic", "2", "3" };
+ List<String[]> parts = Arrays.asList(parts1, parts2);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ MRCommandContext context = new MRCommandContext();
+ PowerMockito.when(ToolsUtil.createBatchPublisher(context, "testtopic")).thenReturn(pub);
+ try {
+ command.execute(part, context, printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ assertTrue(true);
+
+ }
+
+ /*
+ * @Test public void testExecute_error3() {
+ *
+ * try { PowerMockito.doThrow(new IOException()).when(pub).send("2", "3");
+ * PowerMockito.doThrow(new InterruptedException()).when(pub).close(500,
+ * TimeUnit.MILLISECONDS); } catch (IOException e) { // TODO Auto-generated
+ * catch block e.printStackTrace(); } catch (InterruptedException e) { //
+ * TODO Auto-generated catch block e.printStackTrace(); } String[] parts1 =
+ * { "read", "testtopic", "2", "3" }; String[] parts2 = { "write",
+ * "testtopic", "2", "3" }; List<String[]> parts = Arrays.asList(parts1,
+ * parts2); for (Iterator iterator = parts.iterator(); iterator.hasNext();)
+ * { String[] part = (String[]) iterator.next(); PrintStream printStream =
+ * new PrintStream(System.out);
+ *
+ * MRCommandContext context = new MRCommandContext();
+ * PowerMockito.when(ToolsUtil.createBatchPublisher(context,
+ * "testtopic")).thenReturn(pub); try { command.execute(part, context,
+ * printStream); } catch (CommandNotReadyException e) { // TODO
+ * Auto-generated catch block e.printStackTrace(); } } assertTrue(true);
+ *
+ * }
+ */
+
+ @Test
+ public void testDisplayHelp() {
+
+ command.displayHelp(printStream);
+
+ }
+
+}
diff --git a/src/test/java/org/onap/dmaap/mr/tools/TestRunner.java b/src/test/java/org/onap/dmaap/mr/tools/TestRunner.java
new file mode 100644
index 0000000..fff3bd7
--- /dev/null
+++ b/src/test/java/org/onap/dmaap/mr/tools/TestRunner.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.apache.log4j.Logger;
+
+public class TestRunner {
+ private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/ToolsUtilTest.java b/src/test/java/org/onap/dmaap/mr/tools/ToolsUtilTest.java
index 69bdd44..080d6d5 100644
--- a/src/test/java/com/att/nsa/mr/tools/ToolsUtilTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/ToolsUtilTest.java
@@ -21,9 +21,9 @@
/**
* @author marcin.migdal@nokia.com
*/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
-import com.att.nsa.mr.client.MRBatchingPublisher;
+import org.onap.dmaap.mr.client.MRBatchingPublisher;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
diff --git a/src/test/java/com/att/nsa/mr/tools/TopicCommandTest.java b/src/test/java/org/onap/dmaap/mr/tools/TopicCommandTest.java
index 6459e6a..e8dd073 100644
--- a/src/test/java/com/att/nsa/mr/tools/TopicCommandTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/TopicCommandTest.java
@@ -1,224 +1,224 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.nsa.apiClient.http.HttpException;
-import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
-import com.att.nsa.cmdtool.CommandNotReadyException;
-import com.att.nsa.mr.client.MRClientFactory;
-import com.att.nsa.mr.client.MRTopicManager.TopicInfo;
-import com.att.nsa.mr.client.MRTopicManager;
-
-@RunWith(PowerMockRunner.class)
-@PrepareForTest({ MRClientFactory.class })
-public class TopicCommandTest {
- @InjectMocks
- private TopicCommand command;
- @Mock
- private MRTopicManager tm;
- @Mock
- private TopicInfo ti;
- @Mock
- private PrintStream printStream;
-
- @Before
- public void setUp() throws Exception {
-
- MockitoAnnotations.initMocks(this);
- PowerMockito.mockStatic(MRClientFactory.class);
- PowerMockito.when(MRClientFactory.createTopicManager(Arrays.asList("localhost"), null, null)).thenReturn(tm);
- PowerMockito.when(tm.getTopicMetadata("testtopic")).thenReturn(ti);
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetMatches() {
-
- command.getMatches();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckReady() {
-
- try {
- command.checkReady(new MRCommandContext());
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute() {
-
- String[] parts1 = { "create", "testtopic", "1", "1" };
- String[] parts2 = { "grant", "write", "read", "1" };
- String[] parts3 = { "revoke", "write", "read", "1" };
- String[] parts4 = { "list", "testtopic", "1", "1" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- }
-
- @Test
- public void testExecute_error() {
-
- String[] parts1 = { "create", "testtopic", "1", "1" };
- String[] parts2 = { "grant", "write", "read", "1" };
- String[] parts3 = { "revoke", "write", "read", "1" };
- String[] parts4 = { "list", "testtopic", "1", "1" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- }
-
- @Test
- public void testExecute_error_1() throws com.att.nsa.apiClient.http.HttpException, IOException {
- PowerMockito.when(tm.getTopicMetadata("testtopic")).thenThrow(new IOException("error"));
- PowerMockito.doThrow(new IOException()).when(tm).createTopic("testtopic", "", 1, 1);
- PowerMockito.doThrow(new IOException()).when(tm).revokeProducer("read", "1");
- String[] parts1 = { "create", "testtopic", "1", "1" };
- String[] parts2 = { "grant", "read", "read", "1" };
- String[] parts3 = { "revoke", "write", "read", "1" };
- String[] parts4 = { "list", "testtopic", "1", "1" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- }
-
- @Test
- public void testExecute_error_2() throws com.att.nsa.apiClient.http.HttpException, IOException {
- PowerMockito.when(tm.getTopicMetadata("testtopic")).thenThrow(new HttpObjectNotFoundException("error"));
- PowerMockito.doThrow(new HttpException(500, "error")).when(tm).createTopic("testtopic", "", 1, 1);
- PowerMockito.doThrow(new HttpException(500, "error")).when(tm).revokeConsumer("read", "1");
- PowerMockito.doThrow(new HttpException(500, "error")).when(tm).allowConsumer("read", "1");
- String[] parts1 = { "create", "testtopic", "1", "1" };
- String[] parts2 = { "grant", "write", "write", "1" };
- String[] parts3 = { "revoke", "read", "read", "1" };
- String[] parts4 = { "list", "testtopic", "1", "1" };
- List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- }
-
- @Test
- public void testExecute_error_3() throws com.att.nsa.apiClient.http.HttpException, IOException {
- PowerMockito.doThrow(new HttpException(500, "error")).when(tm).createTopic("testtopic", "", 1, 1);
- PowerMockito.doThrow(new HttpException(500, "error")).when(tm).allowProducer("read", "1");
- String[] parts1 = { "create", "testtopic", "1a", "1a" };
- String[] parts2 = { "grant", "write", "read", "1" };
- List<String[]> parts = Arrays.asList(parts1, parts2);
- for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
- String[] part = (String[]) iterator.next();
-
- try {
- command.execute(part, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- }
-
- @Test
- public void testDisplayHelp() {
-
- command.displayHelp(printStream);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.att.nsa.apiClient.http.HttpException;
+import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
+import com.att.nsa.cmdtool.CommandNotReadyException;
+import org.onap.dmaap.mr.client.MRClientFactory;
+import org.onap.dmaap.mr.client.MRTopicManager.TopicInfo;
+import org.onap.dmaap.mr.client.MRTopicManager;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ MRClientFactory.class })
+public class TopicCommandTest {
+ @InjectMocks
+ private TopicCommand command;
+ @Mock
+ private MRTopicManager tm;
+ @Mock
+ private TopicInfo ti;
+ @Mock
+ private PrintStream printStream;
+
+ @Before
+ public void setUp() throws Exception {
+
+ MockitoAnnotations.initMocks(this);
+ PowerMockito.mockStatic(MRClientFactory.class);
+ PowerMockito.when(MRClientFactory.createTopicManager(Arrays.asList("localhost"), null, null)).thenReturn(tm);
+ PowerMockito.when(tm.getTopicMetadata("testtopic")).thenReturn(ti);
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetMatches() {
+
+ command.getMatches();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckReady() {
+
+ try {
+ command.checkReady(new MRCommandContext());
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute() {
+
+ String[] parts1 = { "create", "testtopic", "1", "1" };
+ String[] parts2 = { "grant", "write", "read", "1" };
+ String[] parts3 = { "revoke", "write", "read", "1" };
+ String[] parts4 = { "list", "testtopic", "1", "1" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ }
+
+ @Test
+ public void testExecute_error() {
+
+ String[] parts1 = { "create", "testtopic", "1", "1" };
+ String[] parts2 = { "grant", "write", "read", "1" };
+ String[] parts3 = { "revoke", "write", "read", "1" };
+ String[] parts4 = { "list", "testtopic", "1", "1" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ }
+
+ @Test
+ public void testExecute_error_1() throws com.att.nsa.apiClient.http.HttpException, IOException {
+ PowerMockito.when(tm.getTopicMetadata("testtopic")).thenThrow(new IOException("error"));
+ PowerMockito.doThrow(new IOException()).when(tm).createTopic("testtopic", "", 1, 1);
+ PowerMockito.doThrow(new IOException()).when(tm).revokeProducer("read", "1");
+ String[] parts1 = { "create", "testtopic", "1", "1" };
+ String[] parts2 = { "grant", "read", "read", "1" };
+ String[] parts3 = { "revoke", "write", "read", "1" };
+ String[] parts4 = { "list", "testtopic", "1", "1" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ }
+
+ @Test
+ public void testExecute_error_2() throws com.att.nsa.apiClient.http.HttpException, IOException {
+ PowerMockito.when(tm.getTopicMetadata("testtopic")).thenThrow(new HttpObjectNotFoundException("error"));
+ PowerMockito.doThrow(new HttpException(500, "error")).when(tm).createTopic("testtopic", "", 1, 1);
+ PowerMockito.doThrow(new HttpException(500, "error")).when(tm).revokeConsumer("read", "1");
+ PowerMockito.doThrow(new HttpException(500, "error")).when(tm).allowConsumer("read", "1");
+ String[] parts1 = { "create", "testtopic", "1", "1" };
+ String[] parts2 = { "grant", "write", "write", "1" };
+ String[] parts3 = { "revoke", "read", "read", "1" };
+ String[] parts4 = { "list", "testtopic", "1", "1" };
+ List<String[]> parts = Arrays.asList(parts1, parts2, parts3, parts4);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ }
+
+ @Test
+ public void testExecute_error_3() throws com.att.nsa.apiClient.http.HttpException, IOException {
+ PowerMockito.doThrow(new HttpException(500, "error")).when(tm).createTopic("testtopic", "", 1, 1);
+ PowerMockito.doThrow(new HttpException(500, "error")).when(tm).allowProducer("read", "1");
+ String[] parts1 = { "create", "testtopic", "1a", "1a" };
+ String[] parts2 = { "grant", "write", "read", "1" };
+ List<String[]> parts = Arrays.asList(parts1, parts2);
+ for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
+ String[] part = (String[]) iterator.next();
+
+ try {
+ command.execute(part, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ }
+
+ @Test
+ public void testDisplayHelp() {
+
+ command.displayHelp(printStream);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/TraceCommandTest.java b/src/test/java/org/onap/dmaap/mr/tools/TraceCommandTest.java
index 6ac106a..de76acd 100644
--- a/src/test/java/com/att/nsa/mr/tools/TraceCommandTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/TraceCommandTest.java
@@ -1,102 +1,102 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package com.att.nsa.mr.tools;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.PrintStream;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.nsa.cmdtool.CommandNotReadyException;
-
-@RunWith(PowerMockRunner.class)
-public class TraceCommandTest {
- @InjectMocks
- private TraceCommand command;
- private String[] parts = new String[5];
- @Mock
- private PrintStream printStream;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- for (int i = 0; i < parts.length; i++) {
- parts[i] = "String" + (i + 1);
- }
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void testGetMatches() {
-
- command.getMatches();
- assertTrue(true);
-
- }
-
- @Test
- public void testCheckReady() {
-
- try {
- command.checkReady(new MRCommandContext());
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testExecute() {
-
- try {
- command.execute(parts, new MRCommandContext(), printStream);
- } catch (CommandNotReadyException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- assertTrue(true);
-
- }
-
- @Test
- public void testDisplayHelp() {
-
- command.displayHelp(printStream);
- assertTrue(true);
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.mr.tools;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.PrintStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.att.nsa.cmdtool.CommandNotReadyException;
+
+@RunWith(PowerMockRunner.class)
+public class TraceCommandTest {
+ @InjectMocks
+ private TraceCommand command;
+ private String[] parts = new String[5];
+ @Mock
+ private PrintStream printStream;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ for (int i = 0; i < parts.length; i++) {
+ parts[i] = "String" + (i + 1);
+ }
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testGetMatches() {
+
+ command.getMatches();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testCheckReady() {
+
+ try {
+ command.checkReady(new MRCommandContext());
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testExecute() {
+
+ try {
+ command.execute(parts, new MRCommandContext(), printStream);
+ } catch (CommandNotReadyException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void testDisplayHelp() {
+
+ command.displayHelp(printStream);
+ assertTrue(true);
+
+ }
+
+}
diff --git a/src/test/java/com/att/nsa/mr/tools/ValidatorUtilTest.java b/src/test/java/org/onap/dmaap/mr/tools/ValidatorUtilTest.java
index ec382f4..1306a30 100644
--- a/src/test/java/com/att/nsa/mr/tools/ValidatorUtilTest.java
+++ b/src/test/java/org/onap/dmaap/mr/tools/ValidatorUtilTest.java
@@ -20,7 +20,7 @@
*
*******************************************************************************/
-package com.att.nsa.mr.tools;
+package org.onap.dmaap.mr.tools;
import static org.junit.Assert.assertEquals;
@@ -28,7 +28,7 @@ import java.util.Properties;
import org.junit.Test;
-import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
+import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants;
public class ValidatorUtilTest {