From b6b7bef8bdcad15af01ac88a038dd763ce59f68f Mon Sep 17 00:00:00 2001 From: xg353y Date: Tue, 11 Apr 2017 13:30:42 +0200 Subject: [MSO-8] Update the maven dependency Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes. Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc Signed-off-by: xg353y --- .../mso/adapter_utils/tests/CloudConfigTest.java | 43 +- .../mso/adapter_utils/tests/MsoHeatUtilsTest.java | 36 +- .../authentication/AuthenticationMethodTest.java | 115 +++ .../mso/cloud/servertype/NewServerTypeUtils.java | 56 ++ .../mso/cloud/servertype/ServerTypeTest.java | 63 ++ .../mso/openstack/beans/VnfRollbackESTest.java | 800 +++++++++++---------- 6 files changed, 687 insertions(+), 426 deletions(-) create mode 100644 adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodTest.java create mode 100644 adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/NewServerTypeUtils.java create mode 100644 adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/ServerTypeTest.java (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp') diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java index 8632d02164..6be668c056 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java @@ -7,9 +7,9 @@ * 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. @@ -39,14 +39,14 @@ import org.openecomp.mso.cloud.CloudSite; * */ public class CloudConfigTest { - + private static CloudConfig con; private static CloudConfigFactory cloudConfigFactory= new CloudConfigFactory(); - + public CloudConfigTest () { - + } - + /** * This method is called before any test occurs. * It creates a fake tree from scratch @@ -55,11 +55,11 @@ public class CloudConfigTest { public static final void prepare () { ClassLoader classLoader = CloudConfigTest.class.getClassLoader(); String config = classLoader.getResource("cloud_config.json").toString().substring(5); - + cloudConfigFactory.initializeCloudConfig(config,1); con = cloudConfigFactory.getCloudConfig(); } - + /** * This method implements a test for the getCloudConfig method. */ @@ -79,17 +79,19 @@ public class CloudConfigTest { CloudSite site1 = siteMap.get("MT"); CloudSite site2 = siteMap.get("DAN"); CloudSite site3 = siteMap.get("MTINJVCC101"); - + CloudSite site4 = siteMap.get("MTSNJA4LCP1"); + assertEquals (site1.getRegionId(), "regionOne"); assertEquals (site1.getIdentityServiceId(), "MT_KEYSTONE"); assertEquals (site2.getRegionId(), "RegionOne"); assertEquals (site2.getIdentityServiceId(), "DAN_KEYSTONE"); assertEquals (site3.getRegionId(), "regionTwo"); assertEquals (site3.getIdentityServiceId(), "MTINJVCC101_DCP"); - + assertEquals (site4.getRegionId(), "mtsnjlcp1"); + assertEquals (site4.getIdentityServiceId(), "MTSNJA3DCP1"); } - - + + /** * This method implements a test for the getIdentityServices method. */ @@ -97,12 +99,12 @@ public class CloudConfigTest { public final void testGetIdentityServices () { Map identityMap = con.getIdentityServices (); assertNotNull(identityMap); - + CloudIdentity identity1 = identityMap.get("MT_KEYSTONE"); CloudIdentity identity2 = identityMap.get("DAN_KEYSTONE"); CloudIdentity identity3 = identityMap.get("MTINJVCC101_DCP"); CloudIdentity identity4 = identityMap.get("MTSNJA3DCP1"); - + // assertEquals (identity1.getKeystoneUrl(), "http://localhost:5000/v2.0"); // assertEquals (identity1.getIdentityUrl(), "http://localhost:5000/v2.0"); assertEquals (identity1.getMsoId(), "john"); @@ -110,7 +112,7 @@ public class CloudConfigTest { assertEquals (identity1.getAdminTenant(), "admin"); assertEquals (identity1.getMemberRole(), "_member_"); assertEquals (identity1.hasTenantMetadata(), false); - + // assertEquals (identity2.getKeystoneUrl(), "http://localhost:5000/v2.0"); // assertEquals (identity2.getIdentityUrl(), "http://localhost:5000/v2.0"); assertEquals (identity2.getMsoId(), "mockId"); @@ -118,7 +120,7 @@ public class CloudConfigTest { assertEquals (identity2.getAdminTenant(), "service"); assertEquals (identity2.getMemberRole(), "_member_"); assertEquals (identity2.hasTenantMetadata(), false); - + // assertEquals (identity3.getKeystoneUrl(), "http://localhost:5000/v2.0"); // assertEquals (identity3.getIdentityUrl(), "http://localhost:5000/v2.0"); assertEquals (identity3.getMsoId(), "mockIdToo"); @@ -126,7 +128,7 @@ public class CloudConfigTest { assertEquals (identity3.getAdminTenant(), "service"); assertEquals (identity3.getMemberRole(), "admin"); assertEquals (identity3.hasTenantMetadata(), true); - + // assertEquals (identity4.getKeystoneUrl(), "https://localhost:5000/v2.0"); // assertEquals (identity4.getIdentityUrl(), "https://localhost:5000/v2.0"); assertEquals (identity4.getMsoId(), "mockIdToo"); @@ -136,7 +138,7 @@ public class CloudConfigTest { assertEquals (identity4.hasTenantMetadata(), true); } - + /** * This method implements a test for the getCloudSite method. */ @@ -146,9 +148,6 @@ public class CloudConfigTest { assertNotNull(site1); assertEquals (site1.getRegionId(), "regionOne"); assertEquals (site1.getIdentityServiceId(), "MT_KEYSTONE"); - - - } /** @@ -165,7 +164,7 @@ public class CloudConfigTest { assertEquals (identity1.getAdminTenant(), "admin"); assertEquals (identity1.getMemberRole(), "_member_"); assertEquals (identity1.hasTenantMetadata(), false); - + CloudIdentity identity2 = con.getIdentityService("Test"); assertNull(identity2); } diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java index 6f8a6e93d8..3427e42304 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java @@ -7,9 +7,9 @@ * 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. @@ -47,45 +47,45 @@ public class MsoHeatUtilsTest extends MsoCommonUtils { public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory(); public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory(); public static MsoHeatUtils msoHeatUtils; - + @BeforeClass public static final void loadClasses() { ClassLoader classLoader = CloudConfigTest.class.getClassLoader(); String config = classLoader.getResource("cloud_config.json").toString().substring(5); cloudConfigFactory.initializeCloudConfig(config, 1); - msoHeatUtils = new MsoHeatUtils("NO_PROP",msoPropertiesFactory,cloudConfigFactory); + msoHeatUtils = new MsoHeatUtils("NO_PROP",msoPropertiesFactory,cloudConfigFactory); } - + @Test - public final void testCreateStackBadCloudConfig () { + public final void testCreateStackBadCloudConfig () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound { try { msoHeatUtils.createStack ("DOESNOTEXIST", "test", "stackName", "test", new HashMap (), Boolean.TRUE, 10); - } catch (MsoException e) { + } catch (MsoCloudSiteNotFound e) { + + } - } - } - + @Test public final void testCreateStackFailedConnectionHeatClient () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound { try { msoHeatUtils.createStack ("MT", "test", "stackName", "test", new HashMap (), Boolean.TRUE, 10); } catch (MsoIOException e) { - + } - + } - + @Test public final void testCreateStackFailedConnection () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound { try { msoHeatUtils.createStack ("MT", "test", "stackName", "test", new HashMap (), Boolean.TRUE, 10); } catch (MsoIOException e) { - + } - + } - - - + + + } diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodTest.java new file mode 100644 index 0000000000..beb85a4a8e --- /dev/null +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodTest.java @@ -0,0 +1,115 @@ +/* + * ============LICENSE_START========================================== + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + * + * ECOMP and OpenECOMP are trademarks + * and service marks of AT&T Intellectual Property. + * + */ + +package org.openecomp.mso.cloud.authentication; + +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.net.URISyntaxException; + +import org.junit.Test; +import org.openecomp.mso.cloud.CloudIdentity; +import org.openecomp.mso.cloud.authentication.models.RackspaceAuthentication; +import org.openecomp.mso.openstack.exceptions.MsoException; + +import com.woorea.openstack.keystone.model.Authentication; +import com.woorea.openstack.keystone.model.authentication.UsernamePassword; + +/** + * A few JUnit tests to evaluate the new factory that manages authentication + * types and their associated wrapper classes. Here it is assumed that core types + * only are tested. + * + */ +public class AuthenticationMethodTest { + + /** + * + */ + public AuthenticationMethodTest() { + // TODO Auto-generated constructor stub + } + + @Test + public void testCustomRackspaceAuth() { + CloudIdentity ci = new CloudIdentity(); + ci.setIdentityAuthenticationType(CloudIdentity.IdentityAuthenticationType.RACKSPACE_APIKEY); + ci.setMsoPass("FD205490A48D48475607C36B9AD902BF"); + ci.setMsoId("test"); + + try { + Authentication auth = AuthenticationMethodFactory.getAuthenticationFor(ci); + assertTrue(RackspaceAuthentication.class.equals(auth.getClass())); + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | IOException + | URISyntaxException e) { + e.printStackTrace(); + } + } + + @Test + public void testCoreUsernamePasswordAuth() { + CloudIdentity ci = new CloudIdentity(); + ci.setIdentityAuthenticationType(CloudIdentity.IdentityAuthenticationType.USERNAME_PASSWORD); + ci.setMsoPass("FD205490A48D48475607C36B9AD902BF"); + ci.setMsoId("someuser"); + + try { + Authentication auth = AuthenticationMethodFactory.getAuthenticationFor(ci); + assertTrue(UsernamePassword.class.equals(auth.getClass())); + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | IOException + | URISyntaxException e) { + e.printStackTrace(); + } + } + + @Test + public void testCustomRackspaceAuthFromCloudIdentity() { + CloudIdentity ci = new CloudIdentity(); + ci.setIdentityAuthenticationType(CloudIdentity.IdentityAuthenticationType.RACKSPACE_APIKEY); + ci.setMsoPass("FD205490A48D48475607C36B9AD902BF"); + ci.setMsoId("test"); + + try { + Authentication auth = ci.getAuthentication(); + assertTrue(RackspaceAuthentication.class.equals(auth.getClass())); + } catch (MsoException e) { + e.printStackTrace(); + } + } + + @Test + public void testCoreUsernamePasswordAuthFromCloudIdentity() { + CloudIdentity ci = new CloudIdentity(); + ci.setIdentityAuthenticationType(CloudIdentity.IdentityAuthenticationType.USERNAME_PASSWORD); + ci.setMsoPass("FD205490A48D48475607C36B9AD902BF"); + ci.setMsoId("someuser"); + + try { + Authentication auth = ci.getAuthentication(); + assertTrue(UsernamePassword.class.equals(auth.getClass())); + } catch (MsoException e) { + e.printStackTrace(); + } + } +} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/NewServerTypeUtils.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/NewServerTypeUtils.java new file mode 100644 index 0000000000..1cbba3c45e --- /dev/null +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/NewServerTypeUtils.java @@ -0,0 +1,56 @@ +/** + * + */ +package org.openecomp.mso.cloud.servertype; + +import java.util.Map; + +import org.openecomp.mso.cloud.CloudIdentity; +import org.openecomp.mso.openstack.beans.MsoTenant; +import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound; +import org.openecomp.mso.openstack.exceptions.MsoException; +import org.openecomp.mso.openstack.utils.MsoTenantUtils; + + +public class NewServerTypeUtils extends MsoTenantUtils { + + /** + * @param msoPropID + */ + public NewServerTypeUtils(String msoPropID) { + super(msoPropID); + } + + @Override + public String createTenant(String tenantName, String cloudSiteId, Map metadata, boolean backout) + throws MsoException { + // TODO Auto-generated method stub + return null; + } + + @Override + public MsoTenant queryTenant(String tenantId, String cloudSiteId) throws MsoException, MsoCloudSiteNotFound { + // TODO Auto-generated method stub + return null; + } + + @Override + public MsoTenant queryTenantByName(String tenantName, String cloudSiteId) + throws MsoException, MsoCloudSiteNotFound { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean deleteTenant(String tenantId, String cloudSiteId) throws MsoException { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getKeystoneUrl(String regionId, String msoPropID, CloudIdentity cloudIdentity) + throws MsoException { + return msoPropID + ":" + regionId + ":NewServerTypeKeystoneURL/" + cloudIdentity.getIdentityUrl(); + } + +} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/ServerTypeTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/ServerTypeTest.java new file mode 100644 index 0000000000..e2a0f865a0 --- /dev/null +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/servertype/ServerTypeTest.java @@ -0,0 +1,63 @@ +/** + * + */ +package org.openecomp.mso.cloud.servertype; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + +import org.junit.Test; +import org.openecomp.mso.cloud.CloudIdentity; +import org.openecomp.mso.cloud.CloudIdentity.IdentityServerType; +import org.openecomp.mso.cloud.IdentityServerTypeAbstract; +import org.openecomp.mso.openstack.exceptions.MsoException; + +public class ServerTypeTest { + + @Test + public void testKeystoneServerType() { + IdentityServerTypeAbstract keystoneServerType = IdentityServerType.valueOf("KEYSTONE"); + assertNotNull(keystoneServerType); + } + + @Test + public void testNewServerType() { + IdentityServerTypeAbstract customServerType = null; + try { + customServerType = new IdentityServerType("NewServerType", NewServerTypeUtils.class); + + } catch (IllegalArgumentException e) { + fail("An exception should not be raised when we register a new server type for the first time"); + } finally { + System.out.println(IdentityServerType.values().toString()); + assertEquals(customServerType, IdentityServerType.valueOf("NewServerType")); + } + + // Create it a second time + IdentityServerTypeAbstract customServerType2 = null; + try { + customServerType2 = new IdentityServerType("NewServerType", NewServerTypeUtils.class); + fail("An exception should be raised as server type does not exist"); + } catch (IllegalArgumentException e) { + // Fail silently -- it simply indicates we already registered it + customServerType2 = IdentityServerType.valueOf("NewServerType"); + } finally { + System.out.println(IdentityServerType.values().toString()); + assertEquals(customServerType2, IdentityServerType.valueOf("NewServerType")); + } + + // Check the KeystoneURL for this custom TenantUtils + CloudIdentity cloudIdentity = new CloudIdentity(); + cloudIdentity.setIdentityUrl("LocalIdentity"); + cloudIdentity.setIdentityAuthenticationType(CloudIdentity.IdentityAuthenticationType.RACKSPACE_APIKEY); + cloudIdentity.setIdentityServerType((CloudIdentity.IdentityServerType) CloudIdentity.IdentityServerType.valueOf("NewServerType")); + String regionId = "RegionA"; + String msoPropID = "12345"; + try { + assertEquals(cloudIdentity.getKeystoneUrl(regionId, msoPropID), msoPropID + ":" + regionId + ":NewServerTypeKeystoneURL/" + cloudIdentity.getIdentityUrl()); + } catch (MsoException e) { + fail("No MSO Exception should have occured here"); + } + } +} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java index e76ce410d4..27007a3ce1 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java @@ -1,6 +1,6 @@ /* * This file was automatically generated by EvoSuite - * Mon Nov 14 08:51:17 GMT 2016 + * Fri Feb 17 16:22:30 GMT 2017 */ package org.openecomp.mso.openstack.beans; @@ -8,396 +8,424 @@ package org.openecomp.mso.openstack.beans; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; - -import org.openecomp.mso.entity.MsoRequest; +import static org.evosuite.runtime.MockitoExtension.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; +import org.openecomp.mso.entity.MsoRequest; +import org.openecomp.mso.openstack.beans.VnfRollback; -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) public class VnfRollbackESTest extends VnfRollbackESTestscaffolding { - @Test(timeout = 4000) - public void test00() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVolumeGroupName(", vnfCreated="); - vnfRollback0.getVolumeGroupName(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVolumeGroupId("}mvn2f6!r5FG1/_M~M"); - vnfRollback0.getVolumeGroupId(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVolumeGroupId(""); - vnfRollback0.getVolumeGroupId(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVolumeGroupHeatStackId("Z^t$4-eOKP9"); - vnfRollback0.getVolumeGroupHeatStackId(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getVnfId(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVnfId(""); - vnfRollback0.getVnfId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVfModuleStackId("8y*`!>A$@*l8#a>"); - vnfRollback0.getVfModuleStackId(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVfModuleStackId(""); - vnfRollback0.getVfModuleStackId(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(", tenant=", ", tenant=", ", tenant=", false, false, (MsoRequest) null, ", tenant=", "f5`2h^e^.-x", ", tenant="); - String string0 = vnfRollback0.getTenantId(); - assertFalse(vnfRollback0.getVnfCreated()); - assertEquals(", tenant=", vnfRollback0.getCloudSiteId()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - assertEquals(", tenant=", vnfRollback0.getRequestType()); - assertEquals("f5`2h^e^.-x", vnfRollback0.getVolumeGroupId()); - assertEquals(", tenant=", vnfRollback0.getVolumeGroupName()); - assertEquals(", tenant=", vnfRollback0.getVnfId()); - assertEquals(", tenant=", string0); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setTenantId(""); - vnfRollback0.getTenantId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - assertFalse(vnfRollback0.getTenantCreated()); - - vnfRollback0.setTenantCreated(true); - boolean boolean0 = vnfRollback0.getTenantCreated(); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer()); - VnfRollback vnfRollback0 = new VnfRollback("", ", vnf=", "Jvr", false, false, msoRequest0, "", "f'D", "VnfRollback: cloud="); - String string0 = vnfRollback0.getRequestType(); - assertFalse(vnfRollback0.isBase()); - assertEquals("Jvr", vnfRollback0.getCloudSiteId()); - assertEquals("", vnfRollback0.getVnfId()); - assertFalse(vnfRollback0.getTenantCreated()); - assertEquals("f'D", vnfRollback0.getVolumeGroupId()); - assertEquals(", vnf=", vnfRollback0.getTenantId()); - assertEquals("VnfRollback: cloud=", string0); - assertFalse(vnfRollback0.getVnfCreated()); - assertEquals("", vnfRollback0.getVolumeGroupName()); - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setRequestType(""); - vnfRollback0.getRequestType(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer()); - doReturn("Jvr").when(msoRequest0).toString(); - VnfRollback vnfRollback0 = new VnfRollback("", ", vnf=", "Jvr", false, false, msoRequest0, "", "f'D", "VnfRollback: cloud="); - vnfRollback0.getMsoRequest(); - assertEquals("Jvr", vnfRollback0.getCloudSiteId()); - assertEquals("", vnfRollback0.getVnfId()); - assertFalse(vnfRollback0.isBase()); - assertEquals(", vnf=", vnfRollback0.getTenantId()); - assertEquals("", vnfRollback0.getVolumeGroupName()); - assertEquals("f'D", vnfRollback0.getVolumeGroupId()); - assertEquals("VnfRollback: cloud=", vnfRollback0.getRequestType()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(", tenant=", ", tenant=", ", tenant=", false, false, (MsoRequest) null, ", tenant=", "f5`2h^e^.-x", ", tenant="); - String string0 = vnfRollback0.getCloudSiteId(); - assertFalse(vnfRollback0.isBase()); - assertEquals(", tenant=", string0); - assertEquals("f5`2h^e^.-x", vnfRollback0.getVolumeGroupId()); - assertFalse(vnfRollback0.getVnfCreated()); - assertEquals(", tenant=", vnfRollback0.getVnfId()); - assertFalse(vnfRollback0.getTenantCreated()); - assertEquals(", tenant=", vnfRollback0.getVolumeGroupName()); - assertEquals(", tenant=", vnfRollback0.getRequestType()); - assertEquals(", tenant=", vnfRollback0.getTenantId()); - } - - @Test(timeout = 4000) - public void test15() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setCloudSiteId(""); - vnfRollback0.getCloudSiteId(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - } - - @Test(timeout = 4000) - public void test16() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setBaseGroupHeatStackId("3(6Q^)Ic kf:zj"); - vnfRollback0.getBaseGroupHeatStackId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test17() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setBaseGroupHeatStackId(""); - vnfRollback0.getBaseGroupHeatStackId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - } - - @Test(timeout = 4000) - public void test18() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - assertFalse(vnfRollback0.isBase()); - - vnfRollback0.setIsBase(true); - boolean boolean0 = vnfRollback0.isBase(); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test19() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getVfModuleStackId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test20() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getVolumeGroupName(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - } - - @Test(timeout = 4000) - public void test21() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVolumeGroupName(""); - vnfRollback0.getVolumeGroupName(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test22() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - boolean boolean0 = vnfRollback0.getTenantCreated(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(boolean0); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test23() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - boolean boolean0 = vnfRollback0.isBase(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test24() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - String string0 = vnfRollback0.toString(); - assertFalse(vnfRollback0.isBase()); - assertEquals("VnfRollback: cloud=null, tenant=null, vnf=null, tenantCreated=false, vnfCreated=false, requestType = null", string0); - } - - @Test(timeout = 4000) - public void test25() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - boolean boolean0 = vnfRollback0.getVnfCreated(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(boolean0); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test26() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getVolumeGroupHeatStackId(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test27() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getBaseGroupHeatStackId(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test28() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getCloudSiteId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test29() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getTenantId(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test30() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer()); - vnfRollback0.setMsoRequest(msoRequest0); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test31() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getMsoRequest(); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test32() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - assertFalse(vnfRollback0.getVnfCreated()); - - vnfRollback0.setVnfCreated(true); - boolean boolean0 = vnfRollback0.getVnfCreated(); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test33() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getVolumeGroupId(); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.isBase()); - } - - @Test(timeout = 4000) - public void test34() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.getRequestType(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test35() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(); - vnfRollback0.setVolumeGroupHeatStackId(""); - vnfRollback0.getVolumeGroupHeatStackId(); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertFalse(vnfRollback0.getVnfCreated()); - } - - @Test(timeout = 4000) - public void test36() throws Throwable { - VnfRollback vnfRollback0 = new VnfRollback(", tenant=", ", tenant=", ", tenant=", false, false, (MsoRequest) null, ", tenant=", "f5`2h^e^.-x", ", tenant="); - String string0 = vnfRollback0.getVnfId(); - assertEquals(", tenant=", string0); - assertEquals(", tenant=", vnfRollback0.getTenantId()); - assertFalse(vnfRollback0.getVnfCreated()); - assertFalse(vnfRollback0.isBase()); - assertFalse(vnfRollback0.getTenantCreated()); - assertEquals(", tenant=", vnfRollback0.getCloudSiteId()); - assertEquals(", tenant=", vnfRollback0.getVolumeGroupName()); - assertEquals(", tenant=", vnfRollback0.getRequestType()); - assertEquals("f5`2h^e^.-x", vnfRollback0.getVolumeGroupId()); - } + @Test(timeout = 4000) + public void test05() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setVolumeGroupHeatStackId(""); + vnfRollback0.getVolumeGroupHeatStackId(); + assertFalse(vnfRollback0.getTenantCreated()); + assertFalse(vnfRollback0.getVnfCreated()); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.getVnfId(); + assertFalse(vnfRollback0.getTenantCreated()); + assertFalse(vnfRollback0.getVnfCreated()); + assertFalse(vnfRollback0.isBase()); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback("M+!!EJC*~uO", "Q,@Ir,{J2Nuu", "M+!!EJC*~uO", true, true, (MsoRequest) null, "M+!!EJC*~uO", "", "Q,@Ir,{J2Nuu", ""); + assertEquals("M+!!EJC*~uO", vnfRollback0.getVnfId()); + + vnfRollback0.setVnfId(""); + vnfRollback0.getVnfId(); + assertEquals("Q,@Ir,{J2Nuu", vnfRollback0.getTenantId()); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + boolean boolean0 = vnfRollback0.getVnfCreated(); + assertFalse(vnfRollback0.isBase()); + assertFalse(boolean0); + assertFalse(vnfRollback0.getTenantCreated()); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setVfModuleStackId("VnfRollback: cloud="); + vnfRollback0.getVfModuleStackId(); + assertFalse(vnfRollback0.getTenantCreated()); + assertFalse(vnfRollback0.isBase()); + assertFalse(vnfRollback0.getVnfCreated()); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setVfModuleStackId(""); + vnfRollback0.getVfModuleStackId(); + assertFalse(vnfRollback0.isBase()); + assertFalse(vnfRollback0.getTenantCreated()); + assertFalse(vnfRollback0.getVnfCreated()); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback((String) null, (String) null, ", vnf=", false, true, (MsoRequest) null, "", ", vnf=", "", ""); + String string0 = vnfRollback0.getTenantId(); + assertTrue(vnfRollback0.getVnfCreated()); + assertEquals(", vnf=", vnfRollback0.getVolumeGroupId()); + assertNull(string0); + assertEquals("", vnfRollback0.getVolumeGroupName()); + assertEquals(", vnf=", vnfRollback0.getCloudSiteId()); + assertEquals("", vnfRollback0.getRequestType()); + assertFalse(vnfRollback0.isBase()); + assertFalse(vnfRollback0.getTenantCreated()); + assertEquals("", vnfRollback0.getModelCustomizationUuid()); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + assertFalse(vnfRollback0.getTenantCreated()); + + vnfRollback0.setTenantCreated(true); + boolean boolean0 = vnfRollback0.getTenantCreated(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setRequestType("$W[I&I@KHseI MUVb"); + vnfRollback0.getRequestType(); + assertFalse(vnfRollback0.getVnfCreated()); + assertFalse(vnfRollback0.isBase()); + assertFalse(vnfRollback0.getTenantCreated()); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback((String) null, (String) null, ", vnf=", false, true, (MsoRequest) null, "", ", vnf=", "", ""); + String string0 = vnfRollback0.getRequestType(); + assertTrue(vnfRollback0.getVnfCreated()); + assertEquals("", vnfRollback0.getVolumeGroupName()); + assertNotNull(string0); + assertEquals(", vnf=", vnfRollback0.getCloudSiteId()); + assertFalse(vnfRollback0.getTenantCreated()); + assertEquals("", string0); + assertEquals(", vnf=", vnfRollback0.getVolumeGroupId()); + assertEquals("", vnfRollback0.getModelCustomizationUuid()); + assertFalse(vnfRollback0.isBase()); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(msoRequest0).toString(); + VnfRollback vnfRollback0 = new VnfRollback("b", "b", "b", true, false, msoRequest0, "b", "b", "*^0M|pdSi&sbx2u>4q#", (String) null); + vnfRollback0.getMsoRequest(); + assertEquals("b", vnfRollback0.getCloudSiteId()); + assertEquals("b", vnfRollback0.getTenantId()); + assertFalse(vnfRollback0.getVnfCreated()); + assertEquals("b", vnfRollback0.getVnfId()); + assertEquals("b", vnfRollback0.getVolumeGroupName()); + assertEquals("*^0M|pdSi&sbx2u>4q#", vnfRollback0.getRequestType()); + assertEquals("b", vnfRollback0.getVolumeGroupId()); + assertFalse(vnfRollback0.isBase()); + assertTrue(vnfRollback0.getTenantCreated()); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.getModelCustomizationUuid(); + assertFalse(vnfRollback0.getVnfCreated()); + assertFalse(vnfRollback0.getTenantCreated()); + assertFalse(vnfRollback0.isBase()); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setModelCustomizationUuid("