Fix grant manager initialization 63/46463/2
authorDenes Nemeth <denes.nemeth@nokia.com>
Mon, 7 May 2018 20:53:42 +0000 (22:53 +0200)
committerDenes Nemeth <denes.nemeth@nokia.com>
Mon, 7 May 2018 21:00:23 +0000 (23:00 +0200)
Change-Id: I3bacfd83caa05b4cdcb74edc787834d3e34e0873
Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com>
Issue-ID: VFC-728

12 files changed:
nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/LifecycleManagerForVfc.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java [new file with mode: 0644]
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java [new file with mode: 0644]
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java [new file with mode: 0644]
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManager.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java [new file with mode: 0644]
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java [new file with mode: 0644]

index 014b714..d237885 100644 (file)
@@ -19,6 +19,7 @@ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm;
 
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.GrantlessGrantManager;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcGrantManager;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -30,7 +31,7 @@ import org.springframework.stereotype.Component;
 public class LifecycleManagerForVfc extends LifecycleManager {
 
     @Autowired
-    LifecycleManagerForVfc(CatalogManagerForVfc catalogManager, GrantlessGrantManager grantManager, CbamRestApiProviderForVfc restApiProvider, VfcExternalSystemInfoProvider vimInfoProvider, JobManagerForVfc jobManager, LifecycleChangeNotificationManagerForVfc notificationManager) {
+    LifecycleManagerForVfc(CatalogManagerForVfc catalogManager, VfcGrantManager grantManager, CbamRestApiProviderForVfc restApiProvider, VfcExternalSystemInfoProvider vimInfoProvider, JobManagerForVfc jobManager, LifecycleChangeNotificationManagerForVfc notificationManager) {
         super(catalogManager, grantManager, restApiProvider, vimInfoProvider, jobManager, notificationManager);
     }
 
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java
new file mode 100644 (file)
index 0000000..4fd5a02
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcNotificationSender;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
+
+import static junit.framework.TestCase.assertNotNull;
+import static org.junit.Assert.*;
+
+public class TestSelfRegistrationManagerForSo extends TestBase {
+    @Test
+    public void testBean() {
+        VfcNotificationSender vfcNotificationSender = Mockito.mock(VfcNotificationSender.class);
+        AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = Mockito.mock(AAIExternalSystemInfoProvider.class);
+        SelfRegistrationManagerForSo selfRegistrationManagerForSo = new SelfRegistrationManagerForSo(aaiExternalSystemInfoProvider, msbApiProvider, cbamRestApiProviderForSo);
+        assertNotNull(selfRegistrationManagerForSo);
+        assertBean(SelfRegistrationManagerForSo.class);
+    }
+}
\ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java
new file mode 100644 (file)
index 0000000..aee54a9
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcNotificationSender;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestSelfRegistrationManagerForVfc extends TestBase {
+    @Test
+    public void testBean() {
+        VfcExternalSystemInfoProvider vfcExternalSystemInfoProvider = Mockito.mock(VfcExternalSystemInfoProvider.class);
+        SelfRegistrationManagerForVfc selfRegistrationManagerForVfc = new SelfRegistrationManagerForVfc(vfcExternalSystemInfoProvider, msbApiProvider, cbamRestApiProviderForVfc);
+        assertNotNull(selfRegistrationManagerForVfc);
+        assertBean(SelfRegistrationManagerForVfc.class);
+    }
+}
\ No newline at end of file
index 0b49b91..6025604 100644 (file)
@@ -16,6 +16,7 @@
 
 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc;
 
+import com.google.common.collect.Sets;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
@@ -96,4 +97,13 @@ public class TestVfcExternalSystemInfoProvider extends TestBase {
             verify(logger).error("Unable to query VNFM from VF-C with myVnfmId identifier", expectedException);
         }
     }
+
+    /**
+     * The VNFM identifier is loaded from property files
+     */
+    @Test
+    public void testGetVnfms(){
+        setFieldWithPropertyAnnotation(vfcExternalSystemInfoProvider, "${vnfmId}", "myVnfmId");
+        assertEquals(Sets.newHashSet("myVnfmId"), vfcExternalSystemInfoProvider.getVnfms());
+    }
 }
index 7a7955e..dcc6e42 100644 (file)
 
 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm;
 
-import static org.junit.Assert.*;
+import junit.framework.TestCase;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
 
