added test case to PolicyFinderServiceImpl 43/66643/1
authorSandeep J <sandeejh@in.ibm.com>
Fri, 14 Sep 2018 13:17:27 +0000 (18:47 +0530)
committerSandeep J <sandeejh@in.ibm.com>
Fri, 14 Sep 2018 13:20:36 +0000 (18:50 +0530)
to increase code coverage

Issue-ID: CCSDK-552
Change-Id: I9f926a3dc218c2c7a6de6d616b49999f7c531466
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImplTest.java

index 17dddd4..4dc4fa7 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (C) 2018 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
@@ -21,6 +23,7 @@
 package org.onap.ccsdk.apps.ms.neng.service.extinf.impl;
 
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.when;
 
@@ -67,6 +70,12 @@ public class PolicyFinderServiceImplTest {
         doReturn(new GetConfigResponse()).when(policyFinder).makeOutboundCall(Matchers.any(), Matchers.any());
         assertNotNull(policyFinder.getConfig("policy"));
     }
+    
+    @Test
+    public void testFindPolicy() throws Exception {
+        doReturn(new GetConfigResponse()).when(policyFinder).makeOutboundCall(Matchers.any(), Matchers.any());
+        assertNull(policyFinder.findPolicy("policy"));
+    }
 
     @SuppressWarnings("unchecked")
     @Test