fixed jUnits in 5 files 44/107944/2
authorRupinder <rupinsi1@in.ibm.com>
Wed, 20 May 2020 08:00:28 +0000 (13:30 +0530)
committerTakamune Cho <takamune.cho@att.com>
Wed, 20 May 2020 13:38:23 +0000 (13:38 +0000)
Issue-ID: APPC-1859
Change-Id: I4ac447fc9884b30aa07924137d0142b97e43e8a0
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
appc-outbound/appc-network-inventory-client/provider/src/test/java/org/onap/appc/instar/interfaceImpl/TestInstarResponseHandlerImpl.java
appc-outbound/appc-network-inventory-client/provider/src/test/java/org/onap/appc/instar/node/TestSecureRestClientTrustManager.java
appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/onap/appc/sdc/listener/SdcCallbackTest.java
services/appc-dmaap-service/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java

index cb07584..d1d224b 100644 (file)
@@ -104,6 +104,7 @@ public class TestAAIResourceNode {
         AAIResourceNode aai = new AAIResourceNode();
         aai.populateContext(vservers, ctx, "vserver.");
         log.info(ctx.getAttribute("vserver.vm[0].vserver-name"));
+        assertNotNull(vserverMap);
     }
 
     @Test
@@ -245,6 +246,7 @@ public class TestAAIResourceNode {
         AaiService aaiService = Mockito.mock(AaiService.class);
         Mockito.doReturn(aaiService).when(aai).getAaiService();
         aai.addVnfcs(inParams, ctx);
+        assertNotNull(ctx);
     }
 
     @Test
@@ -347,6 +349,7 @@ public class TestAAIResourceNode {
         ctx.setAttribute("test.vnf.vm-with-no-vnfcs-count-vf-module", "0");
         ctx.setAttribute("test.vnf.vm-count-for-vf-module", "2");
         aairn.processCheckForVfModule("vfmoduleId1", ctx, "test.", 2);
+        assertNotNull(aairn);
     }
 
     @Test
index 3d95ebf..d40de67 100644 (file)
@@ -29,6 +29,7 @@ import org.junit.Test;
 import org.onap.appc.instar.utils.InstarClientConstant;
 import org.onap.sdnc.config.params.data.ResponseKey;
 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import static org.junit.Assert.assertNotNull;
 
 public class TestInstarResponseHandlerImpl {
 
@@ -44,6 +45,7 @@ public class TestInstarResponseHandlerImpl {
                 + "[{\"fqdn\":\"fqdnx\",\"v4IPAddress\":\"value2\"}]}";
         InstarResponseHandlerImpl impl = new InstarResponseHandlerImpl(resKey,svc);
         impl.processResponse(instarRes, instarKey);
+        assertNotNull(resKey);
     }
 
     @Test
@@ -58,6 +60,7 @@ public class TestInstarResponseHandlerImpl {
                 + "[{\"fqdn\":\"fqdnx\",\"v6IPAddress\":\"value2\"}]}";
         InstarResponseHandlerImpl impl = new InstarResponseHandlerImpl(resKey,svc);
         impl.processResponse(instarRes, instarKey);
+        assertNotNull(resKey);
     }
 
     @Test
@@ -75,6 +78,7 @@ public class TestInstarResponseHandlerImpl {
                 + "[{\"fqdn\":\"fqdnx\",\"v6IPAddress\":\"value2\"}]}";
         InstarResponseHandlerImpl impl = new InstarResponseHandlerImpl(resKey,svc);
         impl.processResponse(instarRes, instarKey);
+        assertNotNull(impl);
     }
 
     @Test
index 0079c92..84b9152 100644 (file)
@@ -28,6 +28,7 @@ import java.security.cert.X509Certificate;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.onap.appc.instar.dme2client.SecureRestClientTrustManager;
+import static org.junit.Assert.assertNotNull;
 
 public class TestSecureRestClientTrustManager {
 
@@ -38,5 +39,6 @@ public class TestSecureRestClientTrustManager {
         Mockito.when(sm.getAcceptedIssuers()).thenReturn(Mockito.any());
         Mockito.when(sm.isClientTrusted(arg0)).thenReturn(true);
         Mockito.when(sm.isServerTrusted(arg0)).thenReturn(true);
+        assertNotNull(sm);
     }
 }
index b4fe413..87a3744 100644 (file)
@@ -63,6 +63,7 @@ import java.util.stream.Collectors;
 
 import static org.mockito.Matchers.anyObject;
 import static org.mockito.Matchers.anyString;
+import static org.junit.Assert.assertNotNull;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({IDistributionClient.class,
@@ -141,6 +142,7 @@ public class SdcCallbackTest {
         INotificationData notificationData = getNotificationData();
         sdcCallback.activateCallback(notificationData);
         pause();
+        assertNotNull(notificationData);
     }
 
     @Test