From b6b7bef8bdcad15af01ac88a038dd763ce59f68f Mon Sep 17 00:00:00 2001 From: xg353y Date: Tue, 11 Apr 2017 13:30:42 +0200 Subject: [MSO-8] Update the maven dependency Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes. Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc Signed-off-by: xg353y --- .../asdc/util/ASDCNotificationLoggingESTest.java | 940 +++++---------------- .../ASDCNotificationLoggingESTestscaffolding.java | 87 +- 2 files changed, 277 insertions(+), 750 deletions(-) (limited to 'asdc-controller/src/test/java/org/openecomp/mso/asdc/util') diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java index 77c70e015e..2e73096337 100644 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java +++ b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java @@ -1,6 +1,6 @@ /* * This file was automatically generated by EvoSuite - * Fri Nov 25 13:31:27 GMT 2016 + * Mon Mar 13 16:09:00 GMT 2017 */ package org.openecomp.mso.asdc.util; @@ -10,737 +10,263 @@ import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.MockitoExtension.*; import static org.evosuite.runtime.EvoAssertions.*; - -import java.util.Collection; -import java.util.Comparator; -import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.NoSuchElementException; -import java.util.function.Predicate; +import java.util.Map; +import java.util.function.UnaryOperator; 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; +import org.openecomp.mso.asdc.installer.IVfModuleData; +import org.openecomp.mso.asdc.installer.VfModuleMetaData; +import org.openecomp.mso.asdc.util.ASDCNotificationLogging; import org.openecomp.sdc.api.notification.IArtifactInfo; import org.openecomp.sdc.api.notification.INotificationData; import org.openecomp.sdc.api.notification.IResourceInstance; -import org.openecomp.sdc.api.notification.IVfModuleMetadata; -@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 ASDCNotificationLoggingESTest extends ASDCNotificationLoggingESTestscaffolding { - @Test(timeout = 4000) - public void test00() throws Throwable { - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - LinkedList linkedList0 = new LinkedList(); - LinkedList linkedList1 = new LinkedList(); - Integer integer0 = new Integer(2147483645); - Integer integer1 = new Integer(2147483645); - Integer integer2 = new Integer(2147483645); - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iArtifactInfo0).getArtifactChecksum(); - doReturn((String) null).when(iArtifactInfo0).getArtifactDescription(); - doReturn((String) null).when(iArtifactInfo0).getArtifactName(); - doReturn((Integer) null).when(iArtifactInfo0).getArtifactTimeout(); - doReturn((String) null).when(iArtifactInfo0).getArtifactType(); - doReturn((String) null).when(iArtifactInfo0).getArtifactURL(); - doReturn((String) null).when(iArtifactInfo0).getArtifactUUID(); - doReturn((String) null).when(iArtifactInfo0).getArtifactVersion(); - doReturn((IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact(); - doReturn((List) null).when(iArtifactInfo0).getRelatedArtifacts(); - IArtifactInfo iArtifactInfo1 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - doReturn("Resource Instance Info:").when(iArtifactInfo1).getArtifactChecksum(); - doReturn("~1xF'ZQr|qhuc{").when(iArtifactInfo1).getArtifactDescription(); - doReturn("").when(iArtifactInfo1).getArtifactName(); - doReturn(integer1).when(iArtifactInfo1).getArtifactTimeout(); - doReturn("7<\"g").when(iArtifactInfo1).getArtifactType(); - doReturn("").when(iArtifactInfo1).getArtifactURL(); - doReturn("").when(iArtifactInfo1).getArtifactUUID(); - doReturn("7<\"g").when(iArtifactInfo1).getArtifactVersion(); - doReturn(iArtifactInfo0).when(iArtifactInfo1).getGeneratedArtifact(); - doReturn(linkedList1, linkedList1).when(iArtifactInfo1).getRelatedArtifacts(); - LinkedList linkedList2 = new LinkedList(); - Integer integer3 = new Integer(1); - LinkedList linkedList3 = new LinkedList(); - IArtifactInfo iArtifactInfo2 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - doReturn("-X^ og(1=?-*/%4", "%jgpj", (String) null).when(iArtifactInfo2).getArtifactChecksum(); - doReturn("7<\"g", "", (String) null).when(iArtifactInfo2).getArtifactDescription(); - doReturn("7 'W{]65Y%Vh_ynFOr", "]+O?<_o+Mx?P@|^<:|/", (String) null).when(iArtifactInfo2).getArtifactName(); - doReturn(integer0, integer3, (Integer) null).when(iArtifactInfo2).getArtifactTimeout(); - doReturn("]+O?<_o+Mx?P@|^<:|/", "", (String) null).when(iArtifactInfo2).getArtifactType(); - doReturn("i]\r7Wr. ) null); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData1).getDistributionID(); - doReturn(linkedList0, linkedList0).when(iNotificationData1).getResources(); - doReturn(linkedList1).when(iNotificationData1).getServiceArtifacts(); - doReturn("").when(iNotificationData1).getServiceDescription(); - doReturn("Tz)|, ,").when(iNotificationData1).getServiceInvariantUUID(); - doReturn("").when(iNotificationData1).getServiceName(); - doReturn("").when(iNotificationData1).getServiceUUID(); - doReturn("Tz)|, ,").when(iNotificationData1).getServiceVersion(); - String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - assertFalse(string1.equals((Object)string0)); - } + @Test(timeout = 4000) + public void test00() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); + vfModuleMetaData0.setAttribute("vfModuleModelInvariantUUID", vfModuleMetaData0); + linkedList0.add((IVfModuleData) vfModuleMetaData0); + // Undeclared exception! + try { + ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); + fail("Expecting exception: ClassCastException"); + + } catch(ClassCastException e) { + // + // org.openecomp.mso.asdc.installer.VfModuleMetaData cannot be cast to java.lang.String + // + verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); + } + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + List list0 = (List) mock(List.class, new ViolatedAssumptionAnswer()); + doReturn(false).when(list0).isEmpty(); + doReturn((Iterator) null).when(list0).iterator(); + doReturn(0).when(list0).size(); + INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); + doReturn("rGQA").when(iNotificationData0).getDistributionID(); + doReturn(list0).when(iNotificationData0).getServiceArtifacts(); + doReturn("rGQA").when(iNotificationData0).getServiceDescription(); + doReturn("").when(iNotificationData0).getServiceInvariantUUID(); + doReturn("").when(iNotificationData0).getServiceName(); + doReturn("rGQA").when(iNotificationData0).getServiceUUID(); + doReturn("").when(iNotificationData0).getServiceVersion(); + // Undeclared exception! + try { + ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.openecomp.mso.asdc.util.ASDCNotificationLogging", e); + } + } - @Test(timeout = 4000) - public void test01() throws Throwable { - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - LinkedList linkedList0 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.add(iVfModuleMetadata0); - LinkedList linkedList1 = new LinkedList(); - Object object0 = new Object(); - linkedList1.push(object0); - linkedList0.spliterator(); - linkedList0.removeAll(linkedList1); - linkedList0.clear(); - LinkedList linkedList2 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - doReturn((List) null, (List) null, linkedList2, (List) null).when(iVfModuleMetadata1).getArtifacts(); - doReturn("e.tf%6&", "e.tf%6&", "").when(iVfModuleMetadata1).getVfModuleModelDescription(); - doReturn("", "", "").when(iVfModuleMetadata1).getVfModuleModelInvariantUUID(); - doReturn("", "", "e.tf%6&").when(iVfModuleMetadata1).getVfModuleModelName(); - doReturn("VfModuleMetaData:", "e.tf%6&", "BaseArtifactInfoImpl [artifactName=").when(iVfModuleMetadata1).getVfModuleModelUUID(); - doReturn("e.tf%6&", "e.tf%6&", "e.tf%6&").when(iVfModuleMetadata1).getVfModuleModelVersion(); - doReturn(false, false).when(iVfModuleMetadata1).isBase(); - linkedList0.add(iVfModuleMetadata1); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - // Undeclared exception! - try { - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.util.ASDCNotificationLogging", e); - } - } + @Test(timeout = 4000) + public void test02() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + LinkedList linkedList1 = new LinkedList(); + linkedList0.offerFirst((IResourceInstance) null); + INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); + doReturn("").when(iNotificationData0).getDistributionID(); + doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources(); + doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts(); + doReturn("").when(iNotificationData0).getServiceDescription(); + doReturn("]U5JAkfdX0Cs").when(iNotificationData0).getServiceInvariantUUID(); + doReturn("jV13a").when(iNotificationData0).getServiceName(); + doReturn("").when(iNotificationData0).getServiceUUID(); + doReturn("jV13a").when(iNotificationData0).getServiceVersion(); + String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); + assertEquals("ASDC Notification:\nDistributionID:\nServiceName:jV13a\nServiceVersion:jV13a\nServiceUUID:\nServiceInvariantUUID:]U5JAkfdX0Cs\nServiceDescription:\nService Artifacts List:\nNULL\nResource Instances List:\n{\nNULL\n\n}\n\n", string0); + } - @Test(timeout = 4000) - public void test02() throws Throwable { - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging(); - LinkedList linkedList0 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - doReturn((List) null, (List) null).when(iVfModuleMetadata0).getArtifacts(); - doReturn("TTq", (String) null).when(iVfModuleMetadata0).getVfModuleModelDescription(); - doReturn("", (String) null).when(iVfModuleMetadata0).getVfModuleModelInvariantUUID(); - doReturn("w1e~\"rjNBjuq*0HB!3&", (String) null).when(iVfModuleMetadata0).getVfModuleModelName(); - doReturn("+l", (String) null).when(iVfModuleMetadata0).getVfModuleModelUUID(); - doReturn("]", (String) null).when(iVfModuleMetadata0).getVfModuleModelVersion(); - doReturn(true, false).when(iVfModuleMetadata0).isBase(); - linkedList0.add(iVfModuleMetadata0); - IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.removeFirstOccurrence(aSDCNotificationLogging1); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:NULL\nVfModuleModelVersion:NULL\nVfModuleModelUUID:NULL\nVfModuleModelInvariantUUID:NULL\nVfModuleModelDescription:NULL\nArtifacts UUID List:NULL\nisBase:false\n\n\n}\n", string0); - } + @Test(timeout = 4000) + public void test03() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + LinkedList linkedList1 = new LinkedList(); + IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer()); + doReturn((List) null).when(iResourceInstance0).getArtifacts(); + doReturn((String) null).when(iResourceInstance0).getCategory(); + doReturn((String) null).when(iResourceInstance0).getResourceCustomizationUUID(); + doReturn((String) null).when(iResourceInstance0).getResourceInstanceName(); + doReturn((String) null).when(iResourceInstance0).getResourceInvariantUUID(); + doReturn((String) null).when(iResourceInstance0).getResourceName(); + doReturn((String) null).when(iResourceInstance0).getResourceType(); + doReturn((String) null).when(iResourceInstance0).getResourceUUID(); + doReturn((String) null).when(iResourceInstance0).getResourceVersion(); + doReturn((String) null).when(iResourceInstance0).getSubcategory(); + linkedList0.add(iResourceInstance0); + INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); + doReturn("").when(iNotificationData0).getDistributionID(); + doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources(); + doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts(); + doReturn("").when(iNotificationData0).getServiceDescription(); + doReturn("").when(iNotificationData0).getServiceInvariantUUID(); + doReturn("36-s.n1@").when(iNotificationData0).getServiceName(); + doReturn("36-s.n1@").when(iNotificationData0).getServiceUUID(); + doReturn("").when(iNotificationData0).getServiceVersion(); + String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); + assertEquals("ASDC Notification:\nDistributionID:\nServiceName:36-s.n1@\nServiceVersion:\nServiceUUID:36-s.n1@\nServiceInvariantUUID:\nServiceDescription:\nService Artifacts List:\nNULL\nResource Instances List:\n{\nResource Instance Info:\nResourceInstanceName:NULL\nResourceCustomizationUUID:NULL\nResourceInvariantUUID:NULL\nResourceName:NULL\nResourceType:NULL\nResourceUUID:NULL\nResourceVersion:NULL\nCategory:NULL\nSubCategory:NULL\nResource Artifacts List:\nNULL\n\n\n}\n\n", string0); + } - @Test(timeout = 4000) - public void test03() throws Throwable { - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - List list0 = (List) mock(List.class, new ViolatedAssumptionAnswer()); - List list1 = (List) mock(List.class, new ViolatedAssumptionAnswer()); - doReturn(false).when(list1).isEmpty(); - doReturn((Iterator) null).when(list1).iterator(); - doReturn(0).when(list1).size(); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData0).getDistributionID(); - doReturn(list1).when(iNotificationData0).getServiceArtifacts(); - doReturn("9").when(iNotificationData0).getServiceDescription(); - doReturn("9").when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn("Type not recognized").when(iNotificationData0).getServiceUUID(); - doReturn("").when(iNotificationData0).getServiceVersion(); - // Undeclared exception! - try { - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.util.ASDCNotificationLogging", e); - } - } + @Test(timeout = 4000) + public void test04() throws Throwable { + INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(iNotificationData0).getDistributionID(); + doReturn((List) null).when(iNotificationData0).getResources(); + doReturn((List) null).when(iNotificationData0).getServiceArtifacts(); + doReturn((String) null).when(iNotificationData0).getServiceDescription(); + doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); + doReturn((String) null).when(iNotificationData0).getServiceName(); + doReturn((String) null).when(iNotificationData0).getServiceUUID(); + doReturn((String) null).when(iNotificationData0).getServiceVersion(); + String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); + assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string0); + } - @Test(timeout = 4000) - public void test04() throws Throwable { - LinkedList linkedList0 = new LinkedList(); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("(ICU8j3G)Z4Z[GAE").when(iNotificationData0).getDistributionID(); - doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources(); - doReturn((List) null).when(iNotificationData0).getServiceArtifacts(); - doReturn(")&42fB6dZT&HRAb1a").when(iNotificationData0).getServiceDescription(); - doReturn("(ICU8j3G)Z4Z[GAE").when(iNotificationData0).getServiceInvariantUUID(); - doReturn(")&42fB6dZT&HRAb1a").when(iNotificationData0).getServiceName(); - doReturn(")&42fB6dZT&HRAb1a").when(iNotificationData0).getServiceUUID(); - doReturn("cHH N9Ha9YUPSpX00i").when(iNotificationData0).getServiceVersion(); - String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - assertEquals("ASDC Notification:\nDistributionID:(ICU8j3G)Z4Z[GAE\nServiceName:)&42fB6dZT&HRAb1a\nServiceVersion:cHH N9Ha9YUPSpX00i\nServiceUUID:)&42fB6dZT&HRAb1a\nServiceInvariantUUID:(ICU8j3G)Z4Z[GAE\nServiceDescription:)&42fB6dZT&HRAb1a\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n", string0); - } + @Test(timeout = 4000) + public void test05() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); + Map map0 = vfModuleMetaData0.getProperties(); + IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); + doReturn((List) null, (List) null).when(iVfModuleData0).getArtifacts(); + doReturn(map0, map0, (Map) null).when(iVfModuleData0).getProperties(); + doReturn("vfModuleModelUUID", "isBase:").when(iVfModuleData0).getVfModuleModelDescription(); + doReturn((String) null, "vfModuleModelName").when(iVfModuleData0).getVfModuleModelInvariantUUID(); + doReturn("", "").when(iVfModuleData0).getVfModuleModelName(); + doReturn("vfModuleModelUUID", "isBase:").when(iVfModuleData0).getVfModuleModelUUID(); + doReturn("|:\\KD91", "vfModuleModelName").when(iVfModuleData0).getVfModuleModelVersion(); + doReturn(false, false).when(iVfModuleData0).isBase(); + linkedList0.add(iVfModuleData0); + String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); + assertEquals("VfModuleMetaData List:\n{\nVfModuleMetaData:\nVfModuleModelName:\nVfModuleModelVersion:|:\\KD91\nVfModuleModelUUID:vfModuleModelUUID\nVfModuleModelInvariantUUID:NULL\nVfModuleModelDescription:vfModuleModelUUID\nArtifacts UUID List:NULLProperties List:\n}\n\nisBase:false\n\n\n}\n", string0); - @Test(timeout = 4000) - public void test05() throws Throwable { - LinkedList linkedList0 = new LinkedList(); - assertEquals(0, linkedList0.size()); - - LinkedList linkedList1 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList1, linkedList1).when(iVfModuleMetadata0).getArtifacts(); - doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelDescription(); - doReturn(", artifactChecksum=").when(iVfModuleMetadata0).getVfModuleModelInvariantUUID(); - doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelName(); - doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelUUID(); - doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelVersion(); - doReturn(false).when(iVfModuleMetadata0).isBase(); - IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.add(iVfModuleMetadata1); - linkedList1.push("dzjz-zmMzFE"); - linkedList0.listIterator(); - linkedList0.toArray(); - linkedList0.add(iVfModuleMetadata0); - linkedList0.pollFirst(); - String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:, artifactTimeout=\nVfModuleModelVersion:, artifactTimeout=\nVfModuleModelUUID:, artifactTimeout=\nVfModuleModelInvariantUUID:, artifactChecksum=\nVfModuleModelDescription:, artifactTimeout=\nArtifacts UUID List:{\ndzjz-zmMzFE\n\n}\n\nisBase:false\n\n\n}\n", string0); - - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - LinkedList linkedList2 = new LinkedList(); - LinkedList linkedList3 = new LinkedList((Collection) linkedList2); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData0).getDistributionID(); - doReturn((List) null).when(iNotificationData0).getResources(); - doReturn((List) null).when(iNotificationData0).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn((String) null).when(iNotificationData0).getServiceUUID(); - doReturn((String) null).when(iNotificationData0).getServiceVersion(); - String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string1); - } + String string1 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); + assertEquals("VfModuleMetaData List:\n{\nVfModuleMetaData:\nVfModuleModelName:\nVfModuleModelVersion:vfModuleModelName\nVfModuleModelUUID:isBase:\nVfModuleModelInvariantUUID:vfModuleModelName\nVfModuleModelDescription:isBase:\nArtifacts UUID List:NULLNULL\nisBase:false\n\n\n}\n", string1); + } - @Test(timeout = 4000) - public void test06() throws Throwable { - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData0).getDistributionID(); - doReturn((List) null).when(iNotificationData0).getResources(); - doReturn((List) null).when(iNotificationData0).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn((String) null).when(iNotificationData0).getServiceUUID(); - doReturn((String) null).when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - LinkedList linkedList0 = new LinkedList(); - List list0 = linkedList0.subList(0, 0); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - linkedList0.removeAll(list0); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - Comparator comparator0 = (Comparator) mock(Comparator.class, new ViolatedAssumptionAnswer()); - linkedList0.sort(comparator0); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.offerLast(iVfModuleMetadata0); - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData1).getDistributionID(); - doReturn((List) null).when(iNotificationData1).getResources(); - doReturn((List) null).when(iNotificationData1).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData1).getServiceDescription(); - doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData1).getServiceName(); - doReturn((String) null).when(iNotificationData1).getServiceUUID(); - doReturn((String) null).when(iNotificationData1).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - // Undeclared exception! - try { - ASDCNotificationLogging.dumpVfModuleMetaDataList(list0); - fail("Expecting exception: ConcurrentModificationException"); - - } catch(ConcurrentModificationException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.util.SubList", e); - } - } + @Test(timeout = 4000) + public void test06() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + LinkedList linkedList1 = new LinkedList(); + IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); + doReturn((List) null, (List) null).when(iVfModuleData0).getArtifacts(); + doReturn((Map) null, (Map) null).when(iVfModuleData0).getProperties(); + doReturn((String) null, (String) null).when(iVfModuleData0).getVfModuleModelDescription(); + doReturn((String) null, (String) null).when(iVfModuleData0).getVfModuleModelInvariantUUID(); + doReturn((String) null, (String) null).when(iVfModuleData0).getVfModuleModelName(); + doReturn((String) null, (String) null).when(iVfModuleData0).getVfModuleModelUUID(); + doReturn((String) null, (String) null).when(iVfModuleData0).getVfModuleModelVersion(); + doReturn(false, false).when(iVfModuleData0).isBase(); + linkedList1.add(iVfModuleData0); + String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList1); + String string1 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList1); + assertTrue(string1.equals((Object)string0)); + assertEquals("VfModuleMetaData List:\n{\nVfModuleMetaData:\nVfModuleModelName:NULL\nVfModuleModelVersion:NULL\nVfModuleModelUUID:NULL\nVfModuleModelInvariantUUID:NULL\nVfModuleModelDescription:NULL\nArtifacts UUID List:NULLNULL\nisBase:false\n\n\n}\n", string1); + } - @Test(timeout = 4000) - public void test07() throws Throwable { - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging(); - LinkedList linkedList0 = new LinkedList(); - LinkedList linkedList1 = new LinkedList(); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("ResourceInstanceName:").when(iNotificationData0).getDistributionID(); - doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources(); - doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts(); - doReturn("ResourceInstanceName:").when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn("ResourceInstanceName:").when(iNotificationData0).getServiceName(); - doReturn("pr26M0Ud8~n6#j/;g").when(iNotificationData0).getServiceUUID(); - doReturn((String) null).when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - ASDCNotificationLogging aSDCNotificationLogging2 = new ASDCNotificationLogging(); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("ResourceInstanceName:").when(iNotificationData1).getDistributionID(); - doReturn(linkedList0, linkedList0).when(iNotificationData1).getResources(); - doReturn(linkedList1).when(iNotificationData1).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData1).getServiceDescription(); - doReturn("").when(iNotificationData1).getServiceInvariantUUID(); - doReturn("pr26M0Ud8~n6#j/;g").when(iNotificationData1).getServiceName(); - doReturn("").when(iNotificationData1).getServiceUUID(); - doReturn("Resource Artifacts List:").when(iNotificationData1).getServiceVersion(); - String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - assertEquals("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:pr26M0Ud8~n6#j/;g\nServiceVersion:Resource Artifacts List:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n", string0); - - ASDCNotificationLogging aSDCNotificationLogging3 = new ASDCNotificationLogging(); - LinkedList linkedList2 = new LinkedList(); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList2); - LinkedList linkedList3 = new LinkedList(); - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactChecksum(); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactDescription(); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactName(); - doReturn((Integer) null, (Integer) null, (Integer) null).when(iArtifactInfo0).getArtifactTimeout(); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactType(); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactURL(); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactUUID(); - doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactVersion(); - doReturn((IArtifactInfo) null, (IArtifactInfo) null, (IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact(); - doReturn((List) null, (List) null, (List) null).when(iArtifactInfo0).getRelatedArtifacts(); - linkedList1.add(iArtifactInfo0); - INotificationData iNotificationData2 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("tlh7ku").when(iNotificationData2).getDistributionID(); - doReturn(linkedList3, linkedList0).when(iNotificationData2).getResources(); - doReturn(linkedList1).when(iNotificationData2).getServiceArtifacts(); - doReturn("").when(iNotificationData2).getServiceDescription(); - doReturn("").when(iNotificationData2).getServiceInvariantUUID(); - doReturn("tlh7ku").when(iNotificationData2).getServiceName(); - doReturn("_B4BTx//Er%IWM}et0").when(iNotificationData2).getServiceUUID(); - doReturn("").when(iNotificationData2).getServiceVersion(); - IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList1).when(iResourceInstance0).getArtifacts(); - doReturn("").when(iResourceInstance0).getResourceInstanceName(); - doReturn("Resource Artifacts List:").when(iResourceInstance0).getResourceInvariantUUID(); - doReturn("Hq^8Xl<>T").when(iResourceInstance0).getResourceName(); - doReturn((String) null).when(iResourceInstance0).getResourceType(); - doReturn("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:ResourceInstanceName:\nServiceVersion:NULL\nServiceUUID:pr26M0Ud8~n6#j/;g\nServiceInvariantUUID:NULL\nServiceDescription:ResourceInstanceName:\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n").when(iResourceInstance0).getResourceUUID(); - doReturn("zIQ?4(U$K ").when(iResourceInstance0).getResourceVersion(); - linkedList0.add(iResourceInstance0); - IResourceInstance iResourceInstance1 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList1).when(iResourceInstance1).getArtifacts(); - doReturn("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:pr26M0Ud8~n6#j/;g\nServiceVersion:Resource Artifacts List:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n").when(iResourceInstance1).getResourceInstanceName(); - doReturn("5yNU;|<:T-ixwLB").when(iResourceInstance1).getResourceInvariantUUID(); - doReturn("").when(iResourceInstance1).getResourceName(); - doReturn("xguM[yK-\"").when(iResourceInstance1).getResourceType(); - doReturn("").when(iResourceInstance1).getResourceUUID(); - doReturn("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:pr26M0Ud8~n6#j/;g\nServiceVersion:Resource Artifacts List:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n").when(iResourceInstance1).getResourceVersion(); - linkedList1.removeFirstOccurrence((Object) null); - linkedList0.add(iResourceInstance1); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData2); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - String string1 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList2); - assertEquals("\n}\n", string1); - } + @Test(timeout = 4000) + public void test07() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); + linkedList0.add((IVfModuleData) vfModuleMetaData0); + UnaryOperator unaryOperator0 = (UnaryOperator) mock(UnaryOperator.class, new ViolatedAssumptionAnswer()); + doReturn((Object) null).when(unaryOperator0).apply(any()); + linkedList0.replaceAll(unaryOperator0); + String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); + assertEquals("VfModuleMetaData List:\n{\nNULL\n\n}\n", string0); + } - @Test(timeout = 4000) - public void test08() throws Throwable { - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData0).getDistributionID(); - doReturn((List) null).when(iNotificationData0).getResources(); - doReturn((List) null).when(iNotificationData0).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn((String) null).when(iNotificationData0).getServiceUUID(); - doReturn((String) null).when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData1).getDistributionID(); - doReturn((List) null).when(iNotificationData1).getResources(); - doReturn((List) null).when(iNotificationData1).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData1).getServiceDescription(); - doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData1).getServiceName(); - doReturn((String) null).when(iNotificationData1).getServiceUUID(); - doReturn((String) null).when(iNotificationData1).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - INotificationData iNotificationData2 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData2).getDistributionID(); - doReturn((List) null).when(iNotificationData2).getResources(); - doReturn((List) null).when(iNotificationData2).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData2).getServiceDescription(); - doReturn((String) null).when(iNotificationData2).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData2).getServiceName(); - doReturn((String) null).when(iNotificationData2).getServiceUUID(); - doReturn((String) null).when(iNotificationData2).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData2); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - INotificationData iNotificationData3 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData3).getDistributionID(); - doReturn((List) null).when(iNotificationData3).getResources(); - doReturn((List) null).when(iNotificationData3).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData3).getServiceDescription(); - doReturn((String) null).when(iNotificationData3).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData3).getServiceName(); - doReturn((String) null).when(iNotificationData3).getServiceUUID(); - doReturn((String) null).when(iNotificationData3).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData3); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - INotificationData iNotificationData4 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData4).getDistributionID(); - doReturn((List) null).when(iNotificationData4).getResources(); - doReturn((List) null).when(iNotificationData4).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData4).getServiceDescription(); - doReturn((String) null).when(iNotificationData4).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData4).getServiceName(); - doReturn((String) null).when(iNotificationData4).getServiceUUID(); - doReturn((String) null).when(iNotificationData4).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData4); - INotificationData iNotificationData5 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData5).getDistributionID(); - doReturn((List) null).when(iNotificationData5).getResources(); - doReturn((List) null).when(iNotificationData5).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData5).getServiceDescription(); - doReturn((String) null).when(iNotificationData5).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData5).getServiceName(); - doReturn((String) null).when(iNotificationData5).getServiceUUID(); - doReturn((String) null).when(iNotificationData5).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData5); - INotificationData iNotificationData6 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData6).getDistributionID(); - doReturn((List) null).when(iNotificationData6).getResources(); - doReturn((List) null).when(iNotificationData6).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData6).getServiceDescription(); - doReturn((String) null).when(iNotificationData6).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData6).getServiceName(); - doReturn((String) null).when(iNotificationData6).getServiceUUID(); - doReturn((String) null).when(iNotificationData6).getServiceVersion(); - String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData6); - assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string0); - - ASDCNotificationLogging.dumpASDCNotification((INotificationData) null); - String string1 = ASDCNotificationLogging.dumpASDCNotification((INotificationData) null); - assertEquals("NULL", string1); - } + @Test(timeout = 4000) + public void test08() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); + linkedList0.add((IVfModuleData) vfModuleMetaData0); + // Undeclared exception! + try { + ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); + fail("Expecting exception: NullPointerException"); - @Test(timeout = 4000) - public void test09() throws Throwable { - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - LinkedList linkedList0 = new LinkedList(); - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iArtifactInfo0).getArtifactChecksum(); - doReturn((String) null).when(iArtifactInfo0).getArtifactDescription(); - doReturn((String) null).when(iArtifactInfo0).getArtifactName(); - doReturn((Integer) null).when(iArtifactInfo0).getArtifactTimeout(); - doReturn((String) null).when(iArtifactInfo0).getArtifactType(); - doReturn((String) null).when(iArtifactInfo0).getArtifactURL(); - doReturn((String) null).when(iArtifactInfo0).getArtifactUUID(); - doReturn((String) null).when(iArtifactInfo0).getArtifactVersion(); - doReturn((IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact(); - doReturn((List) null).when(iArtifactInfo0).getRelatedArtifacts(); - linkedList0.add(iArtifactInfo0); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData0).getDistributionID(); - doReturn((List) null).when(iNotificationData0).getResources(); - doReturn(linkedList0).when(iNotificationData0).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn((String) null).when(iNotificationData0).getServiceUUID(); - doReturn("(").when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - assertNull(string0); - } + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); + } + } - @Test(timeout = 4000) - public void test10() throws Throwable { - LinkedList linkedList0 = new LinkedList(); - LinkedList linkedList1 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList1.add(iVfModuleMetadata0); - LinkedList linkedList2 = new LinkedList(); - LinkedList linkedList3 = new LinkedList(); - linkedList1.removeFirst(); - linkedList0.addAll((Collection) linkedList1); - LinkedList linkedList4 = new LinkedList(); - LinkedList linkedList5 = new LinkedList(); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - LinkedList linkedList6 = new LinkedList(); - LinkedList linkedList7 = new LinkedList(); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("]=ztki(=]").when(iNotificationData0).getDistributionID(); - doReturn(linkedList6, linkedList6).when(iNotificationData0).getResources(); - doReturn(linkedList7).when(iNotificationData0).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData0).getServiceDescription(); - doReturn("").when(iNotificationData0).getServiceInvariantUUID(); - doReturn("").when(iNotificationData0).getServiceName(); - doReturn("VG).").when(iNotificationData0).getServiceUUID(); - doReturn("").when(iNotificationData0).getServiceVersion(); - linkedList0.spliterator(); - linkedList0.containsAll(linkedList1); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - LinkedList linkedList8 = new LinkedList(); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("C'K").when(iNotificationData1).getDistributionID(); - doReturn(linkedList6, linkedList8).when(iNotificationData1).getResources(); - doReturn(linkedList7).when(iNotificationData1).getServiceArtifacts(); - doReturn("NotificationDataImpl [distributionID=").when(iNotificationData1).getServiceDescription(); - doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID(); - doReturn("B.").when(iNotificationData1).getServiceName(); - doReturn("").when(iNotificationData1).getServiceUUID(); - doReturn("").when(iNotificationData1).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - } + @Test(timeout = 4000) + public void test09() throws Throwable { + String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); + assertNull(string0); + } - @Test(timeout = 4000) - public void test11() throws Throwable { - LinkedList linkedList0 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.add(iVfModuleMetadata0); - linkedList0.add((IVfModuleMetadata) null); - LinkedList linkedList1 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList1, linkedList1, linkedList1, linkedList1).when(iVfModuleMetadata1).getArtifacts(); - doReturn("8u1XbrrMy{J2", "").when(iVfModuleMetadata1).getVfModuleModelDescription(); - doReturn("YR/UZ7qrmvO", "8u1XbrrMy{J2").when(iVfModuleMetadata1).getVfModuleModelInvariantUUID(); - doReturn("8u1XbrrMy{J2", ".l=(8f`8f}.9>yn").when(iVfModuleMetadata1).getVfModuleModelName(); - doReturn("", "YR/UZ7qrmvO").when(iVfModuleMetadata1).getVfModuleModelUUID(); - doReturn("[66/OPYLD.B%", ".l=(8f`8f}.9>yn").when(iVfModuleMetadata1).getVfModuleModelVersion(); - doReturn(false, true).when(iVfModuleMetadata1).isBase(); - LinkedList linkedList2 = new LinkedList(); - linkedList2.add((IVfModuleMetadata) null); - linkedList2.offer((IVfModuleMetadata) null); - Predicate predicate0 = (Predicate) mock(Predicate.class, new ViolatedAssumptionAnswer()); - doReturn(true, false).when(predicate0).test(any()); - linkedList2.removeIf(predicate0); - linkedList0.retainAll(linkedList2); - LinkedList linkedList3 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata2 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList3, linkedList3, linkedList3, linkedList1).when(iVfModuleMetadata2).getArtifacts(); - doReturn("YR/UZ7qrmvO", "8u1XbrrMy{J2").when(iVfModuleMetadata2).getVfModuleModelDescription(); - doReturn("", "8u1XbrrMy{J2").when(iVfModuleMetadata2).getVfModuleModelInvariantUUID(); - doReturn("[66/OPYLD.B%", "").when(iVfModuleMetadata2).getVfModuleModelName(); - doReturn("", "[66/OPYLD.B%").when(iVfModuleMetadata2).getVfModuleModelUUID(); - doReturn((String) null, "").when(iVfModuleMetadata2).getVfModuleModelVersion(); - doReturn(true, false).when(iVfModuleMetadata2).isBase(); - linkedList0.add(iVfModuleMetadata2); - linkedList0.push(iVfModuleMetadata1); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging(); - ASDCNotificationLogging aSDCNotificationLogging2 = new ASDCNotificationLogging(); - ASDCNotificationLogging aSDCNotificationLogging3 = new ASDCNotificationLogging(); - String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:.l=(8f`8f}.9>yn\nVfModuleModelVersion:.l=(8f`8f}.9>yn\nVfModuleModelUUID:YR/UZ7qrmvO\nVfModuleModelInvariantUUID:8u1XbrrMy{J2\nVfModuleModelDescription:\nArtifacts UUID List:\n}\n\nisBase:true\n\n,\nNULL\n,\nVfModuleMetaData:\nVfModuleModelName:\nVfModuleModelVersion:\nVfModuleModelUUID:[66/OPYLD.B%\nVfModuleModelInvariantUUID:8u1XbrrMy{J2\nVfModuleModelDescription:8u1XbrrMy{J2\nArtifacts UUID List:\n}\n\nisBase:false\n\n\n}\n", string0); - - LinkedList linkedList4 = new LinkedList(); - LinkedList linkedList5 = new LinkedList((Collection) linkedList4); - LinkedList linkedList6 = new LinkedList(); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("95y$c-.BW5V()41WR").when(iNotificationData0).getDistributionID(); - doReturn(linkedList5, linkedList4).when(iNotificationData0).getResources(); - doReturn(linkedList6).when(iNotificationData0).getServiceArtifacts(); - doReturn(", artifactTimeout=").when(iNotificationData0).getServiceDescription(); - doReturn("[66/OPYLD.B%").when(iNotificationData0).getServiceInvariantUUID(); - doReturn("[66/OPYLD.B%").when(iNotificationData0).getServiceName(); - doReturn(", artifactChecksum=").when(iNotificationData0).getServiceUUID(); - doReturn("W1vX^KnIx[x").when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - ASDCNotificationLogging aSDCNotificationLogging4 = new ASDCNotificationLogging(); - ASDCNotificationLogging aSDCNotificationLogging5 = new ASDCNotificationLogging(); - LinkedList linkedList7 = new LinkedList(); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("").when(iNotificationData1).getDistributionID(); - doReturn(linkedList4, linkedList7).when(iNotificationData1).getResources(); - doReturn(linkedList6).when(iNotificationData1).getServiceArtifacts(); - doReturn("3l\"ZrTP`IQ-4x]").when(iNotificationData1).getServiceDescription(); - doReturn("").when(iNotificationData1).getServiceInvariantUUID(); - doReturn("").when(iNotificationData1).getServiceName(); - doReturn("").when(iNotificationData1).getServiceUUID(); - doReturn("").when(iNotificationData1).getServiceVersion(); - String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - assertEquals("ASDC Notification:\nDistributionID:\nServiceName:\nServiceVersion:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:3l\"ZrTP`IQ-4x]\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n", string1); - } + @Test(timeout = 4000) + public void test10() throws Throwable { + String string0 = ASDCNotificationLogging.dumpASDCNotification((INotificationData) null); + assertEquals("NULL", string0); + } - @Test(timeout = 4000) - public void test12() throws Throwable { - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData0).getDistributionID(); - doReturn((List) null).when(iNotificationData0).getResources(); - doReturn((List) null).when(iNotificationData0).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn((String) null).when(iNotificationData0).getServiceUUID(); - doReturn((String) null).when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData1).getDistributionID(); - doReturn((List) null).when(iNotificationData1).getResources(); - doReturn((List) null).when(iNotificationData1).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData1).getServiceDescription(); - doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData1).getServiceName(); - doReturn((String) null).when(iNotificationData1).getServiceUUID(); - doReturn((String) null).when(iNotificationData1).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - INotificationData iNotificationData2 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData2).getDistributionID(); - doReturn((List) null).when(iNotificationData2).getResources(); - doReturn((List) null).when(iNotificationData2).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData2).getServiceDescription(); - doReturn((String) null).when(iNotificationData2).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData2).getServiceName(); - doReturn((String) null).when(iNotificationData2).getServiceUUID(); - doReturn((String) null).when(iNotificationData2).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData2); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging(); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - INotificationData iNotificationData3 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData3).getDistributionID(); - doReturn((List) null).when(iNotificationData3).getResources(); - doReturn((List) null).when(iNotificationData3).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData3).getServiceDescription(); - doReturn((String) null).when(iNotificationData3).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData3).getServiceName(); - doReturn((String) null).when(iNotificationData3).getServiceUUID(); - doReturn((String) null).when(iNotificationData3).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData3); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - ASDCNotificationLogging aSDCNotificationLogging2 = new ASDCNotificationLogging(); - LinkedList linkedList0 = new LinkedList(); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - doReturn((List) null, (List) null, (List) null).when(iVfModuleMetadata0).getArtifacts(); - doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelDescription(); - doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelInvariantUUID(); - doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelName(); - doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelUUID(); - doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelVersion(); - doReturn(false, false, false).when(iVfModuleMetadata0).isBase(); - linkedList0.add(iVfModuleMetadata0); - linkedList0.removeLastOccurrence("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n"); - linkedList0.remove((Object) null); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - ASDCNotificationLogging aSDCNotificationLogging3 = new ASDCNotificationLogging(); - String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - String string1 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:NULL\nVfModuleModelVersion:NULL\nVfModuleModelUUID:NULL\nVfModuleModelInvariantUUID:NULL\nVfModuleModelDescription:NULL\nArtifacts UUID List:NULL\nisBase:false\n\n\n}\n", string1); - assertTrue(string1.equals((Object)string0)); - - ASDCNotificationLogging aSDCNotificationLogging4 = new ASDCNotificationLogging(); - ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); - INotificationData iNotificationData4 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(iNotificationData4).getDistributionID(); - doReturn((List) null).when(iNotificationData4).getResources(); - doReturn((List) null).when(iNotificationData4).getServiceArtifacts(); - doReturn((String) null).when(iNotificationData4).getServiceDescription(); - doReturn((String) null).when(iNotificationData4).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData4).getServiceName(); - doReturn((String) null).when(iNotificationData4).getServiceUUID(); - doReturn((String) null).when(iNotificationData4).getServiceVersion(); - String string2 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData4); - assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string2); - } + @Test(timeout = 4000) + public void test11() throws Throwable { + LinkedList linkedList0 = new LinkedList(); + INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); + doReturn("io7<{~.v|%").when(iNotificationData0).getDistributionID(); + doReturn((List) null).when(iNotificationData0).getResources(); + doReturn(linkedList0).when(iNotificationData0).getServiceArtifacts(); + doReturn("io7<{~.v|%").when(iNotificationData0).getServiceDescription(); + doReturn("io7<{~.v|%").when(iNotificationData0).getServiceInvariantUUID(); + doReturn("io7<{~.v|%").when(iNotificationData0).getServiceName(); + doReturn((String) null).when(iNotificationData0).getServiceUUID(); + doReturn("io7<{~.v|%").when(iNotificationData0).getServiceVersion(); + String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); + assertEquals("ASDC Notification:\nDistributionID:io7<{~.v|%\nServiceName:io7<{~.v|%\nServiceVersion:io7<{~.v|%\nServiceUUID:NULL\nServiceInvariantUUID:io7<{~.v|%\nServiceDescription:io7<{~.v|%\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string0); - @Test(timeout = 4000) - public void test13() throws Throwable { - ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); - LinkedList linkedList0 = new LinkedList(); - IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer()); - doReturn((List) null).when(iResourceInstance0).getArtifacts(); - doReturn((String) null).when(iResourceInstance0).getResourceInstanceName(); - doReturn((String) null).when(iResourceInstance0).getResourceInvariantUUID(); - doReturn((String) null).when(iResourceInstance0).getResourceName(); - doReturn((String) null).when(iResourceInstance0).getResourceType(); - doReturn((String) null).when(iResourceInstance0).getResourceUUID(); - doReturn((String) null).when(iResourceInstance0).getResourceVersion(); - linkedList0.add(iResourceInstance0); - LinkedList linkedList1 = new LinkedList(); - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - doReturn("(n,0").when(iNotificationData0).getDistributionID(); - doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources(); - doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts(); - doReturn("(n,0").when(iNotificationData0).getServiceDescription(); - doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID(); - doReturn((String) null).when(iNotificationData0).getServiceName(); - doReturn("").when(iNotificationData0).getServiceUUID(); - doReturn("t1N;ZSJsATt:&Ug").when(iNotificationData0).getServiceVersion(); - ASDCNotificationLogging.dumpASDCNotification(iNotificationData0); - LinkedList linkedList2 = new LinkedList(); - linkedList2.clear(); - // Undeclared exception! - try { - linkedList2.remove(); - fail("Expecting exception: NoSuchElementException"); - - } catch(NoSuchElementException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.util.LinkedList", e); - } - } + ASDCNotificationLogging.dumpVfModuleMetaDataList((List) null); + IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(iArtifactInfo0).getArtifactChecksum(); + doReturn((String) null).when(iArtifactInfo0).getArtifactDescription(); + doReturn((String) null).when(iArtifactInfo0).getArtifactName(); + doReturn((Integer) null).when(iArtifactInfo0).getArtifactTimeout(); + doReturn((String) null).when(iArtifactInfo0).getArtifactType(); + doReturn((String) null).when(iArtifactInfo0).getArtifactURL(); + doReturn((String) null).when(iArtifactInfo0).getArtifactUUID(); + doReturn((String) null).when(iArtifactInfo0).getArtifactVersion(); + doReturn((IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact(); + doReturn((List) null).when(iArtifactInfo0).getRelatedArtifacts(); + linkedList0.push(iArtifactInfo0); + INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); + doReturn("t2J^4~*i|btm ib&").when(iNotificationData1).getDistributionID(); + doReturn((List) null).when(iNotificationData1).getResources(); + doReturn(linkedList0).when(iNotificationData1).getServiceArtifacts(); + doReturn("N~a W7").when(iNotificationData1).getServiceDescription(); + doReturn("N~a W7").when(iNotificationData1).getServiceInvariantUUID(); + doReturn("/&*/=").when(iNotificationData1).getServiceName(); + doReturn((String) null).when(iNotificationData1).getServiceUUID(); + doReturn("ASDC Notification:\nDistributionID:io7<{~.v|%\nServiceName:io7<{~.v|%\nServiceVersion:io7<{~.v|%\nServiceUUID:NULL\nServiceInvariantUUID:io7<{~.v|%\nServiceDescription:io7<{~.v|%\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n").when(iNotificationData1).getServiceVersion(); + String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1); + assertEquals("ASDC Notification:\nDistributionID:t2J^4~*i|btm ib&\nServiceName:/&*/=\nServiceVersion:ASDC Notification:\nDistributionID:io7<{~.v|%\nServiceName:io7<{~.v|%\nServiceVersion:io7<{~.v|%\nServiceUUID:NULL\nServiceInvariantUUID:io7<{~.v|%\nServiceDescription:io7<{~.v|%\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n\nServiceUUID:NULL\nServiceInvariantUUID:N~a W7\nServiceDescription:N~a W7\nService Artifacts List:\n{\nService Artifacts Info:\nArtifactName:NULL\nArtifactVersion:NULL\nArtifactType:NULL\nArtifactDescription:NULL\nArtifactTimeout:NULL\nArtifactURL:NULL\nArtifactUUID:NULL\nArtifactChecksum:NULL\nGeneratedArtifact:{NULL\n}\nRelatedArtifacts:NULL\n\n\n}\n\nResource Instances List:\nNULL\n", string1); + } - @Test(timeout = 4000) - public void test14() throws Throwable { - LinkedList linkedList0 = new LinkedList(); - ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0); - IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.add(iVfModuleMetadata0); - linkedList0.remove((Object) "\n}\n"); - IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer()); - linkedList0.offerLast(iVfModuleMetadata1); - // Undeclared exception! - try { - linkedList0.subList((-1), (-1)); - fail("Expecting exception: IndexOutOfBoundsException"); - - } catch(IndexOutOfBoundsException e) { - // - // fromIndex = -1 - // - verifyException("java.util.SubList", e); - } - } + @Test(timeout = 4000) + public void test12() throws Throwable { + ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging(); + Object object0 = PrivateAccess.callMethod((Class) ASDCNotificationLogging.class, aSDCNotificationLogging0, "dumpASDCResourcesList", (Object) null, (Class) INotificationData.class); + assertNull(object0); + } } diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java index 1344bbe45d..62663e7397 100644 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java +++ b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java @@ -1,7 +1,7 @@ /** - * Scaffolding file used to store all the setups needed to run + * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite - * Fri Nov 25 13:31:27 GMT 2016 + * Mon Mar 13 15:55:23 GMT 2017 */ package org.openecomp.mso.asdc.util; @@ -12,69 +12,70 @@ import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; +import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class ASDCNotificationLoggingESTestscaffolding { - @org.junit.Rule + @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 static final java.util.Properties defaultProperties = (java.util.Properties) 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.asdc.util.ASDCNotificationLogging"; - 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(); + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.util.ASDCNotificationLogging"; + 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 = SandboxMode.RECOMMENDED; + Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + System.setProperties((java.util.Properties) defaultProperties.clone()); + } - @Before - public void initTestCase(){ + @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(); - } + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + Sandbox.goingToExecuteSUTCode(); + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } - @After - public void doneWithTestCase(){ + @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(); - } + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCNotificationLoggingESTestscaffolding.class.getClassLoader() , "org.openecomp.sdc.api.notification.INotificationData", + "org.openecomp.mso.asdc.installer.VfModuleMetaData", + "org.openecomp.mso.asdc.installer.IVfModuleData", "org.openecomp.sdc.api.notification.IResourceInstance", - "org.openecomp.sdc.api.notification.IVfModuleMetadata", - "org.openecomp.mso.asdc.util.ASDCNotificationLogging", - "org.openecomp.sdc.api.notification.IArtifactInfo" + "org.openecomp.sdc.api.notification.IArtifactInfo", + "org.openecomp.mso.asdc.util.ASDCNotificationLogging" ); - } + } private static void resetClasses() { } -- cgit