1 package org.openecomp.sdc.be.components.distribution.engine;
4 import org.openecomp.sdc.be.components.BeConfDependentTest;
6 import java.lang.Thread.UncaughtExceptionHandler;
7 import java.util.function.Consumer;
9 public class DmaapConsumerTest extends BeConfDependentTest{
11 private DmaapConsumer createTestSubject() {
12 return new DmaapConsumer(new ExecutorFactory(), new DmaapClientFactory());
16 public void testConsumeDmaapTopic() throws Exception {
17 DmaapConsumer testSubject;
18 Consumer<String> notificationReceived = null;
19 UncaughtExceptionHandler exceptionHandler = new UncaughtExceptionHandlerMock();
22 testSubject = createTestSubject();
23 testSubject.consumeDmaapTopic(notificationReceived, exceptionHandler);
26 private class UncaughtExceptionHandlerMock implements UncaughtExceptionHandler{
29 public void uncaughtException(Thread t, Throwable e) {
30 // TODO Auto-generated method stub