be6c378ccc1d7450dc7cbe8fa17974eef26f280b
[so.git] / common / src / test / java / org / openecomp / mso / logger / MsoLoggingServletESTestscaffolding.java
1 /**
2  * Scaffolding file used to store all the setups needed to run 
3  * tests automatically generated by EvoSuite
4  * Mon Nov 14 09:04:06 GMT 2016
5  */
6
7 package org.openecomp.mso.logger;
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 MsoLoggingServletESTestscaffolding {
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.logger.MsoLoggingServlet"; 
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(MsoLoggingServletESTestscaffolding.class.getClassLoader() ,
72       "org.jboss.resteasy.spi.StringConverter",
73       "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
74       "org.apache.xerces.xni.XMLResourceIdentifier",
75       "org.apache.xerces.impl.XMLEntityManager",
76       "org.apache.xerces.impl.dtd.XMLDTDDescription",
77       "com.att.eelf.i18n.EELFMsgs",
78       "org.jboss.resteasy.util.ThreadLocalStack",
79       "org.apache.xerces.impl.dv.InvalidDatatypeValueException",
80       "org.apache.xerces.jaxp.UnparsedEntityHandler",
81       "org.apache.xerces.parsers.AbstractXMLDocumentParser",
82       "org.apache.xerces.impl.XMLScanner",
83       "org.apache.xerces.impl.dv.dtd.NOTATIONDatatypeValidator",
84       "org.apache.xerces.xni.parser.XMLParseException",
85       "org.apache.xerces.impl.XMLEntityScanner",
86       "org.apache.xerces.util.URI$MalformedURIException",
87       "org.apache.xerces.impl.XMLNSDocumentScannerImpl",
88       "org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry",
89       "org.apache.xerces.impl.dtd.models.CMAny",
90       "org.apache.xerces.util.URI",
91       "org.apache.xerces.xni.parser.XMLDocumentFilter",
92       "org.apache.xerces.xni.parser.XMLDTDSource",
93       "org.apache.xerces.impl.dtd.XMLAttributeDecl",
94       "org.apache.xerces.parsers.XMLParser",
95       "org.jboss.resteasy.spi.ResteasyProviderFactory",
96       "org.apache.xerces.util.SymbolTable",
97       "org.apache.xerces.impl.io.Latin1Reader",
98       "org.apache.xerces.impl.dv.ValidationContext",
99       "org.jboss.resteasy.spi.BadRequestException",
100       "org.apache.xerces.impl.dtd.XMLDTDValidator",
101       "org.apache.xerces.impl.dtd.XML11NSDTDValidator",
102       "org.openecomp.mso.logger.MsoLoggingServlet",
103       "org.apache.xerces.util.AugmentationsImpl",
104       "org.jboss.resteasy.core.interception.ReaderInterceptorRegistry",
105       "org.apache.xerces.impl.dv.ObjectFactory",
106       "org.jboss.resteasy.client.exception.mapper.ClientExceptionMapper",
107       "org.apache.xerces.impl.dv.DatatypeValidator",
108       "org.jboss.resteasy.spi.InjectorFactory",
109       "org.jboss.resteasy.core.interception.LegacyPrecedence",
110       "org.apache.xerces.jaxp.SAXParserImpl",
111       "org.apache.xerces.xni.grammars.XMLGrammarDescription",
112       "org.jboss.resteasy.plugins.delegates.NewCookieHeaderDelegate",
113       "org.apache.xerces.xni.parser.XMLErrorHandler",
114       "org.apache.xerces.util.MessageFormatter",
115       "org.apache.xerces.impl.XMLEntityManager$1",
116       "org.apache.xerces.xni.parser.XMLDTDScanner",
117       "org.openecomp.mso.logger.MsoLogger$ErrorCode",
118       "org.apache.xerces.xni.XMLAttributes",
119       "org.apache.xerces.impl.dv.dtd.StringDatatypeValidator",
120       "org.apache.xerces.impl.io.MalformedByteSequenceException",
121       "org.apache.xerces.impl.Constants$ArrayEnumeration",
122       "org.jboss.resteasy.core.interception.WriterInterceptorRegistry",
123       "org.apache.xerces.impl.dv.DTDDVFactory",
124       "org.apache.xerces.impl.dv.dtd.IDDatatypeValidator",
125       "org.apache.xerces.impl.validation.ValidationManager",
126       "org.apache.xerces.xni.XNIException",
127       "org.apache.xerces.impl.dtd.models.CMNode",
128       "org.apache.xerces.xni.parser.XMLDocumentSource",
129       "org.apache.xerces.xni.XMLDTDContentModelHandler",
130       "org.jboss.resteasy.spi.StringParameterUnmarshaller",
131       "org.jboss.resteasy.core.MediaTypeMap",
132       "org.openecomp.mso.logger.MsoLogger$Catalog",
133       "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
134       "org.apache.xerces.impl.XMLErrorReporter",
135       "org.jboss.resteasy.specimpl.ResteasyUriBuilder",
136       "org.apache.xerces.impl.Constants",
137       "org.apache.xerces.util.XMLStringBuffer",
138       "org.apache.xerces.jaxp.JAXPConstants",
139       "org.apache.xerces.xni.parser.XMLParserConfiguration",
140       "org.apache.xerces.xni.XMLString",
141       "org.apache.xerces.impl.dv.DVFactoryException",
142       "org.apache.xerces.impl.dv.DatatypeException",
143       "org.apache.xerces.parsers.XML11Configurable",
144       "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
145       "org.jboss.resteasy.logging.Logger$LoggerType",
146       "org.apache.xerces.impl.xs.identity.FieldActivator",
147       "org.apache.xerces.impl.XMLEntityScanner$1",
148       "org.apache.xerces.jaxp.SAXParserFactoryImpl",
149       "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
150       "org.apache.xerces.xs.ElementPSVI",
151       "org.apache.xerces.parsers.AbstractSAXParser",
152       "org.jboss.resteasy.spi.LoggableFailure",
153       "org.apache.xerces.xni.parser.XMLDTDFilter",
154       "org.apache.xerces.xni.parser.XMLDTDContentModelSource",
155       "org.openecomp.mso.entity.MsoRequest",
156       "org.apache.xerces.xni.XMLLocator",
157       "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser",
158       "org.apache.xerces.xni.Augmentations",
159       "org.apache.xerces.impl.XMLEntityHandler",
160       "org.jboss.resteasy.util.CaseInsensitiveMap$1",
161       "org.jboss.resteasy.specimpl.BuiltResponse",
162       "org.jboss.resteasy.core.Headers",
163       "org.apache.xerces.xni.parser.XMLComponent",
164       "org.apache.xerces.impl.dv.dtd.ListDatatypeValidator",
165       "org.jboss.resteasy.spi.Failure",
166       "org.apache.xerces.impl.XMLEntityManager$ScannedEntity",
167       "org.apache.xerces.jaxp.JAXPValidatorComponent",
168       "org.apache.xerces.xni.parser.XMLDTDContentModelFilter",
169       "org.apache.xerces.xs.PSVIProvider",
170       "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
171       "org.jboss.resteasy.specimpl.ResponseBuilderImpl",
172       "org.jboss.resteasy.core.interception.ClientResponseFilterRegistry",
173       "org.apache.xerces.impl.dtd.XMLEntityDecl",
174       "org.apache.xerces.xs.ItemPSVI",
175       "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
176       "org.apache.xerces.impl.dv.dtd.ENTITYDatatypeValidator",
177       "org.apache.xerces.xni.parser.XMLEntityResolver",
178       "org.jboss.resteasy.client.core.ClientErrorInterceptor",
179       "org.apache.xerces.impl.dtd.XMLNSDTDValidator",
180       "org.apache.xerces.impl.XMLDTDScannerImpl",
181       "org.apache.xerces.impl.dv.dtd.NMTOKENDatatypeValidator",
182       "org.apache.xerces.parsers.ObjectFactory",
183       "org.jboss.resteasy.spi.ResteasyProviderFactory$SortedKey",
184       "org.apache.xerces.xni.parser.XMLConfigurationException",
185       "org.apache.xerces.impl.XML11NSDocumentScannerImpl",
186       "org.apache.xerces.parsers.SAXParser",
187       "com.att.eelf.i18n.EELFResolvableErrorEnum",
188       "org.apache.xerces.impl.XMLEntityManager$RewindableInputStream",
189       "org.jboss.resteasy.core.interception.ContainerRequestFilterRegistry",
190       "org.jboss.resteasy.specimpl.VariantListBuilderImpl",
191       "org.apache.xerces.xni.parser.XMLInputSource",
192       "org.apache.xerces.xni.parser.XMLComponentManager",
193       "com.att.eelf.configuration.EELFLogger$Level",
194       "org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry$InterceptorFactory",
195       "org.apache.xerces.impl.io.UTF8Reader",
196       "org.apache.xerces.impl.dtd.XMLSimpleType",
197       "org.apache.xerces.impl.XML11DocumentScannerImpl",
198       "org.apache.xerces.util.AugmentationsImpl$AugmentationsItemsContainer",
199       "org.apache.xerces.util.XMLChar",
200       "org.apache.xerces.impl.XML11DTDScannerImpl",
201       "org.apache.xerces.impl.dtd.XMLElementDecl",
202       "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
203       "org.apache.xerces.xni.grammars.Grammar",
204       "org.apache.xerces.impl.dtd.models.ContentModelValidator",
205       "com.att.eelf.configuration.EELFLogger",
206       "org.apache.xerces.xni.grammars.XMLGrammarLoader",
207       "org.apache.xerces.xni.XMLDocumentHandler",
208       "org.apache.xerces.impl.io.UCSReader",
209       "org.apache.xerces.impl.XMLEntityManager$CharacterBuffer",
210       "org.apache.xerces.impl.validation.ValidationState",
211       "org.apache.xerces.impl.XMLEntityManager$Entity",
212       "org.jboss.resteasy.spi.HttpRequest",
213       "org.apache.xerces.util.XMLResourceIdentifierImpl",
214       "org.jboss.resteasy.logging.Logger",
215       "org.jboss.resteasy.spi.ConstructorInjector",
216       "org.apache.xerces.xni.NamespaceContext",
217       "org.apache.xerces.impl.dtd.XMLDTDLoader",
218       "org.jboss.resteasy.util.CaseInsensitiveMap",
219       "org.apache.xerces.util.XMLSymbols",
220       "org.apache.xerces.parsers.ObjectFactory$ConfigurationError",
221       "org.jboss.resteasy.core.interception.ContainerResponseFilterRegistry",
222       "org.apache.xerces.impl.io.ASCIIReader",
223       "org.jboss.resteasy.core.interception.InterceptorRegistry",
224       "org.apache.xerces.impl.dtd.XMLDTDProcessor",
225       "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
226       "org.apache.xerces.impl.XML11EntityScanner",
227       "org.apache.xerces.impl.dtd.DTDGrammar",
228       "org.apache.xerces.impl.dv.dtd.IDREFDatatypeValidator",
229       "com.att.eelf.configuration.SLF4jWrapper",
230       "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
231       "org.apache.xerces.impl.dtd.XMLContentSpec",
232       "org.openecomp.mso.logger.MsoLogger",
233       "org.apache.xerces.xs.AttributePSVI",
234       "org.apache.xerces.impl.dtd.DTDGrammarBucket",
235       "org.apache.xerces.impl.msg.XMLMessageFormatter",
236       "org.apache.xerces.xni.parser.XMLDocumentScanner",
237       "org.apache.xerces.impl.XMLVersionDetector",
238       "org.apache.xerces.impl.XMLDocumentScannerImpl",
239       "org.apache.xerces.xni.parser.XMLPullParserConfiguration",
240       "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Dispatcher",
241       "org.apache.xerces.impl.xs.XMLSchemaValidator",
242       "org.apache.xerces.xni.grammars.XMLDTDDescription",
243       "org.jboss.resteasy.logging.impl.Slf4jLogger",
244       "org.apache.xerces.xni.QName",
245       "org.apache.xerces.jaxp.TeeXMLDocumentFilterImpl",
246       "org.apache.xerces.util.XMLAttributesImpl",
247       "org.apache.xerces.impl.XMLEntityManager$InternalEntity",
248       "org.apache.xerces.impl.RevalidationHandler",
249       "org.jboss.resteasy.spi.HeaderValueProcessor",
250       "org.apache.xerces.util.AugmentationsImpl$LargeContainer",
251       "org.apache.xerces.impl.dtd.BalancedDTDGrammar",
252       "org.apache.xerces.xni.XMLDTDHandler",
253       "org.apache.xerces.impl.dtd.XML11DTDProcessor",
254       "org.apache.xerces.parsers.XML11Configuration",
255       "org.apache.xerces.impl.dtd.XMLDTDValidatorFilter",
256       "com.att.eelf.i18n.EELFResourceManager",
257       "org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate",
258       "org.jboss.resteasy.core.MediaTypeMap$Typed",
259       "org.openecomp.mso.logger.MessageEnum",
260       "org.openecomp.mso.logger.MsoLogger$ResponseCode",
261       "org.openecomp.mso.logger.MsoLogger$StatusCode",
262       "com.att.eelf.configuration.EELFManager",
263       "org.jboss.resteasy.spi.HttpResponse",
264       "org.apache.xerces.impl.validation.EntityState",
265       "org.apache.xerces.impl.XMLEntityManager$ExternalEntity",
266       "org.apache.xerces.util.ParserConfigurationSettings",
267       "org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError",
268       "com.att.eelf.i18n.EELFResourceManager$1",
269       "org.apache.xerces.impl.dtd.XML11DTDValidator"
270     );
271   } 
272
273   private static void resetClasses() {
274     org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoLoggingServletESTestscaffolding.class.getClassLoader());
275
276     org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
277       "com.att.eelf.i18n.EELFResourceManager",
278       "org.openecomp.mso.logger.MessageEnum",
279       "org.openecomp.mso.logger.MsoLogger$Catalog",
280       "org.openecomp.mso.logger.MsoLogger",
281       "com.att.eelf.i18n.EELFMsgs",
282       "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
283       "org.apache.xerces.jaxp.SAXParserFactoryImpl",
284       "org.apache.xerces.jaxp.SAXParserImpl",
285       "org.apache.xerces.parsers.XMLParser",
286       "org.apache.xerces.parsers.AbstractSAXParser",
287       "org.apache.xerces.parsers.SAXParser",
288       "org.apache.xerces.parsers.ObjectFactory",
289       "org.apache.xerces.util.ParserConfigurationSettings",
290       "org.apache.xerces.parsers.XML11Configuration",
291       "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
292       "org.apache.xerces.util.SymbolTable",
293       "org.apache.xerces.impl.XMLEntityManager",
294       "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
295       "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
296       "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
297       "org.apache.xerces.impl.XMLEntityScanner$1",
298       "org.apache.xerces.impl.XMLEntityScanner",
299       "org.apache.xerces.impl.XMLErrorReporter",
300       "org.apache.xerces.impl.XMLScanner",
301       "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
302       "org.apache.xerces.impl.XMLDocumentScannerImpl",
303       "org.apache.xerces.util.XMLStringBuffer",
304       "org.apache.xerces.util.XMLAttributesImpl",
305       "org.apache.xerces.impl.XMLDTDScannerImpl",
306       "org.apache.xerces.impl.dtd.XMLDTDProcessor",
307       "org.apache.xerces.impl.dtd.XMLDTDValidator",
308       "org.apache.xerces.impl.validation.ValidationState",
309       "org.apache.xerces.impl.dtd.XMLElementDecl",
310       "org.apache.xerces.impl.dtd.XMLSimpleType",
311       "org.apache.xerces.impl.dv.DTDDVFactory",
312       "org.apache.xerces.impl.dv.ObjectFactory",
313       "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
314       "org.apache.xerces.impl.XMLVersionDetector",
315       "org.apache.xerces.impl.msg.XMLMessageFormatter",
316       "org.apache.xerces.impl.io.UTF8Reader",
317       "org.apache.xerces.util.XMLSymbols",
318       "org.apache.xerces.xni.NamespaceContext",
319       "org.apache.xerces.util.XMLChar",
320       "org.apache.xerces.impl.Constants",
321       "com.att.eelf.configuration.EELFLogger$Level",
322       "com.att.eelf.configuration.EELFManager",
323       "org.jboss.resteasy.logging.Logger$LoggerType",
324       "org.jboss.resteasy.logging.Logger",
325       "org.jboss.resteasy.spi.ResteasyProviderFactory",
326       "org.jboss.resteasy.core.MediaTypeMap",
327       "org.jboss.resteasy.core.interception.LegacyPrecedence",
328       "org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate",
329       "org.jboss.resteasy.plugins.delegates.NewCookieHeaderDelegate",
330       "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
331       "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
332       "org.jboss.resteasy.util.CaseInsensitiveMap",
333       "org.jboss.resteasy.core.Headers",
334       "org.openecomp.mso.logger.MsoLoggingServlet"
335     );
336   }
337 }