diff options
Diffstat (limited to 'mso-catalog-db/src/test')
16 files changed, 2926 insertions, 828 deletions
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java index bfd4aa8e09..b577afef66 100644 --- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java @@ -39,7 +39,7 @@ import org.hibernate.Query; import org.hibernate.Session; import org.junit.runner.RunWith; -@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 CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { @Test(timeout = 4000) @@ -65,10 +65,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession"); PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession"); // Undeclared exception! - try { + try { catalogDatabase0.getHeatTemplate((String) null); fail("Expecting exception: ClassCastException"); - + } catch(ClassCastException e) { // // org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles$$EnhancerByMockitoWithCGLIB$$309d9392 cannot be cast to org.openecomp.mso.db.catalog.beans.HeatTemplate @@ -89,10 +89,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { Session session1 = mock(Session.class, new ViolatedAssumptionAnswer()); HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer()); // Undeclared exception! - try { + try { catalogDatabase0.getVfModuleType((String) null, (String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -143,10 +143,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { catalogDatabase0.saveHeatFiles(heatFiles0); Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer()); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatTemplate(heatTemplate0, set0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { } } @@ -190,10 +190,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer()); doReturn(iterator0).when(set0).iterator(); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatTemplate(heatTemplate0, set0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -214,10 +214,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getService(hashMap0, "Successfully. No template found"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -234,10 +234,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getNestedTemplates(2377); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -256,10 +256,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getVnfComponentsRecipe("Generic exception searching for vnf_id=", (String) null, (String) null, (String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -287,10 +287,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1); catalogDatabase0.getVnfComponent(187, ""); // Undeclared exception! - try { + try { catalogDatabase0.getHeatEnvironment((-1)); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { } } @@ -299,10 +299,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test08() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", (String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -322,10 +322,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getVnfComponentsRecipeByVfModuleId("", "(3", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -343,10 +343,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession"); // Undeclared exception! - try { - catalogDatabase0.getVnfComponentsRecipe("B4@1", "v@(U", "", (String) null, ""); + try { + catalogDatabase0.getVnfComponentsRecipe("B4@1", "v@(U", "", (String) null, "", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -363,10 +363,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getService((String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -383,10 +383,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getVfModuleModelName("", "RiY"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -406,10 +406,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { VnfRecipe vnfRecipe0 = mock(VnfRecipe.class, new ViolatedAssumptionAnswer()); Service service0 = new Service(); // Undeclared exception! - try { + try { catalogDatabase0.saveService(service0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -426,10 +426,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((Query) null).when(session0).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0); // Undeclared exception! - try { + try { catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -444,10 +444,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer()); VnfResource vnfResource0 = mock(VnfResource.class, new ViolatedAssumptionAnswer()); // Undeclared exception! - try { + try { catalogDatabase0.saveService((Service) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -463,10 +463,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { HeatTemplate heatTemplate0 = new HeatTemplate(); LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatTemplate((HeatTemplate) null, (Set<HeatTemplateParam>) linkedHashSet0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -482,10 +482,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((-1)).when(vnfResource0).getId(); doReturn("#5|%>JWRPJfP)S@").when(vnfResource0).getVnfType(); // Undeclared exception! - try { + try { catalogDatabase0.saveOrUpdateVnfResource(vnfResource0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -500,10 +500,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MsoLogger.StatusCode.values(); CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.saveVnfRecipe((VnfRecipe) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -520,10 +520,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn((String) null, (String) null).when(service0).getServiceNameVersionId(); doReturn((String) null).when(service0).getServiceVersion(); // Undeclared exception! - try { + try { catalogDatabase0.saveService(service0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -542,10 +542,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); HeatEnvironment heatEnvironment0 = new HeatEnvironment(); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatEnvironment(heatEnvironment0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -559,10 +559,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MessageEnum messageEnum0 = MessageEnum.APIH_GENERAL_METRICS; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatEnvironment((HeatEnvironment) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -575,10 +575,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test22() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVnfRecipe((String) null, (String) null, (String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -592,10 +592,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MsoLogger.ErrorCode.values(); CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.rollback(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -608,10 +608,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test24() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getAllHeatTemplates(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -624,10 +624,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test25() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getHeatFilesForVfModule((-1539)); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -640,10 +640,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test26() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getHeatEnvironment(0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -656,10 +656,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test27() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getAllHeatEnvironment(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -672,10 +672,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test28() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.commit(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -691,10 +691,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { heatFiles0.setVersion("E0)WE F/LaV~i2U01"); heatFiles0.setFileName("uIZl|"); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatFiles(heatFiles0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -707,10 +707,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test30() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.saveVnfComponentsRecipe((VnfComponentsRecipe) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -726,10 +726,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MessageEnum messageEnum2 = MessageEnum.NO_PROPERTIES; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.healthCheck(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -743,10 +743,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); catalogDatabase0.close(); // Undeclared exception! - try { + try { catalogDatabase0.getHeatTemplate(1197); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -759,10 +759,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test33() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getAllNetworkResources(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -775,10 +775,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test34() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVnfComponentsRecipe("Ikrt3T$WS\"UMs#Q", "Ikrt3T$WS\"UMs#Q", "Ikrt3T$WS\"UMs#Q", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -791,10 +791,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test35() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getHeatTemplate((String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -807,10 +807,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test36() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVnfComponent(1987, "R$9=*_j3~I=:_"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -823,10 +823,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test37() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getHeatFiles(0, "r#j>oJCQI5r'@)jSH", "K6#W1{s", "vRm"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -839,10 +839,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { public void test38() throws Throwable { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVnfResourcesByRole(""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -856,10 +856,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MessageEnum messageEnum0 = MessageEnum.RA_ASYNC_DELETE_VNF; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getAllVnfResources(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -891,10 +891,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession"); catalogDatabase0.getHeatTemplate((String) null); // Undeclared exception! - try { + try { catalogDatabase0.getHeatEnvironment(148); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { } } @@ -936,10 +936,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { catalogDatabase0.saveHeatFiles(heatFiles0); Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer()); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatTemplate(heatTemplate0, set0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -978,10 +978,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer()); Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer()); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatTemplate(heatTemplate0, set0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { } } @@ -999,10 +999,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { doReturn(query0).when(session1).createQuery(anyString()); PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1); // Undeclared exception! - try { + try { catalogDatabase0.getHeatEnvironment((-1)); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { } } @@ -1017,10 +1017,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { String string2 = "U`9Z8:QQUr-c(T@_/)"; String string3 = "$q')fpKG]Q&i\"'{x"; // Undeclared exception! - try { + try { catalogDatabase0.getNetworkResource("FT>Ri6U\"Ks<.H/g["); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1034,10 +1034,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); int int0 = 1030; // Undeclared exception! - try { + try { catalogDatabase0.getAllVfModules(); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1051,10 +1051,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.DataNotFound; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVfModuleType("serviceVersion", "serviceVersion"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1068,10 +1068,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.Conflict; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getNestedTemplates(2377); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1088,10 +1088,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); String string0 = null; // Undeclared exception! - try { + try { catalogDatabase0.getVnfResource((String) null, (String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1105,10 +1105,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); String string0 = ", description="; // Undeclared exception! - try { + try { catalogDatabase0.getServiceRecipe((-1319), ", description="); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1124,10 +1124,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { String string1 = "735uWxa&iIbU.4]O$"; String string2 = "APIH_ERROR_FROM_BPEL_SERVER"; // Undeclared exception! - try { + try { catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1142,10 +1142,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { String string0 = ",hpGX76\"X~ow4"; String string1 = "APIH_ERROR_FROM_BPEL_SERVER"; // Undeclared exception! - try { + try { catalogDatabase0.getNetworkRecipe("", ",hpGX76\"X~ow4"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1162,10 +1162,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { String string2 = ""; String string3 = null; // Undeclared exception! - try { + try { catalogDatabase0.getVnfResource((String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1180,10 +1180,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { String string0 = "Ikrt3T$WS\"UMs#Q"; String string1 = null; // Undeclared exception! - try { + try { catalogDatabase0.getServiceByUUID("Ikrt3T$WS\"UMs#Q"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1197,10 +1197,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); String string0 = "v@(U"; // Undeclared exception! - try { - catalogDatabase0.getVnfComponentsRecipe("!4@@1", "v@(U", "", (String) null, ""); + try { + catalogDatabase0.getVnfComponentsRecipe("!4@@1", "v@(U", "", (String) null, "", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1217,10 +1217,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { CatalogDatabase catalogDatabase0 = new CatalogDatabase(); HashMap<String, String> hashMap0 = new HashMap<String, String>(); // Undeclared exception! - try { + try { catalogDatabase0.getService(hashMap0, "Successfully. No template found"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1235,10 +1235,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVnfComponentsRecipeByVfModuleId("", "(3", ""); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1255,10 +1255,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { String string0 = ""; String string1 = "RiY"; // Undeclared exception! - try { + try { catalogDatabase0.getHeatEnvironment("", "RiY", "RiY"); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1275,10 +1275,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { HeatTemplate heatTemplate0 = new HeatTemplate(); LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); // Undeclared exception! - try { + try { catalogDatabase0.saveHeatTemplate(heatTemplate0, (Set<HeatTemplateParam>) linkedHashSet0); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) @@ -1293,10 +1293,10 @@ public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding { MessageEnum messageEnum1 = MessageEnum.RA_SEND_REQUEST_SDNC; CatalogDatabase catalogDatabase0 = new CatalogDatabase(); // Undeclared exception! - try { + try { catalogDatabase0.getVnfComponentsRecipe("Generic exception searching for vnf_id=", (String) null, (String) null, (String) null); fail("Expecting exception: NullPointerException"); - + } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java new file mode 100644 index 0000000000..2f0a1c85ae --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java @@ -0,0 +1,214 @@ +/* + * This file was automatically generated by EvoSuite + * Wed Feb 22 09:34:38 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.junit.Test; +import static org.junit.Assert.*; +import java.sql.Timestamp; +import java.time.Instant; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.evosuite.runtime.mock.java.time.MockInstant; +import org.junit.runner.RunWith; +import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class AllottedResourceCustomizationESTest extends AllottedResourceCustomizationESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelVersion("T2<n67gDL"); + String string0 = allottedResourceCustomization0.getModelVersion(); + assertEquals("T2<n67gDL", string0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelUuid("/jt"); + String string0 = allottedResourceCustomization0.getModelUuid(); + assertEquals("/jt", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelName("Pf"); + String string0 = allottedResourceCustomization0.getModelName(); + assertEquals("Pf", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelInvariantUuid(""); + String string0 = allottedResourceCustomization0.getModelInvariantUuid(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelInstanceName("modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null"); + String string0 = allottedResourceCustomization0.getModelInstanceName(); + assertEquals("modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelCustomizationUuid("(;CXN3pGApF720T|Z"); + String string0 = allottedResourceCustomization0.getModelCustomizationUuid(); + assertEquals("(;CXN3pGApF720T|Z", string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setDescription("Pf"); + String string0 = allottedResourceCustomization0.getDescription(); + assertEquals("Pf", string0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setDescription(""); + String string0 = allottedResourceCustomization0.getDescription(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + Instant instant0 = MockInstant.now(); + Timestamp timestamp0 = Timestamp.from(instant0); + allottedResourceCustomization0.setCreated(timestamp0); + Timestamp timestamp1 = allottedResourceCustomization0.getCreated(); + assertEquals(320000000, timestamp1.getNanos()); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getModelUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.toString(); + assertEquals("modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelUuid(""); + String string0 = allottedResourceCustomization0.getModelUuid(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getModelCustomizationUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getModelVersion(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + Timestamp timestamp0 = new Timestamp(0L); + allottedResourceCustomization0.setCreated(timestamp0); + Timestamp timestamp1 = allottedResourceCustomization0.getCreated(); + assertEquals(0, timestamp1.getNanos()); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getModelInstanceName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelVersion(""); + String string0 = allottedResourceCustomization0.getModelVersion(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getDescription(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelName(""); + String string0 = allottedResourceCustomization0.getModelName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelInstanceName(""); + String string0 = allottedResourceCustomization0.getModelInstanceName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getModelName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + String string0 = allottedResourceCustomization0.getModelInvariantUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelInvariantUuid("JxwW-uj$dU[pMX`|;GM"); + String string0 = allottedResourceCustomization0.getModelInvariantUuid(); + assertEquals("JxwW-uj$dU[pMX`|;GM", string0); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + Timestamp timestamp0 = allottedResourceCustomization0.getCreated(); + assertNull(timestamp0); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + allottedResourceCustomization0.setModelCustomizationUuid(""); + String string0 = allottedResourceCustomization0.getModelCustomizationUuid(); + assertEquals("", string0); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java new file mode 100644 index 0000000000..b1b8251957 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java @@ -0,0 +1,77 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Wed Feb 22 09:34:38 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class AllottedResourceCustomizationESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AllottedResourceCustomizationESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", + "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization" + ); + } + + private static void resetClasses() { + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java new file mode 100644 index 0000000000..545d689378 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java @@ -0,0 +1,271 @@ +/* + * This file was automatically generated by EvoSuite + * Wed Feb 22 09:32:26 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.junit.Test; +import static org.junit.Assert.*; +import java.sql.Timestamp; +import java.util.HashMap; +import java.util.Map; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class ModelESTest extends ModelESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + Model model0 = new Model(); + HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>(); + ServiceRecipe serviceRecipe0 = new ServiceRecipe(); + hashMap0.putIfAbsent("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", serviceRecipe0); + model0.setRecipes(hashMap0); + Map<String, ServiceRecipe> map0 = model0.getRecipes(); + assertEquals(1, map0.size()); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + Model model0 = new Model(); + model0.setModelVersionId("9WI;kp?]"); + String string0 = model0.getModelVersionId(); + assertEquals("9WI;kp?]", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + Model model0 = new Model(); + model0.setModelVersion("_Y+vZ)59ie"); + String string0 = model0.getModelVersion(); + assertEquals("_Y+vZ)59ie", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + Model model0 = new Model(); + model0.setModelType("{!]r;T"); + String string0 = model0.getModelType(); + assertEquals("{!]r;T", string0); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + Model model0 = new Model(); + model0.setModelName(", description="); + String string0 = model0.getModelName(); + assertEquals(", description=", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + Model model0 = new Model(); + model0.setModelInvariantId(".m"); + String string0 = model0.getModelInvariantId(); + assertEquals(".m", string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + Model model0 = new Model(); + model0.setModelCustomizationName("|<HBAfp\"RZv\"?mz&H"); + String string0 = model0.getModelCustomizationName(); + assertEquals("|<HBAfp\"RZv\"?mz&H", string0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + Model model0 = new Model(); + model0.setModelCustomizationId("RA"); + String string0 = model0.getModelCustomizationId(); + assertEquals("RA", string0); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + Model model0 = new Model(); + model0.setModelCustomizationId(""); + String string0 = model0.getModelCustomizationId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + Model model0 = new Model(); + model0.setId((-2490)); + int int0 = model0.getId(); + assertEquals((-2490), int0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + Model model0 = new Model(); + Timestamp timestamp0 = new Timestamp(0L); + model0.setCreated(timestamp0); + Timestamp timestamp1 = model0.getCreated(); + assertSame(timestamp1, timestamp0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + Model model0 = new Model(); + Timestamp timestamp0 = new Timestamp(1L); + model0.setCreated(timestamp0); + Timestamp timestamp1 = model0.getCreated(); + assertSame(timestamp1, timestamp0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + Model model0 = new Model(); + String string0 = model0.toString(); + assertEquals("Model: modelCustomizationId=null,modelCustomizationName=null,modelInvariantId=null,modelName=null,modelType=null,modelVersion=null,modelVersionId=null", string0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + Model model0 = new Model(); + model0.setModelType(""); + String string0 = model0.getModelType(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelInvariantId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + Model model0 = new Model(); + Map<String, ServiceRecipe> map0 = model0.getRecipes(); + assertNull(map0); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelCustomizationName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + Model model0 = new Model(); + model0.setModelVersion(""); + String string0 = model0.getModelVersion(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + Model model0 = new Model(); + model0.setModelVersionId(""); + String string0 = model0.getModelVersionId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelType(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + Model model0 = new Model(); + model0.setModelInvariantId(""); + String string0 = model0.getModelInvariantId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + Model model0 = new Model(); + model0.setModelName(""); + String string0 = model0.getModelName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + Model model0 = new Model(); + model0.setModelCustomizationName(""); + String string0 = model0.getModelCustomizationName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + Model model0 = new Model(); + Timestamp timestamp0 = new Timestamp(0L); + model0.setCreated(timestamp0); + String string0 = model0.toString(); + assertEquals("Model: modelCustomizationId=null,modelCustomizationName=null,modelInvariantId=null,modelName=null,modelType=null,modelVersion=null,modelVersionId=null,created=1/1/70 12:00 AM", string0); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + Model model0 = new Model(); + int int0 = model0.getId(); + assertEquals(0, int0); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + Model model0 = new Model(); + HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>(); + model0.setRecipes(hashMap0); + Map<String, ServiceRecipe> map0 = model0.getRecipes(); + assertTrue(map0.isEmpty()); + } + + @Test(timeout = 4000) + public void test26() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelVersionId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test27() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelCustomizationId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test28() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelVersion(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test29() throws Throwable { + Model model0 = new Model(); + Timestamp timestamp0 = model0.getCreated(); + assertNull(timestamp0); + } + + @Test(timeout = 4000) + public void test30() throws Throwable { + Model model0 = new Model(); + String string0 = model0.getModelName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test31() throws Throwable { + Model model0 = new Model(); + model0.setId(2803); + int int0 = model0.getId(); + assertEquals(2803, int0); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java new file mode 100644 index 0000000000..d9576e0681 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java @@ -0,0 +1,106 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Wed Feb 22 09:32:26 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ModelESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Model"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ModelESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.logger.MessageEnum", + "com.att.eelf.i18n.EELFResolvableErrorEnum", + "org.openecomp.mso.logger.MsoLogger$Catalog", + "org.openecomp.mso.logger.MsoLogger$StatusCode", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", + "org.openecomp.mso.db.catalog.beans.Model", + "com.att.eelf.configuration.EELFManager", + "com.att.eelf.configuration.EELFLogger", + "com.att.eelf.i18n.EELFMsgs", + "org.openecomp.mso.entity.MsoRequest", + "com.att.eelf.configuration.EELFLogger$Level", + "org.openecomp.mso.db.catalog.beans.ServiceRecipe", + "org.openecomp.mso.logger.MsoLogger$ResponseCode", + "com.att.eelf.configuration.SLF4jWrapper", + "com.att.eelf.i18n.EELFResourceManager", + "org.openecomp.mso.logger.MsoLogger", + "org.openecomp.mso.logger.MsoLogger$ErrorCode" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ModelESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.logger.MsoLogger$Catalog", + "org.openecomp.mso.logger.MsoLogger", + "com.att.eelf.i18n.EELFResourceManager", + "com.att.eelf.i18n.EELFMsgs", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "com.att.eelf.configuration.EELFLogger$Level", + "com.att.eelf.configuration.EELFManager", + "org.openecomp.mso.logger.MessageEnum", + "org.openecomp.mso.db.catalog.beans.ServiceRecipe" + ); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java new file mode 100644 index 0000000000..d148e94246 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java @@ -0,0 +1,287 @@ +/* + * This file was automatically generated by EvoSuite + * Wed Feb 22 09:32:08 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.junit.Test; +import static org.junit.Assert.*; +import static org.evosuite.runtime.EvoAssertions.*; +import java.sql.Timestamp; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class ModelRecipeESTest extends ModelRecipeESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setSchemaVersion("594t4m7A7,kaNK"); + String string0 = modelRecipe0.getSchemaVersion(); + assertEquals("594t4m7A7,kaNK", string0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer(0); + modelRecipe0.setRecipeTimeout(integer0); + Integer integer1 = modelRecipe0.getRecipeTimeout(); + assertEquals(0, (int)integer1); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer(1303); + modelRecipe0.setRecipeTimeout(integer0); + Integer integer1 = modelRecipe0.getRecipeTimeout(); + assertEquals(1303, (int)integer1); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer((-8)); + modelRecipe0.setRecipeTimeout(integer0); + Integer integer1 = modelRecipe0.getRecipeTimeout(); + assertEquals((-8), (int)integer1); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setOrchestrationUri("+"); + String string0 = modelRecipe0.getOrchestrationUri(); + assertEquals("+", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setModelParamXSD(""); + String string0 = modelRecipe0.getModelParamXSD(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer(1); + modelRecipe0.setModelId(integer0); + Integer integer1 = modelRecipe0.getModelId(); + assertEquals(1, (int)integer1); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer((-8)); + modelRecipe0.setModelId(integer0); + Integer integer1 = modelRecipe0.getModelId(); + assertEquals((-8), (int)integer1); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setId(2372); + int int0 = modelRecipe0.getId(); + assertEquals(2372, int0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setId((-438)); + int int0 = modelRecipe0.getId(); + assertEquals((-438), int0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setDescription("D|`<b3b"); + String string0 = modelRecipe0.getDescription(); + assertEquals("D|`<b3b", string0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Timestamp timestamp0 = new Timestamp(0L); + modelRecipe0.setCreated(timestamp0); + Timestamp timestamp1 = modelRecipe0.getCreated(); + assertSame(timestamp1, timestamp0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Timestamp timestamp0 = new Timestamp(619L); + modelRecipe0.setCreated(timestamp0); + Timestamp timestamp1 = modelRecipe0.getCreated(); + assertEquals("1970-01-01 00:00:00.619", timestamp1.toString()); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setAction("hz4FY"); + String string0 = modelRecipe0.getAction(); + assertEquals("hz4FY", string0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setAction(""); + String string0 = modelRecipe0.getAction(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + // Undeclared exception! + try { + modelRecipe0.toString(); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.openecomp.mso.db.catalog.beans.ModelRecipe", e); + } + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer(7); + modelRecipe0.setRecipeTimeout(integer0); + modelRecipe0.setModelId(integer0); + String string0 = modelRecipe0.toString(); + assertEquals("ModelRecipe: modelId=7,action=null,schemaVersion=null,orchestrationUri=null,modelParamXSD=null,recipeTimeout=7", string0); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = modelRecipe0.getModelId(); + assertNull(integer0); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer(0); + modelRecipe0.setRecipeTimeout(integer0); + modelRecipe0.setModelId(integer0); + Timestamp timestamp0 = new Timestamp((long) 0); + modelRecipe0.setCreated(timestamp0); + String string0 = modelRecipe0.toString(); + assertEquals("ModelRecipe: modelId=0,action=null,schemaVersion=null,orchestrationUri=null,modelParamXSD=null,recipeTimeout=0,created=1/1/70 12:00 AM", string0); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + String string0 = modelRecipe0.getAction(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setDescription(""); + String string0 = modelRecipe0.getDescription(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setModelParamXSD("nb[xSaP"); + String string0 = modelRecipe0.getModelParamXSD(); + assertEquals("nb[xSaP", string0); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setSchemaVersion(""); + String string0 = modelRecipe0.getSchemaVersion(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = new Integer(0); + modelRecipe0.setModelId(integer0); + Integer integer1 = modelRecipe0.getModelId(); + assertEquals(0, (int)integer1); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + int int0 = modelRecipe0.getId(); + assertEquals(0, int0); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + String string0 = modelRecipe0.getDescription(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test26() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + String string0 = modelRecipe0.getSchemaVersion(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test27() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Integer integer0 = modelRecipe0.getRecipeTimeout(); + assertNull(integer0); + } + + @Test(timeout = 4000) + public void test28() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + String string0 = modelRecipe0.getOrchestrationUri(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test29() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + Timestamp timestamp0 = modelRecipe0.getCreated(); + assertNull(timestamp0); + } + + @Test(timeout = 4000) + public void test30() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + modelRecipe0.setOrchestrationUri(""); + String string0 = modelRecipe0.getOrchestrationUri(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test31() throws Throwable { + ModelRecipe modelRecipe0 = new ModelRecipe(); + String string0 = modelRecipe0.getModelParamXSD(); + assertNull(string0); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java new file mode 100644 index 0000000000..710e5372f6 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java @@ -0,0 +1,77 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Wed Feb 22 09:32:08 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ModelRecipeESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ModelRecipe"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ModelRecipeESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", + "org.openecomp.mso.db.catalog.beans.ModelRecipe" + ); + } + + private static void resetClasses() { + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java new file mode 100644 index 0000000000..eafc69906f --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java @@ -0,0 +1,261 @@ +/* + * This file was automatically generated by EvoSuite + * Tue Feb 21 15:49:25 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.junit.Test; +import static org.junit.Assert.*; +import static org.evosuite.shaded.org.mockito.Mockito.*; +import static org.evosuite.runtime.EvoAssertions.*; +import java.util.ArrayList; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.evosuite.runtime.PrivateAccess; +import org.evosuite.runtime.ViolatedAssumptionAnswer; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class ServiceMacroHolderESTest extends ServiceMacroHolderESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + serviceMacroHolder0.setVnfResources((ArrayList<VnfResource>) null); + ArrayList<VnfResource> arrayList0 = serviceMacroHolder0.getVnfResources(); + assertNull(arrayList0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + VnfResource vnfResource0 = new VnfResource(); + serviceMacroHolder0.addVnfResource(vnfResource0); + ArrayList<VnfResource> arrayList0 = serviceMacroHolder0.getVnfResources(); + assertEquals(1, arrayList0.size()); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + Service service0 = serviceMacroHolder0.getService(); + assertNull(service0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + service0.setId(1124); + Service service1 = serviceMacroHolder0.getService(); + assertNull(service1.getServiceNameVersionId()); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + service0.setId((-760)); + Service service1 = serviceMacroHolder0.getService(); + assertNull(service1.getServiceNameVersionId()); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization(); + serviceMacroHolder0.addNetworkResourceCustomization(networkResourceCustomization0); + ArrayList<NetworkResourceCustomization> arrayList0 = serviceMacroHolder0.getNetworkResourceCustomization(); + assertFalse(arrayList0.isEmpty()); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.setAllottedResourceCustomization((ArrayList<AllottedResourceCustomization>) null); + ArrayList<AllottedResourceCustomization> arrayList0 = serviceMacroHolder0.getAllottedResourceCustomization(); + assertNull(arrayList0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + serviceMacroHolder0.addAllottedResourceCustomization(allottedResourceCustomization0); + ArrayList<AllottedResourceCustomization> arrayList0 = serviceMacroHolder0.getAllottedResourceCustomization(); + assertFalse(arrayList0.isEmpty()); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.setAllottedResourceCustomization((ArrayList<AllottedResourceCustomization>) null); + String string0 = serviceMacroHolder0.toString(); + assertEquals("ServicePlus: service: nullnone", string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.setNetworkResourceCustomization((ArrayList<NetworkResourceCustomization>) null); + String string0 = serviceMacroHolder0.toString(); + assertEquals("ServicePlus: service: nullnone", string0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + Service service0 = mock(Service.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(service0).toString(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + ArrayList<Object> arrayList0 = new ArrayList<Object>(); + arrayList0.add((Object) serviceMacroHolder0); + PrivateAccess.setVariable((Class<ServiceMacroHolder>) ServiceMacroHolder.class, serviceMacroHolder0, "vnfResources", (Object) arrayList0); + // Undeclared exception! + try { + serviceMacroHolder0.toString(); + fail("Expecting exception: ClassCastException"); + + } catch(ClassCastException e) { + // + // org.openecomp.mso.db.catalog.beans.ServiceMacroHolder cannot be cast to org.openecomp.mso.db.catalog.beans.VnfResource + // + verifyException("org.openecomp.mso.db.catalog.beans.ServiceMacroHolder", e); + } + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.setVnfResources((ArrayList<VnfResource>) null); + String string0 = serviceMacroHolder0.toString(); + assertEquals("ServicePlus: service: nullnone", string0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + // Undeclared exception! + try { + serviceMacroHolder0.toString(); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.openecomp.mso.db.catalog.beans.Service", e); + } + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + serviceMacroHolder0.addAllottedResourceCustomization(allottedResourceCustomization0); + String string0 = serviceMacroHolder0.toString(); + assertEquals("ServicePlus: service: nullnoneAllottedResourceCustomizations:ARC[0]: modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization(); + serviceMacroHolder0.addNetworkResourceCustomization(networkResourceCustomization0); + String string0 = serviceMacroHolder0.toString(); + assertEquals("ServicePlus: service: nullnoneNetworkResourceCustomizations:NRC[0]: modelName=nullmodelUuid=nullmodelUuid=nullmodelInvariantUuid=nullmodelVersion=nullmodelCustomizationUuid=nullmodelInstanceName=nullnetworkResourceId=0networkType=null", string0); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization(); + serviceMacroHolder0.setNetworkResourceCustomization((ArrayList<NetworkResourceCustomization>) null); + serviceMacroHolder0.addNetworkResourceCustomization(networkResourceCustomization0); + assertNull(networkResourceCustomization0.getModelInstanceName()); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.setVnfResources((ArrayList<VnfResource>) null); + VnfResource vnfResource0 = new VnfResource(); + serviceMacroHolder0.addVnfResource(vnfResource0); + assertNull(vnfResource0.getModelCustomizationUuid()); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + VnfResource vnfResource0 = new VnfResource(); + serviceMacroHolder0.addVnfResource(vnfResource0); + String string0 = serviceMacroHolder0.toString(); + assertEquals("ServicePlus: service: nullVnfResources: , vnfResource[0]:VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null,modelCustomizationUuid=nullVfModules: NONE", string0); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.addVnfResource((VnfResource) null); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + serviceMacroHolder0.setNetworkResourceCustomization((ArrayList<NetworkResourceCustomization>) null); + ArrayList<NetworkResourceCustomization> arrayList0 = serviceMacroHolder0.getNetworkResourceCustomization(); + assertNull(arrayList0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + Service service1 = serviceMacroHolder0.getService(); + assertNull(service1.getModelInvariantUUID()); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + ArrayList<NetworkResourceCustomization> arrayList0 = serviceMacroHolder0.getNetworkResourceCustomization(); + assertEquals(0, arrayList0.size()); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + serviceMacroHolder0.setAllottedResourceCustomization((ArrayList<AllottedResourceCustomization>) null); + AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization(); + serviceMacroHolder0.addAllottedResourceCustomization(allottedResourceCustomization0); + assertNull(allottedResourceCustomization0.getVersion()); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(); + Service service0 = new Service(); + serviceMacroHolder0.setService(service0); + assertNull(service0.getModelInvariantUUID()); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + ArrayList<AllottedResourceCustomization> arrayList0 = serviceMacroHolder0.getAllottedResourceCustomization(); + assertEquals(0, arrayList0.size()); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + Service service0 = new Service(); + ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0); + ArrayList<VnfResource> arrayList0 = serviceMacroHolder0.getVnfResources(); + assertTrue(arrayList0.isEmpty()); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java new file mode 100644 index 0000000000..43ccd7b728 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java @@ -0,0 +1,97 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Tue Feb 21 15:49:25 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ServiceMacroHolderESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceMacroHolder"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceMacroHolderESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.db.catalog.beans.VfModule", + "com.att.eelf.i18n.EELFResolvableErrorEnum", + "org.openecomp.mso.db.catalog.beans.Service", + "org.openecomp.mso.db.catalog.beans.NetworkResource", + "org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization", + "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", + "org.openecomp.mso.db.catalog.beans.VnfResource", + "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization", + "org.openecomp.mso.db.catalog.beans.ServiceMacroHolder" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ServiceMacroHolderESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.logger.MsoLogger$Catalog", + "org.openecomp.mso.logger.MsoLogger", + "com.att.eelf.i18n.EELFResourceManager", + "com.att.eelf.i18n.EELFMsgs", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "com.att.eelf.configuration.EELFLogger$Level", + "com.att.eelf.configuration.EELFManager", + "org.openecomp.mso.logger.MessageEnum", + "org.openecomp.mso.db.catalog.beans.ServiceRecipe" + ); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java new file mode 100644 index 0000000000..84fbcb5391 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java @@ -0,0 +1,95 @@ +/* + * This file was automatically generated by EvoSuite + * Wed Feb 22 09:33:37 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.junit.Test; +import static org.junit.Assert.*; +import java.sql.Timestamp; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class ServiceToAllottedResourcesESTest extends ServiceToAllottedResourcesESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + serviceToAllottedResources0.setServiceModelUuid("serviceModelUuid=nullarModelCustomizationUuid=null"); + String string0 = serviceToAllottedResources0.getServiceModelUuid(); + assertEquals("serviceModelUuid=nullarModelCustomizationUuid=null", string0); + } + + @Test(timeout = 4000) + public void test1() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + Timestamp timestamp0 = new Timestamp(0L); + serviceToAllottedResources0.setCreated(timestamp0); + Timestamp timestamp1 = serviceToAllottedResources0.getCreated(); + assertEquals("1970-01-01 00:00:00.0", timestamp1.toString()); + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + serviceToAllottedResources0.setArModelCustomizationUuid("D7q@"); + String string0 = serviceToAllottedResources0.getArModelCustomizationUuid(); + assertEquals("D7q@", string0); + } + + @Test(timeout = 4000) + public void test3() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + serviceToAllottedResources0.setArModelCustomizationUuid(""); + String string0 = serviceToAllottedResources0.getArModelCustomizationUuid(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test4() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + String string0 = serviceToAllottedResources0.toString(); + assertEquals("serviceModelUuid=nullarModelCustomizationUuid=null", string0); + } + + @Test(timeout = 4000) + public void test5() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + serviceToAllottedResources0.setServiceModelUuid(""); + String string0 = serviceToAllottedResources0.getServiceModelUuid(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test6() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + Timestamp timestamp0 = new Timestamp((-683L)); + serviceToAllottedResources0.setCreated(timestamp0); + Timestamp timestamp1 = serviceToAllottedResources0.getCreated(); + assertEquals("1969-12-31 23:59:59.317", timestamp1.toString()); + } + + @Test(timeout = 4000) + public void test7() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + String string0 = serviceToAllottedResources0.getServiceModelUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test8() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + String string0 = serviceToAllottedResources0.getArModelCustomizationUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test9() throws Throwable { + ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources(); + Timestamp timestamp0 = serviceToAllottedResources0.getCreated(); + assertNull(timestamp0); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java new file mode 100644 index 0000000000..14ff62fb02 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java @@ -0,0 +1,81 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Wed Feb 22 09:33:37 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ServiceToAllottedResourcesESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceToAllottedResourcesESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ServiceToAllottedResourcesESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources" + ); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java new file mode 100644 index 0000000000..aa2ba2a488 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java @@ -0,0 +1,95 @@ +/* + * This file was automatically generated by EvoSuite + * Wed Feb 22 09:34:56 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.junit.Test; +import static org.junit.Assert.*; +import java.sql.Timestamp; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class ServiceToNetworksESTest extends ServiceToNetworksESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + serviceToNetworks0.setServiceModelUuid("XcrRZj-Y)7"); + String string0 = serviceToNetworks0.getServiceModelUuid(); + assertEquals("XcrRZj-Y)7", string0); + } + + @Test(timeout = 4000) + public void test1() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + serviceToNetworks0.setNetworkModelCustomizationUuid("XcrRZj-Y)7"); + String string0 = serviceToNetworks0.getNetworkModelCustomizationUuid(); + assertEquals("XcrRZj-Y)7", string0); + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + Timestamp timestamp0 = new Timestamp(4701L); + serviceToNetworks0.setCreated(timestamp0); + Timestamp timestamp1 = serviceToNetworks0.getCreated(); + assertEquals(701000000, timestamp1.getNanos()); + } + + @Test(timeout = 4000) + public void test3() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + Timestamp timestamp0 = serviceToNetworks0.getCreated(); + assertNull(timestamp0); + } + + @Test(timeout = 4000) + public void test4() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + String string0 = serviceToNetworks0.getNetworkModelCustomizationUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test5() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + String string0 = serviceToNetworks0.getServiceModelUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test6() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + String string0 = serviceToNetworks0.toString(); + assertEquals("ServiceToNetworks mapping: serviceModelUuid=null,networkModelCustomizationUuid=null", string0); + } + + @Test(timeout = 4000) + public void test7() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + Timestamp timestamp0 = new Timestamp(0L); + serviceToNetworks0.setCreated(timestamp0); + Timestamp timestamp1 = serviceToNetworks0.getCreated(); + assertEquals(0, timestamp1.getNanos()); + } + + @Test(timeout = 4000) + public void test8() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + serviceToNetworks0.setNetworkModelCustomizationUuid(""); + String string0 = serviceToNetworks0.getNetworkModelCustomizationUuid(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test9() throws Throwable { + ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks(); + serviceToNetworks0.setServiceModelUuid(""); + String string0 = serviceToNetworks0.getServiceModelUuid(); + assertEquals("", string0); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java new file mode 100644 index 0000000000..ba0c5d7d5b --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java @@ -0,0 +1,81 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Wed Feb 22 09:34:56 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.beans; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ServiceToNetworksESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceToNetworks"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceToNetworksESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.db.catalog.beans.ServiceToNetworks" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ServiceToNetworksESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.db.catalog.beans.ServiceToNetworks" + ); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java index 1a1c6ea2c2..1ab15a22fb 100644 --- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java @@ -1,6 +1,6 @@ /* * This file was automatically generated by EvoSuite - * Mon Nov 14 08:19:11 GMT 2016 + * Tue Feb 21 15:51:08 GMT 2017 */ package org.openecomp.mso.db.catalog.beans; @@ -8,719 +8,971 @@ package org.openecomp.mso.db.catalog.beans; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; - import java.sql.Timestamp; import java.time.Instant; +import java.time.temporal.ChronoField; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalField; +import java.time.temporal.UnsupportedTemporalTypeException; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.PrivateAccess; import org.evosuite.runtime.System; import org.evosuite.runtime.mock.java.time.MockInstant; +import org.evosuite.runtime.mock.java.util.MockDate; import org.junit.runner.RunWith; +import org.openecomp.mso.db.catalog.beans.VfModule; -@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 VfModuleESTest extends VfModuleESTestscaffolding { - @Test(timeout = 4000) - public void test00() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setModelVersion("EzJ)~3C++"); - Integer integer0 = new Integer((-1)); - vfModule0.setVnfResourceId(integer0); - vfModule0.getModelInvariantUuid(); - vfModule0.getModelInvariantUuid(); - VfModule vfModule1 = new VfModule(); - vfModule1.setDescription(""); - vfModule1.setIsBase((-1)); - Integer integer1 = new Integer((-289)); - vfModule1.setTemplateId(integer1); - vfModule1.getTemplateId(); - vfModule1.setModelName("Yp{,,+-pFJp!Ym6r^"); - vfModule1.getDescription(); - vfModule0.setId((-1)); - vfModule0.setId((-4103)); - vfModule0.getId(); - vfModule1.getVnfResourceId(); - vfModule1.setTemplateId((Integer) null); - Timestamp timestamp0 = new Timestamp((-3970L)); - vfModule0.setCreated(timestamp0); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.isTheSameVersion("1&T-qG"); - Integer integer0 = new Integer((-385)); - Integer integer1 = Integer.valueOf((-385)); - Integer.toUnsignedString((-1)); - Integer.getInteger("", integer1); - vfModule0.setVolTemplateId(integer0); - vfModule0.setModelInvariantUuid("1&T-qG"); - vfModule0.toString(); - vfModule0.getIsBase(); - vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=-385,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.setType("wO"); - vfModule0.getType(); - vfModule0.isBase(); - vfModule0.getIsBase(); - vfModule0.setAsdcUuid("VF="); - vfModule0.getModelVersion(); - vfModule0.setId(1); - vfModule0.setModelName("VF="); - vfModule0.getVolEnvironmentId(); - vfModule0.setVolTemplateId((Integer) null); - vfModule0.setAsdcUuid(""); - vfModule0.setModelVersion("1&T-qG"); - vfModule0.isBase(); - vfModule0.getEnvironmentId(); - vfModule0.toString(); - vfModule0.getDescription(); - vfModule0.setType(""); - vfModule0.setVnfResourceId(integer1); - System.setCurrentTimeMillis((-1L)); - vfModule0.getVnfResourceId(); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - System.setCurrentTimeMillis(1L); - VfModule vfModule0 = new VfModule(); - vfModule0.setModelInvariantUuid("57f9"); - vfModule0.setModelName(""); - vfModule0.getDescription(); - vfModule0.toString(); - vfModule0.setType(""); - vfModule0.getDescription(); - vfModule0.getCreated(); - vfModule0.setCreated((Timestamp) null); - Integer integer0 = new Integer(2109); - Integer integer1 = new Integer(1); - Integer.getInteger("D}'htOb?", integer1); - vfModule0.setVolEnvironmentId(integer0); - vfModule0.getVnfResourceId(); - vfModule0.getModelName(); - System.setCurrentTimeMillis(0L); - vfModule0.getModelName(); - vfModule0.getCreated(); - vfModule0.getModelName(); - vfModule0.getDescription(); - vfModule0.getDescription(); - vfModule0.getModelName(); - vfModule0.toString(); - vfModule0.getCreated(); - System.setCurrentTimeMillis(1L); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setId(600); - vfModule0.toString(); - Integer integer0 = new Integer((-1)); - Integer.divideUnsigned((-1), 1); - Integer.min((-1), 1); - Integer.max(2123, 600); - Integer integer1 = new Integer(2123); - vfModule0.setEnvironmentId(integer1); - vfModule0.setEnvironmentId(integer0); - vfModule0.isMoreRecentThan(",volEnvtId="); - vfModule0.getId(); - Integer.compareUnsigned(467, (-1)); - vfModule0.setEnvironmentId(integer0); - VfModule vfModule1 = new VfModule(); - vfModule1.isMoreRecentThan("VF=null,modelName=null,version=null,id=600,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule1.toString(); - VfModule vfModule2 = new VfModule(); - vfModule0.getEnvironmentId(); - vfModule2.getDescription(); - vfModule2.setDescription((String) null); - vfModule2.setModelVersion(", description="); - vfModule2.toString(); - vfModule1.getModelInvariantUuid(); - vfModule1.toString(); - vfModule1.getEnvironmentId(); - vfModule0.setAsdcUuid(""); - vfModule0.setDescription((String) null); - vfModule0.getIsBase(); - vfModule0.getAsdcUuid(); - vfModule0.getCreated(); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.getDescription(); - Integer integer0 = new Integer(0); - vfModule0.setVolTemplateId(integer0); - vfModule0.setVersion((String) null); - vfModule0.getDescription(); - vfModule0.setAsdcUuid((String) null); - Integer integer1 = new Integer(0); - Integer.getInteger((String) null); - vfModule0.setVnfResourceId(integer1); - vfModule0.setIsBase(1); - vfModule0.getVolEnvironmentId(); - vfModule0.setId(0); - vfModule0.getModelInvariantUuid(); - vfModule0.getEnvironmentId(); - vfModule0.getIsBase(); - vfModule0.setTemplateId(integer1); - vfModule0.getCreated(); - vfModule0.getId(); - vfModule0.getCreated(); - vfModule0.getId(); - vfModule0.setModelInvariantUuid((String) null); - vfModule0.getAsdcUuid(); - vfModule0.getVnfResourceId(); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.getDescription(); - Integer integer0 = new Integer(0); - Integer.divideUnsigned(1, 659); - vfModule0.setVolTemplateId(integer0); - vfModule0.setVersion((String) null); - vfModule0.getDescription(); - vfModule0.setAsdcUuid((String) null); - Integer integer1 = new Integer(0); - Integer.getInteger((String) null); - vfModule0.setVnfResourceId(integer1); - vfModule0.setIsBase(1); - vfModule0.getVolEnvironmentId(); - vfModule0.setId(0); - vfModule0.getModelInvariantUuid(); - vfModule0.getEnvironmentId(); - vfModule0.getIsBase(); - vfModule0.setTemplateId(integer1); - vfModule0.getCreated(); - vfModule0.getId(); - vfModule0.getCreated(); - vfModule0.getId(); - vfModule0.setModelInvariantUuid((String) null); - vfModule0.getAsdcUuid(); - System.setCurrentTimeMillis((-1L)); - vfModule0.getTemplateId(); - vfModule0.getDescription(); - vfModule0.getAsdcUuid(); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.getVolEnvironmentId(); - vfModule0.setEnvironmentId((Integer) null); - assertNull(vfModule0.getModelVersion()); - - Integer integer0 = new Integer(1); - Integer.getInteger((String) null, (Integer) null); - vfModule0.setEnvironmentId(integer0); - vfModule0.setModelVersion((String) null); - vfModule0.setId(171); - vfModule0.toString(); - vfModule0.getEnvironmentId(); - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = Integer.valueOf((-2041)); - Integer.compareUnsigned((-2041), (-1)); - vfModule0.setTemplateId(integer0); - vfModule0.setIsBase(3154); - vfModule0.setModelInvariantUuid(""); - vfModule0.setDescription("nPVyq+_;@IZP:L"); - vfModule0.setId(883); - vfModule0.toString(); - vfModule0.setIsBase((-2041)); - vfModule0.getTemplateId(); - vfModule0.getModelName(); - vfModule0.getVnfResourceId(); - vfModule0.toString(); - vfModule0.isBase(); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setIsBase(0); - vfModule0.isMoreRecentThan("."); - vfModule0.toString(); - vfModule0.setIsBase((-1465)); - vfModule0.setModelInvariantUuid("u5L"); - vfModule0.getIsBase(); - vfModule0.setId(0); - vfModule0.getVolEnvironmentId(); - System.setCurrentTimeMillis((-1465)); - vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.setVersion(""); - vfModule0.toString(); - vfModule0.getAsdcUuid(); - vfModule0.getEnvironmentId(); - vfModule0.setVolEnvironmentId((Integer) null); - vfModule0.getVnfResourceId(); - vfModule0.getDescription(); - vfModule0.getVolEnvironmentId(); - vfModule0.getCreated(); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.isMoreRecentThan("zL"); - vfModule0.getType(); - vfModule0.setModelName((String) null); - Integer integer0 = new Integer(0); - Integer.getInteger("zL", (Integer) null); - vfModule0.setType(""); - Integer.sum(34, 34); - Integer.min(0, 2510); - Integer.divideUnsigned(0, (-1)); - Integer.compare(0, 0); - vfModule0.setVolEnvironmentId(integer0); - vfModule0.setCreated((Timestamp) null); - vfModule0.getCreated(); - vfModule0.getIsBase(); - vfModule0.setAsdcUuid(""); - vfModule0.setId(0); - vfModule0.getModelVersion(); - vfModule0.setCreated((Timestamp) null); - vfModule0.setModelVersion((String) null); - vfModule0.getEnvironmentId(); - vfModule0.getVolEnvironmentId(); - vfModule0.getType(); - vfModule0.setAsdcUuid((String) null); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setModelInvariantUuid(""); - vfModule0.setType(",modelName="); - vfModule0.setModelVersion(""); - vfModule0.setModelName("+cQA/1wAo}o/T7,S"); - vfModule0.getVolTemplateId(); - vfModule0.getVolEnvironmentId(); - vfModule0.getVolTemplateId(); - vfModule0.getModelInvariantUuid(); - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer((-495)); - Integer.getInteger("M0@M@T", (-495)); - vfModule0.setVolEnvironmentId(integer0); - vfModule0.setId(892); - vfModule0.getTemplateId(); - vfModule0.toString(); - vfModule0.getVolEnvironmentId(); - vfModule0.setDescription("M0@M@T"); - vfModule0.getTemplateId(); - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer(2707); - Integer integer1 = new Integer((-1)); - Integer.getInteger("", integer1); - vfModule0.setVolEnvironmentId(integer0); - vfModule0.getModelName(); - vfModule0.isMoreRecentThan(""); - vfModule0.getAsdcUuid(); - vfModule0.isMoreRecentThan((String) null); - vfModule0.getVnfResourceId(); - vfModule0.toString(); - vfModule0.getCreated(); - vfModule0.getVolEnvironmentId(); - vfModule0.getModelName(); - vfModule0.getVnfResourceId(); - vfModule0.getVnfResourceId(); - vfModule0.getModelName(); - vfModule0.getAsdcUuid(); - vfModule0.getCreated(); - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.isMoreRecentThan((String) null); - vfModule0.getCreated(); - vfModule0.setVolEnvironmentId((Integer) null); - vfModule0.getVnfResourceId(); - Integer integer0 = new Integer(2983); - vfModule0.isTheSameVersion((String) null); - vfModule0.setDescription(")b,;fs\"&l\"#:Z"); - Integer.min(296, 0); - vfModule0.setTemplateId(integer0); - vfModule0.setType(")b,;fs\"&l\"#:Z"); - vfModule0.setModelInvariantUuid(")b,;fs\"&l\"#:Z"); - vfModule0.getId(); - vfModule0.setModelVersion(""); - vfModule0.getTemplateId(); - vfModule0.getModelVersion(); - vfModule0.setIsBase(2983); - Integer integer1 = new Integer(0); - try { - Integer.decode("X&-4c&g>;lQ`"); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // For input string: \"X&-4c&g>;lQ`\" - // - verifyException("java.lang.NumberFormatException", e); - } - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.toString(); - vfModule0.isMoreRecentThan("ql"); - vfModule0.toString(); - vfModule0.isMoreRecentThan("v;ese"); - vfModule0.getCreated(); - Integer integer0 = new Integer(0); - Integer.getInteger("v;ese", 0); - vfModule0.setVolTemplateId(integer0); - vfModule0.isBase(); - vfModule0.getIsBase(); - vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.getId(); - vfModule0.getTemplateId(); - vfModule0.getVolTemplateId(); - vfModule0.getAsdcUuid(); - vfModule0.setId(0); - Integer integer1 = new Integer(0); - try { - Integer.parseUnsignedInt("ql", (-122)); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // radix -122 less than Character.MIN_RADIX - // - verifyException("java.lang.Integer", e); - } - } - - @Test(timeout = 4000) - public void test15() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer((-1847)); - vfModule0.setTemplateId(integer0); - vfModule0.setVolTemplateId(integer0); - vfModule0.getVolTemplateId(); - try { - Integer.decode(""); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // Zero length string - // - verifyException("java.lang.Integer", e); - } - } - - @Test(timeout = 4000) - public void test16() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer(1); - vfModule0.setVolTemplateId(integer0); - vfModule0.setType(""); - vfModule0.setDescription(""); - vfModule0.getVolTemplateId(); - vfModule0.getTemplateId(); - vfModule0.setModelInvariantUuid(""); - vfModule0.getType(); - vfModule0.setVersion(""); - vfModule0.getEnvironmentId(); - try { - Integer.decode(""); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // Zero length string - // - verifyException("java.lang.Integer", e); - } - } - - @Test(timeout = 4000) - public void test17() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = Integer.valueOf(797); - vfModule0.setVnfResourceId(integer0); - vfModule0.isMoreRecentThan("xApm&c~GA&l*X$"); - vfModule0.getVnfResourceId(); - vfModule0.getModelInvariantUuid(); - } - - @Test(timeout = 4000) - public void test18() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setModelVersion(""); - Integer integer0 = new Integer(1170); - vfModule0.setVnfResourceId(integer0); - vfModule0.getCreated(); - vfModule0.setVolTemplateId(integer0); - vfModule0.setType(""); - vfModule0.setDescription(""); - vfModule0.getVnfResourceId(); - VfModule vfModule1 = new VfModule(); - vfModule1.setId((-1424)); - vfModule1.getVolTemplateId(); - vfModule1.getModelVersion(); - vfModule0.getId(); - vfModule0.setAsdcUuid(""); - } - - @Test(timeout = 4000) - public void test19() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer((-1483)); - Integer.toUnsignedString((-1742)); - Integer.toUnsignedString(0); - Integer.getInteger("", (-1483)); - vfModule0.setModelVersion("."); - Integer.divideUnsigned(0, 1371); - vfModule0.setVolTemplateId(integer0); - Integer.compare(1783, (-1404)); - vfModule0.setEnvironmentId(integer0); - vfModule0.setVersion(""); - vfModule0.getModelVersion(); - vfModule0.getId(); - } - - @Test(timeout = 4000) - public void test20() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.getId(); - vfModule0.setDescription("JZ)_Y_-H SVr5xC"); - Integer integer0 = new Integer(1266); - Integer.remainderUnsigned(0, 1266); - vfModule0.setEnvironmentId(integer0); - vfModule0.getModelInvariantUuid(); - vfModule0.setDescription((String) null); - vfModule0.getEnvironmentId(); - vfModule0.getModelName(); - vfModule0.getIsBase(); - } - - @Test(timeout = 4000) - public void test21() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setModelInvariantUuid(",version="); - vfModule0.toString(); - vfModule0.toString(); - vfModule0.toString(); - vfModule0.isTheSameVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.setId(1438); - vfModule0.getVolTemplateId(); - Instant instant0 = MockInstant.ofEpochMilli(1438); - Timestamp timestamp0 = Timestamp.from(instant0); - timestamp0.clone(); - vfModule0.setCreated(timestamp0); - vfModule0.setDescription(",version="); - vfModule0.getTemplateId(); - vfModule0.getId(); - } - - @Test(timeout = 4000) - public void test22() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setModelVersion("EzJ)~3C++"); - Integer integer0 = new Integer((-1)); - vfModule0.setVnfResourceId(integer0); - vfModule0.getModelInvariantUuid(); - vfModule0.getModelInvariantUuid(); - VfModule vfModule1 = new VfModule(); - vfModule1.setIsBase((-1)); - Integer integer1 = new Integer((-289)); - vfModule1.setTemplateId(integer1); - vfModule1.getTemplateId(); - vfModule1.setModelName("Yp{,,+-pFJp!Ym6r^"); - vfModule1.getDescription(); - vfModule0.setId((-1)); - vfModule0.setId((-4103)); - vfModule0.getId(); - vfModule1.getVnfResourceId(); - vfModule1.setTemplateId((Integer) null); - Timestamp timestamp0 = new Timestamp((-3970L)); - vfModule0.setCreated(timestamp0); - } - - @Test(timeout = 4000) - public void test23() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.isTheSameVersion(", description="); - vfModule0.setType(""); - Integer integer0 = new Integer(0); - Integer.max(0, 0); - Integer.min(0, 0); - vfModule0.setEnvironmentId(integer0); - vfModule0.setDescription("Kx6@ Rh^oX; 9s(c&>|"); - vfModule0.setId((-2750)); - vfModule0.setType((String) null); - vfModule0.getDescription(); - vfModule0.setId(0); - } - - @Test(timeout = 4000) - public void test24() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setType("}f"); - vfModule0.setModelName("?2n6Dj"); - vfModule0.toString(); - vfModule0.getModelName(); - vfModule0.setAsdcUuid("?2n6Dj"); - vfModule0.getId(); - vfModule0.isTheSameVersion(""); - vfModule0.getAsdcUuid(); - vfModule0.getVolTemplateId(); - try { - Integer.parseUnsignedInt("6pu", 0); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // radix 0 less than Character.MIN_RADIX - // - verifyException("java.lang.Integer", e); - } - } - - @Test(timeout = 4000) - public void test25() throws Throwable { - VfModule vfModule0 = new VfModule(); - Timestamp timestamp0 = new Timestamp(0L); - timestamp0.clone(); - timestamp0.setNanos(3848); - vfModule0.setCreated(timestamp0); - vfModule0.getVolTemplateId(); - Timestamp timestamp1 = vfModule0.getCreated(); - timestamp1.toInstant(); - Integer integer0 = new Integer(719); - timestamp1.setNanos(3848); - try { - Integer.parseUnsignedInt("1\t`FE9f:0z]~"); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // For input string: \"1\t`FE9f:0z]~\" - // - verifyException("java.lang.NumberFormatException", e); - } - } - - @Test(timeout = 4000) - public void test26() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer(2069); - Integer.compare(0, 0); - Integer.min(2661, 2661); - Integer.max(2069, 2069); - vfModule0.setVnfResourceId(integer0); - vfModule0.setDescription(",id="); - vfModule0.isTheSameVersion(",id="); - vfModule0.isMoreRecentThan(",id="); - vfModule0.getEnvironmentId(); - vfModule0.setType("h4:pQoD8*M"); - vfModule0.getType(); - vfModule0.getType(); - } - - @Test(timeout = 4000) - public void test27() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer(0); - vfModule0.setEnvironmentId(integer0); - vfModule0.setModelInvariantUuid("H'CQI+Q^^WoGt^Q2X]"); - vfModule0.toString(); - vfModule0.getModelInvariantUuid(); - Integer integer1 = vfModule0.getEnvironmentId(); - vfModule0.setVersion(""); - Integer.getInteger("", integer0); - Integer.getInteger("", integer0); - vfModule0.setVnfResourceId(integer1); - } - - @Test(timeout = 4000) - public void test28() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.toString(); - vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.setDescription("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.setId(0); - vfModule0.getModelName(); - vfModule0.getAsdcUuid(); - Timestamp timestamp0 = new Timestamp((long) 0); - timestamp0.toLocalDateTime(); - vfModule0.setCreated(timestamp0); - vfModule0.getVolTemplateId(); - int int0 = vfModule0.getId(); - vfModule0.getTemplateId(); - vfModule0.setModelInvariantUuid((String) null); - vfModule0.setType("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - Timestamp timestamp1 = vfModule0.getCreated(); - vfModule0.setDescription((String) null); - vfModule0.setCreated(timestamp1); - vfModule0.setVolTemplateId((Integer) null); - vfModule0.getTemplateId(); - int int1 = vfModule0.getIsBase(); - assertTrue(int1 == int0); - - vfModule0.setModelVersion((String) null); - boolean boolean0 = vfModule0.isBase(); - assertFalse(boolean0); - - vfModule0.setVolEnvironmentId((Integer) null); - vfModule0.setModelInvariantUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.getDescription(); - String string0 = vfModule0.toString(); - assertEquals("VF=VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,created=1/1/70 12:00 AM", string0); - } - - @Test(timeout = 4000) - public void test29() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.setIsBase(1); - vfModule0.getVnfResourceId(); - vfModule0.getEnvironmentId(); - vfModule0.toString(); - vfModule0.isBase(); - Integer integer0 = new Integer(0); - vfModule0.getCreated(); - vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - vfModule0.getCreated(); - PrivateAccess.setVariable((Class<VfModule>) VfModule.class, vfModule0, "asdcUuid", (Object) "VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null"); - assertEquals(1, vfModule0.getIsBase()); - } - - @Test(timeout = 4000) - public void test30() throws Throwable { - VfModule vfModule0 = new VfModule(); - vfModule0.toString(); - vfModule0.getModelVersion(); - String string0 = vfModule0.getType(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test31() throws Throwable { - VfModule vfModule0 = new VfModule(); - Integer integer0 = new Integer((-1)); - vfModule0.setVnfResourceId(integer0); - vfModule0.getModelInvariantUuid(); - vfModule0.setTemplateId(integer0); - vfModule0.setModelName((String) null); - Timestamp timestamp0 = vfModule0.getCreated(); - assertNull(timestamp0); - } + @Test(timeout = 4000) + public void test00() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setIsBase(1684); + vfModule0.getMinInstances(); + vfModule0.setMaxInstances((Integer) null); + vfModule0.isBase(); + vfModule0.setVolTemplateId((Integer) null); + vfModule0.setModelVersion("p(>v(f\"rnCo"); + vfModule0.getIsBase(); + vfModule0.getModelInvariantUuid(); + vfModule0.setModelVersion("a,U*#FCv(}H+aG}"); + vfModule0.getVolTemplateId(); + vfModule0.getMinInstances(); + vfModule0.toString(); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + VfModule vfModule0 = new VfModule(); + Instant instant0 = MockInstant.now(); + Timestamp timestamp0 = Timestamp.from(instant0); + vfModule0.setCreated(timestamp0); + vfModule0.setLabel("7."); + vfModule0.isBase(); + vfModule0.getId(); + vfModule0.getLabel(); + vfModule0.toString(); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = Integer.valueOf((-3299)); + vfModule0.getEnvironmentId(); + Integer.toUnsignedString((-697)); + vfModule0.setMinInstances((Integer) null); + vfModule0.setMaxInstances(integer0); + Integer integer1 = new Integer(5932); + Integer integer2 = Integer.getInteger("DZ>}qM>", integer1); + vfModule0.setVolEnvironmentId(integer0); + vfModule0.setTemplateId(integer2); + Integer.toUnsignedString(5932); + vfModule0.getVolTemplateId(); + vfModule0.setTemplateId((Integer) null); + Integer.divideUnsigned((-3299), (-3299)); + vfModule0.setEnvironmentId((Integer) null); + vfModule0.setVolEnvironmentId((Integer) null); + vfModule0.setMinInstances(integer1); + vfModule0.setIsBase((-3299)); + vfModule0.setIsBase((-745)); + vfModule0.setModelVersion("5932"); + vfModule0.getVolTemplateId(); + vfModule0.getVolEnvironmentId(); + vfModule0.getMinInstances(); + vfModule0.getVolEnvironmentId(); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(0); + vfModule0.setVolTemplateId(integer0); + vfModule0.getVolTemplateId(); + Integer integer1 = vfModule0.getVolTemplateId(); + vfModule0.setVolTemplateId(integer1); + vfModule0.setIsBase(863); + Integer integer2 = new Integer(1554); + vfModule0.setVnfResourceId(integer2); + vfModule0.setIsBase(780); + vfModule0.setMaxInstances(integer2); + vfModule0.getEnvironmentId(); + vfModule0.getVolEnvironmentId(); + vfModule0.getVolEnvironmentId(); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + VfModule vfModule0 = new VfModule(); + Timestamp timestamp0 = new Timestamp((-2168L)); + vfModule0.setCreated(timestamp0); + vfModule0.setId((-1)); + vfModule0.getEnvironmentId(); + vfModule0.setCreated(timestamp0); + vfModule0.setVolTemplateId((Integer) null); + vfModule0.setLabel("."); + vfModule0.getModelName(); + vfModule0.getCreated(); + vfModule0.getTemplateId(); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.isMoreRecentThan(""); + vfModule0.setLabel(""); + Integer integer0 = new Integer(1183); + vfModule0.setMaxInstances(integer0); + Integer.compare(1183, 1183); + vfModule0.setTemplateId(integer0); + vfModule0.getLabel(); + vfModule0.getDescription(); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(0); + Integer.compare(1, 0); + vfModule0.setMaxInstances(integer0); + vfModule0.getVolEnvironmentId(); + Integer.sum(0, 1); + vfModule0.setVolTemplateId((Integer) null); + vfModule0.setMaxInstances((Integer) null); + vfModule0.setModelVersion(""); + vfModule0.setIsBase((-1435)); + vfModule0.setVnfResourceId((Integer) null); + vfModule0.getVnfResourceId(); + vfModule0.setIsBase((-3635)); + vfModule0.getDescription(); + vfModule0.getAsdcUuid(); + Integer integer1 = new Integer((-3635)); + Integer integer2 = new Integer(1); + Integer.getInteger(".", integer2); + vfModule0.setVolTemplateId(integer1); + vfModule0.getVnfResourceId(); + vfModule0.getModelVersion(); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setIsBase(597); + vfModule0.setId(662); + Integer integer0 = Integer.valueOf(597); + Integer.compare((-1), 0); + Integer.divideUnsigned(597, (-3368)); + vfModule0.setVolTemplateId(integer0); + Integer.getInteger(",modelCustomizationUuid=", 0); + vfModule0.setVolEnvironmentId(integer0); + vfModule0.setId(0); + vfModule0.getVnfResourceId(); + Integer integer1 = new Integer(0); + vfModule0.setMaxInstances(integer1); + vfModule0.getMaxInstances(); + vfModule0.setModelName(""); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(0); + vfModule0.setInitialCount(integer0); + Integer integer1 = new Integer((-2063)); + vfModule0.setVolTemplateId(integer1); + vfModule0.getModelVersion(); + Integer integer2 = new Integer(0); + vfModule0.setInitialCount(integer2); + vfModule0.getLabel(); + vfModule0.setTemplateId(integer0); + Integer integer3 = vfModule0.getInitialCount(); + vfModule0.setMaxInstances(integer3); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setModelInvariantUuid(""); + vfModule0.setDescription(",templateId="); + Timestamp timestamp0 = new Timestamp((-1360L)); + MockDate mockDate0 = new MockDate(0, 0, (-1723), (-3154), (-1723)); + vfModule0.setId((-1158)); + mockDate0.setTime(0L); + timestamp0.after(mockDate0); + vfModule0.setCreated(timestamp0); + vfModule0.setType("."); + vfModule0.getId(); + Integer integer0 = new Integer((-1158)); + vfModule0.setVnfResourceId(integer0); + vfModule0.isBase(); + vfModule0.setMinInstances((Integer) null); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.isTheSameVersion(""); + vfModule0.setMaxInstances((Integer) null); + vfModule0.setId((-2621)); + vfModule0.setModelVersion(""); + vfModule0.setAsdcUuid("."); + Integer integer0 = new Integer((-2621)); + vfModule0.isTheSameVersion(""); + vfModule0.setTemplateId(integer0); + vfModule0.getTemplateId(); + vfModule0.getModelVersion(); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.toString(); + vfModule0.setType("\"~J0_gjDe<M|_&}EQ"); + vfModule0.getModelCustomizationUuid(); + Integer integer0 = new Integer((-1597)); + vfModule0.setEnvironmentId(integer0); + vfModule0.setVnfResourceId(integer0); + vfModule0.getModelCustomizationUuid(); + vfModule0.setModelInvariantUuid((String) null); + vfModule0.getIsBase(); + vfModule0.getVolEnvironmentId(); + vfModule0.getLabel(); + vfModule0.getVnfResourceId(); + vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + vfModule0.getCreated(); + Integer integer1 = new Integer((-805)); + vfModule0.setTemplateId(integer1); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setDescription(""); + vfModule0.getLabel(); + Integer integer0 = new Integer(1); + vfModule0.setVnfResourceId(integer0); + vfModule0.getModelCustomizationUuid(); + vfModule0.getLabel(); + Integer integer1 = new Integer(1); + Integer.sum(542, 542); + vfModule0.setVolTemplateId(integer1); + vfModule0.getEnvironmentId(); + vfModule0.setIsBase(1084); + vfModule0.setAsdcUuid((String) null); + vfModule0.getId(); + vfModule0.getVnfResourceId(); + vfModule0.setModelCustomizationUuid("o?;po<j"); + vfModule0.getTemplateId(); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setMinInstances((Integer) null); + Integer integer0 = new Integer(334); + Integer.sum(334, (-2392)); + vfModule0.setTemplateId(integer0); + Integer.getInteger(""); + vfModule0.setVnfResourceId(integer0); + Integer integer1 = new Integer((-2392)); + Integer.toUnsignedLong(0); + vfModule0.setMaxInstances(integer1); + vfModule0.setModelInvariantUuid(""); + vfModule0.getTemplateId(); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setType(""); + vfModule0.setModelCustomizationUuid(""); + vfModule0.getIsBase(); + vfModule0.setModelVersion(""); + vfModule0.isMoreRecentThan(""); + Integer integer0 = Integer.valueOf(3556); + Integer.compareUnsigned(0, 2007); + Integer.toUnsignedString(0); + vfModule0.setMaxInstances(integer0); + vfModule0.getType(); + vfModule0.setType(""); + vfModule0.setModelName("<>]"); + vfModule0.getModelCustomizationUuid(); + vfModule0.toString(); + vfModule0.getTemplateId(); + vfModule0.getMaxInstances(); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getModelName(); + vfModule0.setModelName("uQAnJq?Z"); + vfModule0.getTemplateId(); + vfModule0.setModelCustomizationUuid(""); + vfModule0.getModelCustomizationUuid(); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getInitialCount(); + vfModule0.setMinInstances((Integer) null); + vfModule0.isBase(); + vfModule0.getVolEnvironmentId(); + Integer integer0 = new Integer((-414)); + vfModule0.setMaxInstances(integer0); + vfModule0.getVolEnvironmentId(); + vfModule0.getMaxInstances(); + System.setCurrentTimeMillis(0L); + vfModule0.getMaxInstances(); + vfModule0.getTemplateId(); + vfModule0.getInitialCount(); + vfModule0.getEnvironmentId(); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setVolEnvironmentId((Integer) null); + vfModule0.setAsdcUuid(",created="); + Integer integer0 = new Integer(0); + vfModule0.setVnfResourceId(integer0); + Integer.getInteger(",created=", (Integer) null); + vfModule0.setDescription(",label="); + vfModule0.setLabel("."); + vfModule0.getModelName(); + vfModule0.setId(0); + Integer.max(0, 0); + vfModule0.setMinInstances(integer0); + vfModule0.setMaxInstances((Integer) null); + vfModule0.getCreated(); + vfModule0.getMaxInstances(); + vfModule0.getAsdcUuid(); + vfModule0.getDescription(); + vfModule0.getMaxInstances(); + Integer integer1 = new Integer(0); + vfModule0.setMaxInstances(integer1); + vfModule0.toString(); + vfModule0.setCreated((Timestamp) null); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setModelCustomizationUuid(",modelVersion="); + Integer integer0 = new Integer((-4139)); + vfModule0.setInitialCount(integer0); + Integer integer1 = new Integer((-789)); + Integer.sum((-4139), (-2408)); + Integer.toUnsignedString((-1850)); + Integer.sum(958, (-176)); + Integer.getInteger(",modelVersion=", integer0); + Integer.remainderUnsigned((-789), (-789)); + vfModule0.setAsdcUuid("Y?ht4"); + vfModule0.setEnvironmentId(integer1); + vfModule0.getEnvironmentId(); + System.setCurrentTimeMillis(0L); + System.setCurrentTimeMillis((-2179L)); + vfModule0.getMinInstances(); + vfModule0.getVolTemplateId(); + vfModule0.isBase(); + vfModule0.isBase(); + vfModule0.isBase(); + vfModule0.getVnfResourceId(); + vfModule0.getCreated(); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(714); + vfModule0.setEnvironmentId(integer0); + vfModule0.setInitialCount((Integer) null); + vfModule0.toString(); + vfModule0.setDescription("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=714,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=714,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + vfModule0.setInitialCount((Integer) null); + vfModule0.setIsBase(1549); + vfModule0.setMinInstances((Integer) null); + vfModule0.getModelCustomizationUuid(); + Integer integer1 = vfModule0.getEnvironmentId(); + vfModule0.setAsdcUuid("."); + vfModule0.getVolEnvironmentId(); + vfModule0.getLabel(); + Integer.remainderUnsigned(1544, 1549); + Integer.sum((-277), (-277)); + vfModule0.setMaxInstances(integer1); + vfModule0.getVolTemplateId(); + vfModule0.getIsBase(); + vfModule0.getInitialCount(); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setId(0); + vfModule0.setDescription("sh;.zWRp.C?-rn"); + vfModule0.setModelInvariantUuid(",label="); + vfModule0.getLabel(); + vfModule0.getModelInvariantUuid(); + Timestamp timestamp0 = new Timestamp((long) 0); + vfModule0.setCreated(timestamp0); + vfModule0.setDescription(""); + vfModule0.setModelInvariantUuid((String) null); + vfModule0.getDescription(); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.toString(); + vfModule0.getDescription(); + vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + vfModule0.getModelName(); + Integer integer0 = new Integer(0); + Integer.toUnsignedString(378); + Integer.sum(0, 0); + vfModule0.setMaxInstances(integer0); + vfModule0.setModelInvariantUuid((String) null); + vfModule0.setType("}^`%'{@?s`OiaLz"); + vfModule0.setInitialCount(integer0); + vfModule0.getType(); + vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + VfModule vfModule1 = new VfModule(); + vfModule0.setType("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + vfModule0.toString(); + vfModule0.getId(); + vfModule1.setVnfResourceId(integer0); + vfModule0.getDescription(); + vfModule0.getType(); + vfModule0.getVolEnvironmentId(); + vfModule0.getTemplateId(); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setId(2389); + vfModule0.setModelCustomizationUuid(""); + vfModule0.isTheSameVersion(""); + vfModule0.getVolTemplateId(); + vfModule0.getLabel(); + vfModule0.setInitialCount((Integer) null); + vfModule0.getCreated(); + vfModule0.setAsdcUuid(""); + vfModule0.getAsdcUuid(); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(1268); + vfModule0.setInitialCount(integer0); + Integer integer1 = new Integer(0); + Integer.compare(1268, 1); + vfModule0.setEnvironmentId(integer1); + vfModule0.setVersion(""); + vfModule0.getEnvironmentId(); + vfModule0.getVnfResourceId(); + vfModule0.getType(); + vfModule0.getIsBase(); + vfModule0.getCreated(); + ChronoUnit chronoUnit0 = ChronoUnit.MINUTES; + // Undeclared exception! + try { + MockInstant.truncatedTo((Instant) null, chronoUnit0); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.evosuite.runtime.mock.java.time.MockInstant", e); + } + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setTemplateId((Integer) null); + Integer integer0 = new Integer(2617); + vfModule0.setVolEnvironmentId(integer0); + vfModule0.setEnvironmentId((Integer) null); + vfModule0.setType(""); + vfModule0.toString(); + VfModule vfModule1 = new VfModule(); + vfModule0.toString(); + vfModule0.isMoreRecentThan(""); + vfModule0.getModelName(); + vfModule1.getLabel(); + Integer integer1 = new Integer(321); + vfModule1.setVolTemplateId(integer1); + vfModule1.getVnfResourceId(); + vfModule0.getVolTemplateId(); + vfModule0.getVnfResourceId(); + vfModule0.getVolEnvironmentId(); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getLabel(); + Integer integer0 = new Integer(0); + vfModule0.setEnvironmentId(integer0); + vfModule0.isMoreRecentThan("!X"); + vfModule0.setIsBase(0); + vfModule0.setId(4322); + vfModule0.getMaxInstances(); + vfModule0.setAsdcUuid(""); + vfModule0.getDescription(); + vfModule0.setDescription((String) null); + vfModule0.setIsBase(0); + vfModule0.setAsdcUuid((String) null); + vfModule0.setId(4322); + Integer.min(4322, (-1)); + vfModule0.getDescription(); + Integer.divideUnsigned((-2839), 4322); + vfModule0.getIsBase(); + vfModule0.setInitialCount(integer0); + vfModule0.toString(); + vfModule0.getModelName(); + vfModule0.getVolEnvironmentId(); + vfModule0.setAsdcUuid(""); + vfModule0.getId(); + VfModule vfModule1 = new VfModule(); + vfModule1.getTemplateId(); + Integer integer1 = new Integer(4322); + vfModule1.setMinInstances(integer1); + vfModule0.getId(); + } + + @Test(timeout = 4000) + public void test26() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getAsdcUuid(); + vfModule0.getModelVersion(); + vfModule0.setModelName((String) null); + vfModule0.getVolEnvironmentId(); + vfModule0.getIsBase(); + Integer integer0 = new Integer((-1)); + vfModule0.setEnvironmentId(integer0); + vfModule0.setMinInstances(integer0); + vfModule0.getVolTemplateId(); + vfModule0.setModelVersion((String) null); + VfModule vfModule1 = new VfModule(); + vfModule1.setId(0); + vfModule1.setModelInvariantUuid((String) null); + vfModule1.getModelInvariantUuid(); + vfModule1.getModelName(); + vfModule1.setVolEnvironmentId(integer0); + vfModule1.getMinInstances(); + vfModule0.setModelName(""); + Integer.getInteger(""); + vfModule0.setTemplateId((Integer) null); + vfModule0.getModelName(); + Integer integer1 = new Integer((-1)); + vfModule0.setVolEnvironmentId(integer1); + vfModule1.getVnfResourceId(); + Integer integer2 = vfModule1.getVolEnvironmentId(); + vfModule0.setVolEnvironmentId(integer2); + vfModule1.setMinInstances((Integer) null); + } + + @Test(timeout = 4000) + public void test27() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.toString(); + vfModule0.setModelVersion("LBV90^6*"); + vfModule0.setDescription("LBV90^6*"); + vfModule0.getVnfResourceId(); + vfModule0.setTemplateId((Integer) null); + vfModule0.isBase(); + vfModule0.setIsBase((-531)); + Integer integer0 = new Integer(2646); + vfModule0.setVolEnvironmentId(integer0); + Integer integer1 = new Integer((-531)); + Integer.divideUnsigned((-531), 2646); + Integer.compare((-1), (-531)); + Integer.toUnsignedLong((-1)); + vfModule0.setVolEnvironmentId((Integer) null); + vfModule0.setVolEnvironmentId(integer1); + vfModule0.setTemplateId((Integer) null); + vfModule0.getVolEnvironmentId(); + vfModule0.setModelName("LBV90^6*"); + vfModule0.getTemplateId(); + vfModule0.getModelName(); + } + + @Test(timeout = 4000) + public void test28() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(2752); + vfModule0.setVolEnvironmentId(integer0); + Integer integer1 = vfModule0.getVolEnvironmentId(); + vfModule0.setVnfResourceId(integer1); + vfModule0.getModelVersion(); + vfModule0.setModelVersion((String) null); + vfModule0.getMinInstances(); + vfModule0.getAsdcUuid(); + Integer integer2 = new Integer((-672)); + Instant instant0 = MockInstant.now(); + ChronoField chronoField0 = ChronoField.EPOCH_DAY; + // Undeclared exception! + try { + MockInstant.with(instant0, (TemporalField) chronoField0, 1268L); + fail("Expecting exception: UnsupportedTemporalTypeException"); + + } catch(UnsupportedTemporalTypeException e) { + // + // Unsupported field: EpochDay + // + verifyException("java.time.Instant", e); + } + } + + @Test(timeout = 4000) + public void test29() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getMinInstances(); + Integer integer0 = new Integer(397); + vfModule0.setInitialCount(integer0); + vfModule0.setMaxInstances((Integer) null); + vfModule0.isBase(); + vfModule0.setVolEnvironmentId((Integer) null); + vfModule0.setModelVersion("p(>v(f\"rnCo"); + vfModule0.setMinInstances((Integer) null); + vfModule0.setModelVersion("*"); + vfModule0.getIsBase(); + vfModule0.getModelInvariantUuid(); + vfModule0.setIsBase((-1066)); + vfModule0.getInitialCount(); + vfModule0.toString(); + vfModule0.getVolTemplateId(); + vfModule0.getCreated(); + } + + @Test(timeout = 4000) + public void test30() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getTemplateId(); + Instant instant0 = MockInstant.ofEpochSecond(1L); + Timestamp timestamp0 = Timestamp.from(instant0); + vfModule0.setCreated(timestamp0); + vfModule0.getCreated(); + vfModule0.getTemplateId(); + } + + @Test(timeout = 4000) + public void test31() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(0); + vfModule0.setTemplateId(integer0); + vfModule0.setModelVersion(""); + vfModule0.getModelName(); + vfModule0.setId(0); + vfModule0.setModelVersion("wk~z+v"); + Integer integer1 = new Integer(0); + Integer.getInteger((String) null, 0); + vfModule0.setEnvironmentId(integer1); + vfModule0.getTemplateId(); + vfModule0.setModelName("a("); + Integer integer2 = vfModule0.getTemplateId(); + vfModule0.setMinInstances(integer2); + vfModule0.setModelCustomizationUuid("01*}(,sCh"); + vfModule0.getModelCustomizationUuid(); + vfModule0.getVolEnvironmentId(); + vfModule0.getVolEnvironmentId(); + } + + @Test(timeout = 4000) + public void test32() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(4222); + vfModule0.setEnvironmentId(integer0); + vfModule0.getModelName(); + vfModule0.setAsdcUuid((String) null); + vfModule0.setModelCustomizationUuid((String) null); + vfModule0.setType(",minInstances="); + vfModule0.setVnfResourceId(integer0); + vfModule0.getEnvironmentId(); + vfModule0.getMaxInstances(); + vfModule0.getVolEnvironmentId(); + } + + @Test(timeout = 4000) + public void test33() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(0); + Integer integer1 = new Integer(1244); + Integer.compareUnsigned(0, 1549); + Integer.getInteger("", integer1); + vfModule0.setVolEnvironmentId(integer0); + vfModule0.getCreated(); + vfModule0.getVolEnvironmentId(); + System.setCurrentTimeMillis(1856L); + vfModule0.getVolTemplateId(); + } + + @Test(timeout = 4000) + public void test34() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getModelName(); + Integer integer0 = new Integer(0); + vfModule0.setVnfResourceId(integer0); + vfModule0.setId(0); + vfModule0.setModelVersion((String) null); + Integer integer1 = new Integer(0); + Integer.getInteger((String) null, 0); + vfModule0.setEnvironmentId(integer1); + vfModule0.getTemplateId(); + vfModule0.setModelName((String) null); + vfModule0.setMinInstances(integer1); + vfModule0.setModelCustomizationUuid("01*}(,sCh"); + vfModule0.getCreated(); + vfModule0.getVnfResourceId(); + vfModule0.getVolTemplateId(); + } + + @Test(timeout = 4000) + public void test35() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getInitialCount(); + Integer integer0 = new Integer((-1066)); + vfModule0.getVolEnvironmentId(); + Integer.getInteger("", (Integer) null); + Integer.getInteger(",envtId=", (-1066)); + vfModule0.setMinInstances(integer0); + vfModule0.toString(); + vfModule0.setVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=-1066,maxInstances=null,initialCount=null,label=null"); + vfModule0.getVolTemplateId(); + vfModule0.getVolTemplateId(); + vfModule0.getVnfResourceId(); + vfModule0.getMinInstances(); + vfModule0.getVolTemplateId(); + vfModule0.setVersion(""); + vfModule0.getVnfResourceId(); + System.setCurrentTimeMillis((-1066)); + vfModule0.setModelCustomizationUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=-1066,maxInstances=null,initialCount=null,label=null"); + vfModule0.getCreated(); + vfModule0.getCreated(); + System.setCurrentTimeMillis((-1066)); + } + + @Test(timeout = 4000) + public void test36() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getEnvironmentId(); + vfModule0.setVolEnvironmentId((Integer) null); + int int0 = vfModule0.getId(); + assertEquals(0, int0); + + vfModule0.getVolTemplateId(); + String string0 = vfModule0.toString(); + assertEquals("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null", string0); + } + + @Test(timeout = 4000) + public void test37() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.isTheSameVersion("X+]2+]y^$6"); + vfModule0.getTemplateId(); + vfModule0.getId(); + Integer.toUnsignedString(0); + vfModule0.getLabel(); + Integer.remainderUnsigned((-472), 1579); + Integer integer0 = new Integer((-1701)); + Integer.compare((-1701), (-1)); + Integer.getInteger("0", integer0); + vfModule0.setEnvironmentId((Integer) null); + vfModule0.setModelInvariantUuid((String) null); + vfModule0.getAsdcUuid(); + Integer integer1 = new Integer((-1701)); + vfModule0.setVnfResourceId((Integer) null); + vfModule0.getIsBase(); + Integer.compareUnsigned(1, 0); + vfModule0.getType(); + vfModule0.getVnfResourceId(); + vfModule0.setInitialCount(integer1); + vfModule0.setDescription(""); + vfModule0.getEnvironmentId(); + vfModule0.setInitialCount(integer1); + vfModule0.setId(1946); + vfModule0.getCreated(); + vfModule0.getInitialCount(); + vfModule0.getVnfResourceId(); + vfModule0.getCreated(); + assertEquals(1946, vfModule0.getId()); + } + + @Test(timeout = 4000) + public void test38() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getMaxInstances(); + Integer integer0 = new Integer(550); + vfModule0.setMinInstances(integer0); + Integer integer1 = new Integer(275); + Integer.max(0, 0); + vfModule0.setInitialCount(integer1); + vfModule0.setIsBase(275); + vfModule0.getEnvironmentId(); + Integer.compare(275, 275); + vfModule0.setMinInstances((Integer) null); + vfModule0.setType(""); + vfModule0.setVersion("]"); + vfModule0.getId(); + vfModule0.setId(0); + vfModule0.setIsBase((-17)); + vfModule0.setId((-17)); + vfModule0.getDescription(); + vfModule0.getAsdcUuid(); + vfModule0.getIsBase(); + vfModule0.getModelName(); + vfModule0.getEnvironmentId(); + vfModule0.toString(); + vfModule0.setModelInvariantUuid("D2"); + vfModule0.getInitialCount(); + assertEquals(-17, vfModule0.getIsBase()); + } + + @Test(timeout = 4000) + public void test39() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(4477); + vfModule0.setVolTemplateId(integer0); + vfModule0.getModelInvariantUuid(); + vfModule0.getModelInvariantUuid(); + vfModule0.getVolTemplateId(); + vfModule0.getMinInstances(); + System.setCurrentTimeMillis((-1006L)); + } + + @Test(timeout = 4000) + public void test40() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(0); + vfModule0.setMinInstances(integer0); + vfModule0.setType((String) null); + vfModule0.setAsdcUuid(",asdcUuid="); + Integer integer1 = vfModule0.getMinInstances(); + assertEquals(0, (int)integer1); + } + + @Test(timeout = 4000) + public void test41() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getDescription(); + String string0 = vfModule0.getModelCustomizationUuid(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test42() throws Throwable { + VfModule vfModule0 = new VfModule(); + Instant instant0 = MockInstant.now(); + Timestamp timestamp0 = Timestamp.from(instant0); + vfModule0.setCreated(timestamp0); + int int0 = vfModule0.getId(); + assertEquals(0, int0); + + vfModule0.getLabel(); + String string0 = vfModule0.toString(); + assertEquals("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null,created=2/14/14 8:21 PM", string0); + } + + @Test(timeout = 4000) + public void test43() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getMinInstances(); + vfModule0.isBase(); + vfModule0.setModelVersion(""); + vfModule0.getIsBase(); + vfModule0.getModelInvariantUuid(); + vfModule0.setIsBase((-1066)); + vfModule0.toString(); + boolean boolean0 = vfModule0.isBase(); + assertEquals(-1066, vfModule0.getIsBase()); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test44() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.getMinInstances(); + vfModule0.toString(); + vfModule0.setLabel("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null"); + vfModule0.getDescription(); + vfModule0.getModelVersion(); + PrivateAccess.setVariable((Class<VfModule>) VfModule.class, vfModule0, "minInstances", (Object) null); + assertEquals(0, vfModule0.getIsBase()); + } + + @Test(timeout = 4000) + public void test45() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setAsdcUuid(",maxInstances="); + vfModule0.isTheSameVersion(",maxInstances="); + Integer integer0 = new Integer(0); + vfModule0.setEnvironmentId(integer0); + vfModule0.setTemplateId(integer0); + vfModule0.setModelCustomizationUuid(",maxInstances="); + vfModule0.getModelInvariantUuid(); + vfModule0.getType(); + vfModule0.getModelCustomizationUuid(); + vfModule0.setVolEnvironmentId(integer0); + vfModule0.getMaxInstances(); + String string0 = vfModule0.toString(); + assertEquals("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=0,envtId=0,volTemplateId=null,volEnvtId=0, description=null,asdcUuid=,maxInstances=,modelVersion=null,modelCustomizationUuid=,maxInstances=,minInstances=null,maxInstances=null,initialCount=null,label=null", string0); + } + + @Test(timeout = 4000) + public void test46() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer((-1)); + Integer.remainderUnsigned((-1), (-1)); + Integer.remainderUnsigned(0, (-1)); + Integer.compareUnsigned((-1), 0); + vfModule0.setMaxInstances(integer0); + vfModule0.setMaxInstances(integer0); + vfModule0.setIsBase((-1)); + vfModule0.setVolTemplateId(integer0); + vfModule0.getTemplateId(); + Integer.divideUnsigned(0, (-1)); + vfModule0.setMinInstances((Integer) null); + vfModule0.getVnfResourceId(); + vfModule0.getVolTemplateId(); + vfModule0.setIsBase(0); + vfModule0.getInitialCount(); + int int0 = vfModule0.getIsBase(); + assertFalse(vfModule0.isBase()); + assertEquals(0, int0); + } + + @Test(timeout = 4000) + public void test47() throws Throwable { + VfModule vfModule0 = new VfModule(); + vfModule0.setType(""); + vfModule0.setVolEnvironmentId((Integer) null); + vfModule0.setDescription(""); + vfModule0.setModelInvariantUuid(""); + vfModule0.getModelInvariantUuid(); + vfModule0.getVolEnvironmentId(); + vfModule0.setVnfResourceId((Integer) null); + vfModule0.setModelName(""); + assertEquals(0, vfModule0.getIsBase()); + } + + @Test(timeout = 4000) + public void test48() throws Throwable { + VfModule vfModule0 = new VfModule(); + Integer integer0 = new Integer(275); + vfModule0.setInitialCount(integer0); + vfModule0.getEnvironmentId(); + vfModule0.setId(275); + vfModule0.getAsdcUuid(); + vfModule0.getModelName(); + vfModule0.getAsdcUuid(); + vfModule0.getCreated(); + assertEquals(275, vfModule0.getId()); + } } diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java new file mode 100644 index 0000000000..1a0d1de41a --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java @@ -0,0 +1,23 @@ +/* + * This file was automatically generated by EvoSuite + * Wed Feb 22 09:33:42 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.utils; + +import org.junit.Test; +import static org.junit.Assert.*; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class RecordNotFoundExceptionESTest extends RecordNotFoundExceptionESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + RecordNotFoundException recordNotFoundException0 = new RecordNotFoundException("K\"]E;o`'jowz5?'`3"); + RecordNotFoundException recordNotFoundException1 = new RecordNotFoundException("~&", (Throwable) recordNotFoundException0); + assertFalse(recordNotFoundException1.equals((Object)recordNotFoundException0)); + } +} diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java new file mode 100644 index 0000000000..e74f0c4502 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java @@ -0,0 +1,81 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Wed Feb 22 09:33:42 GMT 2017 + */ + +package org.openecomp.mso.db.catalog.utils; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class RecordNotFoundExceptionESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.utils.RecordNotFoundException"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RecordNotFoundExceptionESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.db.catalog.utils.RecordNotFoundException" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RecordNotFoundExceptionESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.db.catalog.utils.RecordNotFoundException" + ); + } +} |