aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java
new file mode 100644
index 0000000000..b35f337ce5
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.sdc.be.components.distribution.engine;
+
+import java.lang.Thread.UncaughtExceptionHandler;
+import java.util.function.Consumer;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.components.BeConfDependentTest;
+
+public class DmaapConsumerTest extends BeConfDependentTest{
+
+ private DmaapConsumer createTestSubject() {
+ return new DmaapConsumer(new ExecutorFactory(), new DmaapClientFactory());
+ }
+
+ @Test
+ public void testConsumeDmaapTopic() throws Exception {
+ DmaapConsumer testSubject;
+ Consumer<String> notificationReceived = null;
+ UncaughtExceptionHandler exceptionHandler = new UncaughtExceptionHandlerMock();
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.consumeDmaapTopic(notificationReceived, exceptionHandler);
+ }
+
+ private class UncaughtExceptionHandlerMock implements UncaughtExceptionHandler{
+
+ @Override
+ public void uncaughtException(Thread t, Throwable e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ }
+} \ No newline at end of file