summaryrefslogtreecommitdiffstats
path: root/nokiav2/driver/src/test/java/org/onap/vfc/nfvo
diff options
context:
space:
mode:
Diffstat (limited to 'nokiav2/driver/src/test/java/org/onap/vfc/nfvo')
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java179
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestBase.java10
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForSo.java35
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForVfc.java36
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java23
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java35
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java36
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForSo.java34
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForVfc.java33
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForSo.java43
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java43
11 files changed, 506 insertions, 1 deletions
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java
index 69a74bc3..8964c80b 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java
@@ -96,6 +96,155 @@ public class TestNokiaSvnfmApplication extends TestBase {
assertTrue(ApplicationReadyEvent.class.isAssignableFrom(event.getClass()));
}
+ /**
+ * Assert that the self registration process is started after the servlet is up and is able to answer REST requests.
+ */
+ @Test
+ @SuppressWarnings("squid:S2925") //the execution is asynchronous no other way to wait
+ public void testRegistrationIsNotCalledIfPreparingForShutdown() throws Exception {
+ //given
+ ApplicationReadyEvent event = Mockito.mock(ApplicationReadyEvent.class);
+ useSo(event);
+ when(jobManagerForSo.isPreparingForShutDown()).thenReturn(true);
+ //when
+ selfRegistrationTriggerer.onApplicationEvent(event);
+ //verify
+ boolean success = false;
+ while (!success) {
+ try {
+ verify(logger).warn("Component is preparing for shutdown giving up component start");
+ success = true;
+ } catch (Error e) {
+
+ }
+ Thread.sleep(10);
+ }
+ verify(selfRegistrationManagerForSo, never()).register();
+ // this forces the event to be fired after the servlet is up (prevents refactor)
+ assertTrue(ApplicationReadyEvent.class.isAssignableFrom(event.getClass()));
+ }
+
+
+ /**
+ * Assert that the self registration process is started after the servlet is up and is able to answer REST requests.
+ */
+ @Test
+ @SuppressWarnings("squid:S2925") //the execution is asynchronous no other way to wait
+ public void testRegistrationIsCalledAfterComponentIsUpForSo() throws Exception {
+ //given
+ ApplicationReadyEvent event = Mockito.mock(ApplicationReadyEvent.class);
+ useSo(event);
+ //when
+ selfRegistrationTriggerer.onApplicationEvent(event);
+ //verify
+ boolean success = false;
+ while (!success) {
+ try {
+ verify(selfRegistrationManagerForSo).register();
+ verify(logger).info("Self registration started");
+ verify(logger).info("Self registration finished");
+ success = true;
+ } catch (Error e) {
+
+ }
+ Thread.sleep(10);
+ }
+ // this forces the event to be fired after the servlet is up (prevents refactor)
+ assertTrue(ApplicationReadyEvent.class.isAssignableFrom(event.getClass()));
+ }
+
+ /**
+ * Failuires in the self registration process is retried for SO
+ */
+ @Test
+ @SuppressWarnings("squid:S2925") //the execution is asynchronous no other way to wait
+ public void testFailuresInRegistrationIsRetriedForSo() throws Exception {
+ //given
+ ApplicationReadyEvent event = Mockito.mock(ApplicationReadyEvent.class);
+ RuntimeException e2 = new RuntimeException();
+ useSo(event);
+ Set<Boolean> calls = new HashSet<>();
+ doAnswer(new Answer() {
+ @Override
+ public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
+ if(calls.size() == 0){
+ calls.add(true);
+ throw e2;
+ }
+ return null;
+ }
+ }).when(selfRegistrationManagerForSo).register();
+ //when
+ selfRegistrationTriggerer.onApplicationEvent(event);
+ //verify
+ boolean success = false;
+ while (!success) {
+ try {
+ verify(logger).info("Self registration finished");
+ success = true;
+ } catch (Error e) {
+
+ }
+ Thread.sleep(10);
+ }
+ verify(selfRegistrationManagerForSo, times(2)).register();
+ verify(systemFunctions).sleep(5000);
+ verify(logger, times(2)).info("Self registration started");
+ verify(logger).error("Self registration failed", e2);
+ // this forces the event to be fired after the servlet is up (prevents refactor)
+ assertTrue(ApplicationReadyEvent.class.isAssignableFrom(event.getClass()));
+ }
+
+ /**
+ * Failuires in the self registration process is retried for VFC
+ */
+ @Test
+ @SuppressWarnings("squid:S2925") //the execution is asynchronous no other way to wait
+ public void testFailuresInRegistrationIsRetriedForVfc() throws Exception {
+ //given
+ ApplicationReadyEvent event = Mockito.mock(ApplicationReadyEvent.class);
+ RuntimeException e2 = new RuntimeException();
+ useVfc(event);
+ Set<Boolean> calls = new HashSet<>();
+ doAnswer(new Answer() {
+ @Override
+ public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
+ if(calls.size() == 0){
+ calls.add(true);
+ throw e2;
+ }
+ return null;
+ }
+ }).when(selfRegistrationManagerForVfc).register();
+ //when
+ selfRegistrationTriggerer.onApplicationEvent(event);
+ //verify
+ boolean success = false;
+ while (!success) {
+ try {
+ verify(logger).info("Self registration finished");
+ success = true;
+ } catch (Error e) {
+
+ }
+ Thread.sleep(10);
+ }
+ verify(selfRegistrationManagerForVfc, times(2)).register();
+ verify(systemFunctions).sleep(5000);
+ verify(logger, times(2)).info("Self registration started");
+ verify(logger).error("Self registration failed", e2);
+ // this forces the event to be fired after the servlet is up (prevents refactor)
+ assertTrue(ApplicationReadyEvent.class.isAssignableFrom(event.getClass()));
+ }
+
+ private void useSo(ApplicationReadyEvent event) {
+ ConfigurableApplicationContext context = Mockito.mock(ConfigurableApplicationContext.class);
+ ConfigurableEnvironment environment = Mockito.mock(ConfigurableEnvironment.class);
+ when(context.getEnvironment()).thenReturn(environment);
+ when(event.getApplicationContext()).thenReturn(context);
+ when(environment.getActiveProfiles()).thenReturn(new String[]{"direct"});
+ }
+
private void useVfc(ApplicationReadyEvent event) {
ConfigurableApplicationContext context = Mockito.mock(ConfigurableApplicationContext.class);
ConfigurableEnvironment environment = Mockito.mock(ConfigurableEnvironment.class);
@@ -111,6 +260,13 @@ public class TestNokiaSvnfmApplication extends TestBase {
when(environment.getActiveProfiles()).thenReturn(new String[]{});
}
+ private void useSo(ContextClosedEvent event) {
+ ApplicationContext context = Mockito.mock(ApplicationContext.class);
+ when(context.getEnvironment()).thenReturn(environment);
+ when(event.getApplicationContext()).thenReturn(context);
+ when(environment.getActiveProfiles()).thenReturn(new String[]{"direct"});
+ }
+
/**
* Assert that the self de-registration process is started after the servlet has been ramped down
*/
@@ -133,6 +289,27 @@ public class TestNokiaSvnfmApplication extends TestBase {
}
/**
+ * Assert that the self de-registration process is started after the servlet has been ramped down
+ */
+ @Test
+ public void testUnRegistrationIsCalledAfterComponentIsUpForSo() throws Exception {
+ //given
+ ContextClosedEvent event = Mockito.mock(ContextClosedEvent.class);
+ useSo(event);
+ //when
+ selfUnregistrationTriggerer.onApplicationEvent(event);
+ //verify
+ InOrder inOrder = Mockito.inOrder(jobManagerForVfc, jobManagerForSo, selfRegistrationManagerForSo);
+ inOrder.verify(jobManagerForVfc).prepareForShutdown();
+ inOrder.verify(jobManagerForSo).prepareForShutdown();
+ inOrder.verify(selfRegistrationManagerForSo).deRegister();
+ verify(logger).info("Self de-registration started");
+ verify(logger).info("Self de-registration finished");
+ // this forces the event to be fired after the servlet is down (prevents refactor)
+ assertTrue(ContextClosedEvent.class.isAssignableFrom(event.getClass()));
+ }
+
+ /**
* Assert that the self registration process is started after the servlet is up and is able to answer REST requests.
*/
@Test
@@ -151,9 +328,9 @@ public class TestNokiaSvnfmApplication extends TestBase {
*/
@Test
@SuppressWarnings("squid:S2925") //the execution is asynchronous no other way to wait
+
public void failedFirstRegistration() {
//given
-
Set<RuntimeException> expectedException = new HashSet<>();
doAnswer(new Answer() {
@Override
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestBase.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestBase.java
index 347d6d2b..cee26fd1 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestBase.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestBase.java
@@ -59,13 +59,16 @@ import org.onap.vfccatalog.api.VnfpackageApi;
import org.onap.vnfmdriver.api.NslcmApi;
import org.onap.vnfmdriver.model.VnfmInfo;
import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
import org.springframework.test.util.ReflectionTestUtils;
import retrofit2.Call;
import retrofit2.Response;
import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
import static org.mockito.Mockito.when;
import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.CbamUtils.SEPARATOR;
@@ -265,4 +268,11 @@ public class TestBase {
return s;
}
}
+
+ protected void assertBean(Class<?> clazz){
+ assertEquals(1, clazz.getDeclaredConstructors().length);
+ Autowired annotation = clazz.getDeclaredConstructors()[0].getAnnotation(Autowired.class);
+ assertNotNull(annotation);
+ assertNotNull(clazz.getAnnotation(Component.class));
+ }
}
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForSo.java
new file mode 100644
index 00000000..8d2094b1
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForSo.java
@@ -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.vnfm;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.SdcPackageProvider;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestCatalogManagerForSo extends TestBase{
+ /**
+ * Test bean
+ */
+ @Test
+ public void testPojo(){
+ SdcPackageProvider sdcPackageProvider = Mockito.mock(SdcPackageProvider.class);
+ CatalogManagerForSo catalogManagerForSo = new CatalogManagerForSo(cbamRestApiProviderForSo, sdcPackageProvider);
+ assertNotNull(catalogManagerForSo);
+ assertBean(JobManagerForVfc.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForVfc.java
new file mode 100644
index 00000000..1a21bd51
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCatalogManagerForVfc.java
@@ -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 org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.SdcPackageProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcPackageProvider;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestCatalogManagerForVfc extends TestBase{
+ /**
+ * Test bean
+ */
+ @Test
+ public void testPojo(){
+ VfcPackageProvider vfcPackageProvider = Mockito.mock(VfcPackageProvider.class);
+ CatalogManagerForVfc catalogManagerForVfc = new CatalogManagerForVfc(cbamRestApiProviderForVfc, vfcPackageProvider);
+ assertNotNull(catalogManagerForVfc);
+ assertBean(JobManagerForVfc.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java
new file mode 100644
index 00000000..7a7955eb
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java
@@ -0,0 +1,23 @@
+/*
+ * 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 static org.junit.Assert.*;
+
+public class TestCbamRestApiProviderForSo {
+
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java
new file mode 100644
index 00000000..4777d9fb
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java
@@ -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.vnfm;
+
+
+import junit.framework.TestCase;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+
+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);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java
new file mode 100644
index 00000000..59712d72
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java
@@ -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.api.VnfmInfoProvider;
+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 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);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForSo.java
new file mode 100644
index 00000000..d25859fa
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForSo.java
@@ -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;
+
+import junit.framework.TestCase;
+import org.junit.Test;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestJobManagerForSo extends TestBase {
+
+ /**
+ * Test bean
+ */
+ @Test
+ public void testPojo(){
+ JobManagerForSo jobManagerForSo = new JobManagerForSo(cbamRestApiProviderForSo, selfRegistrationManagerForSo);
+ assertNotNull(jobManagerForSo);
+ assertBean(JobManagerForVfc.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForVfc.java
new file mode 100644
index 00000000..1a073b58
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestJobManagerForVfc.java
@@ -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;
+
+import org.junit.Test;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestJobManagerForVfc extends TestBase {
+
+ /**
+ * Test bean
+ */
+ @Test
+ public void testPojo(){
+ JobManagerForVfc jobManagerForVfc = new JobManagerForVfc(cbamRestApiProviderForVfc, selfRegistrationManagerForVfc);
+ assertNotNull(jobManagerForVfc);
+ assertBean(JobManagerForVfc.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForSo.java
new file mode 100644
index 00000000..ae51dc85
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForSo.java
@@ -0,0 +1,43 @@
+/*
+ * 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.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.vnfm.notification.LifecycleChangeNotificationManagerForSo;
+
+import static junit.framework.TestCase.assertNotNull;
+import static org.mockito.Mockito.mock;
+
+public class TestLifecycleManagerForSo extends TestBase{
+
+ /**
+ * Test bean
+ */
+ @Test
+ public void testBean(){
+ CatalogManagerForSo catalogManager = mock(CatalogManagerForSo.class);
+ GrantlessGrantManager grantManager = mock(GrantlessGrantManager.class);
+ AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = mock(AAIExternalSystemInfoProvider.class);
+ JobManagerForSo jobManagerForSo = mock(JobManagerForSo.class);
+ LifecycleChangeNotificationManagerForSo lifecycleChangeNotificationManagerForSo = mock(LifecycleChangeNotificationManagerForSo.class);
+ LifecycleManagerForSo lifecycleManagerForSo = new LifecycleManagerForSo(catalogManager, grantManager, cbamRestApiProviderForSo, aaiExternalSystemInfoProvider, jobManagerForSo, lifecycleChangeNotificationManagerForSo);
+ assertNotNull(lifecycleManagerForSo);
+ 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/TestLifecycleManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java
new file mode 100644
index 00000000..e245e58a
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java
@@ -0,0 +1,43 @@
+/*
+ * 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 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.vnfm.notification.LifecycleChangeNotificationManagerForSo;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
+
+import static junit.framework.TestCase.assertNotNull;
+import static org.mockito.Mockito.mock;
+
+public class TestLifecycleManagerForVfc extends TestBase{
+ /**
+ * Test bean
+ */
+ @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);
+ assertNotNull(lifecycleManagerForSo);
+ assertBean(LifecycleChangeNotificationManagerForVfc.class);
+ }
+} \ No newline at end of file