aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DmaapConsumerTest.java
blob: b35f337ce59ca7707b8963bc06f0e05c2ff3898c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
			
		}
		
	}
}