re base code
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / distribution / engine / DmaapConsumerTest.java
1 package org.openecomp.sdc.be.components.distribution.engine;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.be.components.BeConfDependentTest;
5
6 import java.lang.Thread.UncaughtExceptionHandler;
7 import java.util.function.Consumer;
8
9 public class DmaapConsumerTest  extends BeConfDependentTest{
10
11         private DmaapConsumer createTestSubject() {
12                 return new DmaapConsumer(new ExecutorFactory(), new DmaapClientFactory());
13         }
14
15         @Test
16         public void testConsumeDmaapTopic() throws Exception {
17                 DmaapConsumer testSubject;
18                 Consumer<String> notificationReceived = null;
19                 UncaughtExceptionHandler exceptionHandler = new UncaughtExceptionHandlerMock();
20
21                 // default test
22                 testSubject = createTestSubject();
23                 testSubject.consumeDmaapTopic(notificationReceived, exceptionHandler);
24         }
25         
26         private class UncaughtExceptionHandlerMock implements UncaughtExceptionHandler{
27
28                 @Override
29                 public void uncaughtException(Thread t, Throwable e) {
30                         // TODO Auto-generated method stub
31                         
32                 }
33                 
34         }
35 }