-public class TestCbamRestApiProviderForSo {
 
+public class TestCbamRestApiProviderForSo extends TestBase{
+    @Test
+    public void testBean(){
+        CbamTokenProviderForSo cbamTokenProvider = Mockito.mock(CbamTokenProviderForSo.class);
+        AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = Mockito.mock(AAIExternalSystemInfoProvider.class);
+        CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
+        CbamRestApiProviderForSo cbamRestApiProviderForSo = new CbamRestApiProviderForSo(cbamTokenProvider, aaiExternalSystemInfoProvider, cbamSecurityProvider);
+        TestCase.assertNotNull(cbamRestApiProviderForSo);
+        assertBean(CbamRestApiProviderForSo.class);
+    }
 }
\ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java
new file mode 100644 (file)
index 0000000..d762bd7
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm;
+
+import junit.framework.TestCase;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+
+
+public class TestCbamRestApiProviderForVfc extends TestBase{
+    @Test
+    public void testBean(){
+        CbamTokenProviderForVfc cbamTokenProvider = Mockito.mock(CbamTokenProviderForVfc.class);
+        VfcExternalSystemInfoProvider c = Mockito.mock(VfcExternalSystemInfoProvider.class);
+        CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
+        CbamRestApiProviderForVfc cbamRestApiProviderForVfc = new CbamRestApiProviderForVfc(cbamTokenProvider, c, cbamSecurityProvider);
+        TestCase.assertNotNull(cbamRestApiProviderForVfc);
+        assertBean(CbamRestApiProviderForVfc.class);
+    }
+}
\ No newline at end of file
index 4777d9f..1135df9 100644 (file)
@@ -21,15 +21,14 @@ import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
 
 public class TestCbamTokenProviderForSo extends TestBase {
     @Test
     public void testBean(){
-        CbamTokenProviderForSo cbamTokenProvider = Mockito.mock(CbamTokenProviderForSo.class);
         AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = Mockito.mock(AAIExternalSystemInfoProvider.class);
-        CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
-        CbamRestApiProviderForSo cbamRestApiProviderForSo = new CbamRestApiProviderForSo(cbamTokenProvider, aaiExternalSystemInfoProvider, cbamSecurityProvider);
-        TestCase.assertNotNull(cbamRestApiProviderForSo);
-        assertBean(CbamRestApiProviderForSo.class);
+        CbamTokenProviderForSo cbamTokenProviderForSo = new CbamTokenProviderForSo(aaiExternalSystemInfoProvider);
+        TestCase.assertNotNull(cbamTokenProviderForSo);
+        assertBean(CbamTokenProviderForSo.class);
     }
 }
\ No newline at end of file
index 59712d7..edd54d0 100644 (file)
@@ -26,11 +26,9 @@ import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoP
 public class TestCbamTokenProviderForVfc extends TestBase {
     @Test
     public void testBean(){
-        CbamTokenProviderForVfc cbamTokenProvider = Mockito.mock(CbamTokenProviderForVfc.class);
         VfcExternalSystemInfoProvider vfcExternalSystemInfoProvider = Mockito.mock(VfcExternalSystemInfoProvider.class);
-        CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
-        CbamRestApiProviderForVfc cbamRestApiProviderForVfc = new CbamRestApiProviderForVfc(cbamTokenProvider, vfcExternalSystemInfoProvider, cbamSecurityProvider);
-        TestCase.assertNotNull(cbamRestApiProviderForSo);
-        assertBean(CbamRestApiProviderForSo.class);
+        CbamTokenProviderForVfc cbamTokenProviderForVfc = new CbamTokenProviderForVfc(vfcExternalSystemInfoProvider);
+        TestCase.assertNotNull(cbamTokenProviderForVfc);
+        assertBean(CbamTokenProviderForVfc.class);
     }
 }
\ No newline at end of file
index 14e764c..ae58af9 100644 (file)
@@ -390,6 +390,7 @@ public class TestLifecycleManager extends TestBase {
     /**
      * test instantiation with backward compatibility test with Amsterdam release
      * - the vim identifier is supplied as vimid with not camel case
+     * - the access info is supplied as accessinfo with not camel case
      */
     @Test
     public void testInstantiationNoVimId() throws Exception {
@@ -777,7 +778,33 @@ public class TestLifecycleManager extends TestBase {
         assertEquals(0, actualInstantiationRequest.getAllValues().size());
         //verify
         verify(logger).error("VF-C did not send VIM identifier in grant response");
+    }
+
+    /**
+     * instantiation fails if VF-C does not send access info in grant response
+     */
+    @Test
+    public void testVfcFailsToSendAccessInfo() throws Exception {
+        VnfInstantiateRequest instantiationRequest = prepareInstantiationRequest(VimInfo.VimInfoTypeEnum.OPENSTACK_V2_INFO);
 
+        when(vnfApi.vnfsPost(createRequest.capture(), eq(NOKIA_LCM_API_VERSION))).thenReturn(buildObservable(vnfInfo));
+        additionalParam.setInstantiationLevel(INSTANTIATION_LEVEL);
+        when(vfcGrantManager.requestGrantForInstantiate(VNFM_ID, VNF_ID, VIM_ID, ONAP_CSAR_ID, INSTANTIATION_LEVEL, cbamVnfdContent, JOB_ID)).thenReturn(grantResponse);
+        grantResponse.setVimId(VIM_ID);
+        GrantVNFResponseVimAccessInfo accessInfo = new GrantVNFResponseVimAccessInfo();
+        accessInfo.setTenant(TENANT);
+        String caCert = new String(readAllBytes(Paths.get(TestVfcGrantManager.class.getResource("/unittests/localhost.cert.pem").toURI())));
+        vimInfo.setSslInsecure("false");
+        vimInfo.setSslCacert(caCert);
+        //grantResponse.setAccessInfo(accessInfo);
+        ArgumentCaptor<InstantiateVnfRequest> actualInstantiationRequest = ArgumentCaptor.forClass(InstantiateVnfRequest.class);
+        when(vnfApi.vnfsVnfInstanceIdInstantiatePost(eq(VNF_ID), actualInstantiationRequest.capture(), eq(NOKIA_LCM_API_VERSION))).thenReturn(buildObservable(instantiationOperationExecution));
+        //when
+        VnfInstantiateResponse response = lifecycleManager.createAndInstantiate(VNFM_ID, instantiationRequest, restResponse);
+        waitForJobToFinishInJobManager(finished);
+        assertEquals(0, actualInstantiationRequest.getAllValues().size());
+        //verify
+        verify(logger).error("VF-C did not send access info in grant response");
     }
 
     /**
index e245e58..326476e 100644 (file)
@@ -19,6 +19,7 @@ import org.junit.Test;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.GrantlessGrantManager;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcGrantManager;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForSo;
 import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
 
@@ -32,11 +33,11 @@ public class TestLifecycleManagerForVfc extends TestBase{
     @Test
     public void testBean(){
         CatalogManagerForVfc catalogManager = mock(CatalogManagerForVfc.class);
-        GrantlessGrantManager grantManager = mock(GrantlessGrantManager.class);
-        VfcExternalSystemInfoProvider aaiExternalSystemInfoProvider = mock(VfcExternalSystemInfoProvider.class);
-        JobManagerForVfc jobManagerForSo = mock(JobManagerForVfc.class);
-        LifecycleChangeNotificationManagerForVfc lifecycleChangeNotificationManagerForSo = mock(LifecycleChangeNotificationManagerForVfc.class);
-        LifecycleManagerForVfc lifecycleManagerForSo = new LifecycleManagerForVfc(catalogManager, grantManager, cbamRestApiProviderForVfc, aaiExternalSystemInfoProvider, jobManagerForSo, lifecycleChangeNotificationManagerForSo);
+        VfcGrantManager vfcGrantManager = mock(VfcGrantManager.class);
+        VfcExternalSystemInfoProvider vfcExternalSystemInfoProvider = mock(VfcExternalSystemInfoProvider.class);
+        JobManagerForVfc lifecycleManagerForVfc = mock(JobManagerForVfc.class);
+        LifecycleChangeNotificationManagerForVfc lifecycleChangeNotificationManagerForVfc = mock(LifecycleChangeNotificationManagerForVfc.class);
+        LifecycleManagerForVfc lifecycleManagerForSo = new LifecycleManagerForVfc(catalogManager, vfcGrantManager, cbamRestApiProviderForVfc, vfcExternalSystemInfoProvider, lifecycleManagerForVfc, lifecycleChangeNotificationManagerForVfc);
         assertNotNull(lifecycleManagerForSo);
         assertBean(LifecycleChangeNotificationManagerForVfc.class);
     }
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java
new file mode 100644 (file)
index 0000000..3eff92c
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.notification.AAINotificationProcessor;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestLifecycleChangeNotificationManagerForSo extends TestBase {
+    @Test
+    public void testBean() {
+        AAINotificationProcessor aaiNotificationProcessor = Mockito.mock(AAINotificationProcessor.class);
+        LifecycleChangeNotificationManagerForSo lifecycleChangeNotificationManagerForSo = new LifecycleChangeNotificationManagerForSo(cbamRestApiProviderForSo, selfRegistrationManagerForSo, aaiNotificationProcessor);
+        assertNotNull(lifecycleChangeNotificationManagerForSo);
+        assertBean(LifecycleChangeNotificationManagerForSo.class);
+    }
+}
\ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java
new file mode 100644 (file)
index 0000000..35a8fce
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.notification.AAINotificationProcessor;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcNotificationSender;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestLifecycleChangeNotificationManagerForVfc extends TestBase {
+    @Test
+    public void testBean() {
+        VfcNotificationSender vfcNotificationSender = Mockito.mock(VfcNotificationSender.class);
+        LifecycleChangeNotificationManagerForVfc lifecycleChangeNotificationManagerForVfc = new LifecycleChangeNotificationManagerForVfc(cbamRestApiProviderForVfc, selfRegistrationManagerForVfc, vfcNotificationSender);
+        assertNotNull(lifecycleChangeNotificationManagerForVfc);
+        assertBean(LifecycleChangeNotificationManagerForVfc.class);
+    }
+}
\ No newline at end of file