diff options
author | efiacor <fiachra.corcoran@est.tech> | 2022-03-22 15:45:45 +0000 |
---|---|---|
committer | efiacor <fiachra.corcoran@est.tech> | 2022-03-23 12:40:33 +0000 |
commit | e6afd43dbc9d4f5979bbc9dc1309d826aa8cf58d (patch) | |
tree | 5fd1585fa643e9acccf5fc1c453605308a06e761 /src/test | |
parent | c5a65e41585490b9fa2b2427ecee15a2b66f11f6 (diff) |
[DMAAP-MR] Get topics from kafka option1.4.0
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I8e21d249517f67ef2cbfe5511178e38b357f3d29
Issue-ID: DMAAP-1727
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/dmaap/mr/cambria/beans/DMaaPKafkaMetaBrokerTest.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/beans/DMaaPKafkaMetaBrokerTest.java b/src/test/java/org/onap/dmaap/mr/cambria/beans/DMaaPKafkaMetaBrokerTest.java index d59c839..1c717ca 100644 --- a/src/test/java/org/onap/dmaap/mr/cambria/beans/DMaaPKafkaMetaBrokerTest.java +++ b/src/test/java/org/onap/dmaap/mr/cambria/beans/DMaaPKafkaMetaBrokerTest.java @@ -24,6 +24,8 @@ import static org.junit.Assert.assertTrue; import com.att.nsa.configs.ConfigDb; import com.att.nsa.configs.ConfigDbException; import com.att.nsa.configs.ConfigPath; +import java.util.Properties; +import org.mockito.ArgumentMatchers; import org.I0Itec.zkclient.ZkClient; import org.apache.kafka.clients.admin.AdminClient; import org.junit.Before; @@ -47,15 +49,13 @@ import org.powermock.modules.junit4.PowerMockRunner; @PrepareForTest({ AdminClient.class }) public class DMaaPKafkaMetaBrokerTest { - @InjectMocks + @Mock private DMaaPKafkaMetaBroker dMaaPKafkaMetaBroker; @Mock private ZkClient fZk; @Mock private AdminClient fKafkaAdminClient; @Mock - private AdminClient client; - @Mock private ConfigDb configDb; @Mock ConfigPath fBaseTopicData; @@ -68,18 +68,13 @@ public class DMaaPKafkaMetaBrokerTest { public void setUp() { MockitoAnnotations.initMocks(this); PowerMockito.mockStatic(AdminClient.class); - // PowerMockito.when(AdminClient.create (any(Properties.class) - // )).thenReturn(fKafkaAdminClient); - - // PowerMockito.mockStatic(AdminUtils.class); + PowerMockito.when(AdminClient.create(ArgumentMatchers.any(Properties.class))).thenReturn(fKafkaAdminClient); PowerMockito.when(configDb.parse("/topics")).thenReturn(fBaseTopicData); - } @Test public void testBrokercreate() { DMaaPKafkaMetaBroker broker = new DMaaPKafkaMetaBroker(); - } @Test @@ -90,7 +85,6 @@ public class DMaaPKafkaMetaBrokerTest { } catch (Exception e) { assertTrue(true); } - } @Test @@ -101,7 +95,6 @@ public class DMaaPKafkaMetaBrokerTest { // TODO Auto-generated catch block e.printStackTrace(); } - } @Test |