added test case to TestController.java 26/84226/2
authorSandeep J <sandeejh@in.ibm.com>
Thu, 4 Apr 2019 09:59:50 +0000 (15:29 +0530)
committerTakamune Cho <takamune.cho@att.com>
Thu, 4 Apr 2019 13:33:20 +0000 (13:33 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: Id6718c61982a477373c8a5af76f7c7d6a61c43c1
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/impl/TestController.java

index ea40fcc..ccea14c 100644 (file)
@@ -8,6 +8,8 @@
  * ================================================================================
  * Modifications Copyright (C) 2019 Ericsson
  * =============================================================================
+ * Modifications Copyright (C) 2019 IBM
+ * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,6 +27,8 @@
 
 package org.onap.appc.listener.impl;
 
+import static org.junit.Assert.assertTrue;
+
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Properties;
@@ -59,6 +63,14 @@ public class TestController {
         new ControllerImpl(properties);
         Mockito.verify(properties).remove(Mockito.any());
     }
+    
+    @Test
+    public void testListeners() {
+        listenerProperties = Mockito.mock(ListenerProperties.class);
+        properties.add(listenerProperties);
+        assertTrue(new ControllerImpl(properties).getListeners() instanceof Map);
+        
+    }
 
     @Test
     public void testStartException() throws NoSuchMethodException, SecurityException {