re base code
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / distribution / engine / DmaapHealthTest.java
1 package org.openecomp.sdc.be.components.distribution.engine;
2
3 import mockit.Deencapsulation;
4 import org.junit.Test;
5 import org.openecomp.sdc.be.components.BeConfDependentTest;
6 import org.openecomp.sdc.common.api.HealthCheckInfo;
7
8 import java.net.URISyntaxException;
9
10 public class DmaapHealthTest extends BeConfDependentTest{
11
12         private DmaapHealth createTestSubject() {
13                 return new DmaapHealth();
14         }
15
16         @Test
17         public void testInit() throws Exception {
18                 DmaapHealth testSubject;
19                 DmaapHealth result;
20
21                 // default test
22                 testSubject = createTestSubject();
23                 result = testSubject.init();
24         }
25
26         @Test
27         public void testDestroy() throws Exception {
28                 DmaapHealth testSubject;
29
30                 // default test
31                 testSubject = createTestSubject();
32                 Deencapsulation.invoke(testSubject, "destroy");
33         }
34
35         @Test
36         public void testReport() throws Exception {
37                 DmaapHealth testSubject;
38                 Boolean isUp = false;
39
40                 // default test
41                 testSubject = createTestSubject();
42                 testSubject.report(isUp);
43         }
44
45         @Test
46         public void testGetHealthCheckInfo() throws Exception {
47                 DmaapHealth testSubject;
48                 HealthCheckInfo result;
49
50                 // default test
51                 testSubject = createTestSubject();
52                 result = testSubject.getHealthCheckInfo();
53         }
54
55         @Test(expected=URISyntaxException.class)
56         public void testGetUrlHost() throws Exception {
57                 String qualifiedHost = "";
58                 String result;
59
60                 // default test
61                 result = DmaapHealth.getUrlHost(qualifiedHost);
62         }
63         
64         @Test
65         public void testGetUrlHost_2() throws Exception {
66                 String qualifiedHost = "www.mock.com";
67                 String result;
68
69                 // default test
70                 result = DmaapHealth.getUrlHost(qualifiedHost);
71         }
72 }