Merge "updated ARIA version"
[so.git] / common / src / test / java / org / openecomp / mso / properties / MsoPropertyInitializerESTestscaffolding.java
1 /**
2  * Scaffolding file used to store all the setups needed to run 
3  * tests automatically generated by EvoSuite
4  * Mon Nov 14 08:01:07 GMT 2016
5  */
6
7 package org.openecomp.mso.properties;
8
9 import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
10 import org.junit.BeforeClass;
11 import org.junit.Before;
12 import org.junit.After;
13 import org.junit.AfterClass;
14 import org.evosuite.runtime.sandbox.Sandbox;
15
16 @EvoSuiteClassExclude
17 public class MsoPropertyInitializerESTestscaffolding {
18
19   @org.junit.Rule 
20   public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
21
22   private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
23
24   private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
25
26   @BeforeClass 
27   public static void initEvoSuiteFramework() { 
28     org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertyInitializer"; 
29     org.evosuite.runtime.GuiSupport.initialize(); 
30     org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
31     org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
32     org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
33     org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
34     org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
35     org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
36     initializeClasses();
37     org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
38   } 
39
40   @AfterClass 
41   public static void clearEvoSuiteFramework(){ 
42     Sandbox.resetDefaultSecurityManager(); 
43     java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
44   } 
45
46   @Before 
47   public void initTestCase(){ 
48     threadStopper.storeCurrentThreads();
49     threadStopper.startRecordingTime();
50     org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
51     org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
52      
53     org.evosuite.runtime.GuiSupport.setHeadless(); 
54     org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
55     org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
56   } 
57
58   @After 
59   public void doneWithTestCase(){ 
60     threadStopper.killAndJoinClientThreads();
61     org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
62     org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
63     resetClasses(); 
64     org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
65     org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
66     org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
67   } 
68
69
70   private static void initializeClasses() {
71     org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertyInitializerESTestscaffolding.class.getClassLoader() ,
72       "org.openecomp.mso.properties.AbstractMsoProperties",
73       "org.apache.xerces.xni.parser.XMLDTDContentModelFilter",
74       "org.apache.xerces.xs.PSVIProvider",
75       "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
76       "org.apache.xerces.impl.dtd.XMLEntityDecl",
77       "org.apache.xerces.xs.ItemPSVI",
78       "org.apache.xerces.xni.parser.XMLEntityResolver",
79       "org.apache.xerces.impl.dtd.XMLNSDTDValidator",
80       "org.apache.xerces.impl.XMLDTDScannerImpl",
81       "org.apache.xerces.parsers.ObjectFactory",
82       "org.apache.xerces.xni.parser.XMLConfigurationException",
83       "org.apache.xerces.impl.XML11NSDocumentScannerImpl",
84       "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
85       "org.apache.xerces.parsers.SAXParser",
86       "com.att.eelf.i18n.EELFResolvableErrorEnum",
87       "org.apache.xerces.xni.XMLResourceIdentifier",
88       "org.apache.xerces.impl.XMLEntityManager$RewindableInputStream",
89       "org.apache.xerces.impl.XMLEntityManager",
90       "org.apache.xerces.impl.dtd.XMLDTDDescription",
91       "org.apache.xerces.xni.parser.XMLInputSource",
92       "com.att.eelf.i18n.EELFMsgs",
93       "org.apache.xerces.xni.parser.XMLComponentManager",
94       "com.att.eelf.configuration.EELFLogger$Level",
95       "org.apache.xerces.impl.io.UTF8Reader",
96       "org.apache.xerces.impl.dv.InvalidDatatypeValueException",
97       "org.apache.xerces.jaxp.UnparsedEntityHandler",
98       "org.apache.xerces.parsers.AbstractXMLDocumentParser",
99       "org.apache.xerces.impl.XMLScanner",
100       "org.apache.xerces.impl.dtd.XMLSimpleType",
101       "org.apache.xerces.impl.XML11DocumentScannerImpl",
102       "org.apache.xerces.xni.parser.XMLParseException",
103       "org.apache.xerces.util.AugmentationsImpl$AugmentationsItemsContainer",
104       "org.apache.xerces.impl.XMLEntityScanner",
105       "org.apache.xerces.util.URI$MalformedURIException",
106       "org.apache.xerces.util.XMLChar",
107       "org.apache.xerces.impl.XMLNSDocumentScannerImpl",
108       "org.apache.xerces.impl.XML11DTDScannerImpl",
109       "org.apache.xerces.util.URI",
110       "org.apache.xerces.xni.parser.XMLDocumentFilter",
111       "org.apache.xerces.xni.parser.XMLDTDSource",
112       "org.apache.xerces.impl.dtd.XMLElementDecl",
113       "org.apache.xerces.impl.dtd.XMLAttributeDecl",
114       "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
115       "org.apache.xerces.xni.grammars.Grammar",
116       "org.apache.xerces.parsers.XMLParser",
117       "org.apache.xerces.impl.dtd.models.ContentModelValidator",
118       "com.att.eelf.configuration.EELFLogger",
119       "org.apache.xerces.xni.grammars.XMLGrammarLoader",
120       "org.apache.xerces.xni.XMLDocumentHandler",
121       "org.openecomp.mso.properties.MsoJavaProperties",
122       "org.apache.xerces.util.SymbolTable",
123       "org.apache.xerces.impl.io.UCSReader",
124       "org.apache.xerces.impl.XMLEntityManager$CharacterBuffer",
125       "org.apache.xerces.impl.io.Latin1Reader",
126       "org.apache.xerces.impl.dv.ValidationContext",
127       "org.apache.xerces.impl.dtd.XMLDTDValidator",
128       "org.apache.xerces.impl.dtd.XML11NSDTDValidator",
129       "org.apache.xerces.impl.validation.ValidationState",
130       "org.apache.xerces.impl.XMLEntityManager$Entity",
131       "org.apache.xerces.util.XMLResourceIdentifierImpl",
132       "org.apache.xerces.util.AugmentationsImpl",
133       "org.apache.xerces.impl.dv.ObjectFactory",
134       "org.apache.xerces.impl.dv.DatatypeValidator",
135       "org.apache.xerces.xni.NamespaceContext",
136       "org.apache.xerces.impl.dtd.XMLDTDLoader",
137       "org.apache.xerces.jaxp.SAXParserImpl",
138       "org.apache.xerces.util.XMLSymbols",
139       "org.apache.xerces.parsers.ObjectFactory$ConfigurationError",
140       "org.apache.xerces.xni.grammars.XMLGrammarDescription",
141       "org.apache.xerces.xni.parser.XMLErrorHandler",
142       "org.apache.xerces.impl.io.ASCIIReader",
143       "org.apache.xerces.util.MessageFormatter",
144       "org.openecomp.mso.properties.MsoPropertiesParameters",
145       "org.apache.xerces.impl.dtd.XMLDTDProcessor",
146       "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
147       "org.apache.xerces.xni.parser.XMLDTDScanner",
148       "org.openecomp.mso.logger.MsoLogger$ErrorCode",
149       "org.apache.xerces.xni.XMLAttributes",
150       "org.apache.xerces.impl.io.MalformedByteSequenceException",
151       "org.apache.xerces.impl.Constants$ArrayEnumeration",
152       "org.apache.xerces.impl.XML11EntityScanner",
153       "org.apache.xerces.impl.dtd.DTDGrammar",
154       "org.apache.xerces.impl.dv.DTDDVFactory",
155       "com.att.eelf.configuration.SLF4jWrapper",
156       "org.openecomp.mso.properties.MsoPropertiesException",
157       "org.apache.xerces.impl.validation.ValidationManager",
158       "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
159       "org.apache.xerces.xni.XNIException",
160       "org.apache.xerces.impl.dtd.XMLContentSpec",
161       "org.openecomp.mso.logger.MsoLogger",
162       "org.apache.xerces.xs.AttributePSVI",
163       "org.apache.xerces.impl.dtd.DTDGrammarBucket",
164       "org.apache.xerces.impl.msg.XMLMessageFormatter",
165       "org.apache.xerces.xni.parser.XMLDocumentScanner",
166       "org.apache.xerces.impl.XMLVersionDetector",
167       "org.apache.xerces.impl.XMLDocumentScannerImpl",
168       "org.apache.xerces.xni.parser.XMLPullParserConfiguration",
169       "org.apache.xerces.xni.parser.XMLDocumentSource",
170       "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Dispatcher",
171       "org.openecomp.mso.properties.MsoPropertiesFactory",
172       "org.apache.xerces.xni.XMLDTDContentModelHandler",
173       "org.apache.xerces.impl.xs.XMLSchemaValidator",
174       "org.openecomp.mso.logger.MsoLogger$Catalog",
175       "org.apache.xerces.xni.grammars.XMLDTDDescription",
176       "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
177       "org.apache.xerces.impl.XMLErrorReporter",
178       "org.apache.xerces.xni.QName",
179       "org.apache.xerces.jaxp.TeeXMLDocumentFilterImpl",
180       "org.apache.xerces.util.XMLAttributesImpl",
181       "org.apache.xerces.impl.Constants",
182       "org.apache.xerces.util.XMLStringBuffer",
183       "org.apache.xerces.impl.XMLEntityManager$InternalEntity",
184       "org.apache.xerces.jaxp.JAXPConstants",
185       "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
186       "org.apache.xerces.impl.RevalidationHandler",
187       "org.apache.xerces.xni.parser.XMLParserConfiguration",
188       "org.apache.xerces.xni.XMLString",
189       "org.apache.xerces.impl.dv.DVFactoryException",
190       "org.apache.xerces.impl.dv.DatatypeException",
191       "org.apache.xerces.parsers.XML11Configurable",
192       "org.apache.xerces.util.AugmentationsImpl$LargeContainer",
193       "org.apache.xerces.impl.dtd.BalancedDTDGrammar",
194       "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
195       "org.apache.xerces.xni.XMLDTDHandler",
196       "org.apache.xerces.impl.dtd.XML11DTDProcessor",
197       "org.apache.xerces.parsers.XML11Configuration",
198       "org.apache.xerces.impl.dtd.XMLDTDValidatorFilter",
199       "org.apache.xerces.impl.xs.identity.FieldActivator",
200       "org.apache.xerces.impl.XMLEntityScanner$1",
201       "com.att.eelf.i18n.EELFResourceManager",
202       "org.apache.xerces.jaxp.SAXParserFactoryImpl",
203       "org.apache.xerces.xs.ElementPSVI",
204       "org.apache.xerces.parsers.AbstractSAXParser",
205       "org.apache.xerces.xni.parser.XMLDTDFilter",
206       "org.apache.xerces.xni.parser.XMLDTDContentModelSource",
207       "org.openecomp.mso.logger.MessageEnum",
208       "org.openecomp.mso.logger.MsoLogger$ResponseCode",
209       "org.openecomp.mso.properties.MsoJsonProperties",
210       "org.openecomp.mso.entity.MsoRequest",
211       "org.openecomp.mso.properties.MsoPropertyInitializer",
212       "org.openecomp.mso.logger.MsoLogger$StatusCode",
213       "org.apache.xerces.xni.XMLLocator",
214       "com.att.eelf.configuration.EELFManager",
215       "org.apache.xerces.impl.validation.EntityState",
216       "org.apache.xerces.impl.XMLEntityManager$ExternalEntity",
217       "org.apache.xerces.util.ParserConfigurationSettings",
218       "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser",
219       "org.apache.xerces.xni.Augmentations",
220       "org.apache.xerces.impl.XMLEntityHandler",
221       "org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError",
222       "org.apache.xerces.xni.parser.XMLComponent",
223       "com.att.eelf.i18n.EELFResourceManager$1",
224       "org.apache.xerces.impl.dtd.XML11DTDValidator",
225       "org.apache.xerces.impl.XMLEntityManager$ScannedEntity",
226       "org.apache.xerces.jaxp.JAXPValidatorComponent"
227     );
228   } 
229
230   private static void resetClasses() {
231     org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertyInitializerESTestscaffolding.class.getClassLoader());
232
233     org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
234       "com.att.eelf.i18n.EELFResourceManager",
235       "org.openecomp.mso.logger.MessageEnum",
236       "org.openecomp.mso.logger.MsoLogger$Catalog",
237       "org.openecomp.mso.logger.MsoLogger$ErrorCode",
238       "org.openecomp.mso.logger.MsoLogger",
239       "com.att.eelf.i18n.EELFMsgs",
240       "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
241       "org.apache.xerces.jaxp.SAXParserFactoryImpl",
242       "org.apache.xerces.jaxp.SAXParserImpl",
243       "org.apache.xerces.parsers.XMLParser",
244       "org.apache.xerces.parsers.AbstractSAXParser",
245       "org.apache.xerces.parsers.SAXParser",
246       "org.apache.xerces.parsers.ObjectFactory",
247       "org.apache.xerces.util.ParserConfigurationSettings",
248       "org.apache.xerces.parsers.XML11Configuration",
249       "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
250       "org.apache.xerces.util.SymbolTable",
251       "org.apache.xerces.impl.XMLEntityManager",
252       "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
253       "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
254       "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
255       "org.apache.xerces.impl.XMLEntityScanner$1",
256       "org.apache.xerces.impl.XMLEntityScanner",
257       "org.apache.xerces.impl.XMLErrorReporter",
258       "org.apache.xerces.impl.XMLScanner",
259       "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
260       "org.apache.xerces.impl.XMLDocumentScannerImpl",
261       "org.apache.xerces.util.XMLStringBuffer",
262       "org.apache.xerces.util.XMLAttributesImpl",
263       "org.apache.xerces.impl.XMLDTDScannerImpl",
264       "org.apache.xerces.impl.dtd.XMLDTDProcessor",
265       "org.apache.xerces.impl.dtd.XMLDTDValidator",
266       "org.apache.xerces.impl.validation.ValidationState",
267       "org.apache.xerces.impl.dtd.XMLElementDecl",
268       "org.apache.xerces.impl.dtd.XMLSimpleType",
269       "org.apache.xerces.impl.dv.DTDDVFactory",
270       "org.apache.xerces.impl.dv.ObjectFactory",
271       "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
272       "org.apache.xerces.impl.XMLVersionDetector",
273       "org.apache.xerces.impl.msg.XMLMessageFormatter",
274       "org.apache.xerces.impl.io.UTF8Reader",
275       "org.apache.xerces.util.XMLSymbols",
276       "org.apache.xerces.xni.NamespaceContext",
277       "org.apache.xerces.util.XMLChar",
278       "org.apache.xerces.impl.Constants",
279       "com.att.eelf.configuration.EELFLogger$Level",
280       "com.att.eelf.configuration.EELFManager",
281       "org.openecomp.mso.properties.MsoPropertiesFactory"
282     );
283   }
284 }