[MSO-8] Update the maven dependency
[so.git] / bpmn / MSORESTClient / src / test / java / org / openecomp / mso / rest / HttpHeaderESTestscaffolding.java
1 /**
2  * Scaffolding file used to store all the setups needed to run 
3  * tests automatically generated by EvoSuite
4  * Mon Nov 14 11:47:07 GMT 2016
5  */
6
7 /*- 
8  * ============LICENSE_START======================================================= 
9  * OPENECOMP - MSO 
10  * ================================================================================ 
11  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
12  * ================================================================================ 
13  * Licensed under the Apache License, Version 2.0 (the "License"); 
14  * you may not use this file except in compliance with the License. 
15  * You may obtain a copy of the License at 
16  * 
17  *      http://www.apache.org/licenses/LICENSE-2.0 
18  * 
19  * Unless required by applicable law or agreed to in writing, software 
20  * distributed under the License is distributed on an "AS IS" BASIS, 
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
22  * See the License for the specific language governing permissions and 
23  * limitations under the License. 
24  * ============LICENSE_END========================================================= 
25  */ 
26
27 package org.openecomp.mso.rest;
28
29 import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
30 import org.junit.BeforeClass;
31 import org.junit.Before;
32 import org.junit.After;
33 import org.junit.AfterClass;
34 import org.evosuite.runtime.sandbox.Sandbox;
35
36 @EvoSuiteClassExclude
37 public class HttpHeaderESTestscaffolding {
38
39   @org.junit.Rule 
40   public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
41
42   private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
43
44   private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
45
46   @BeforeClass 
47   public static void initEvoSuiteFramework() { 
48     org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.HttpHeader"; 
49     org.evosuite.runtime.GuiSupport.initialize(); 
50     org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
51     org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
52     org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
53     org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
54     org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
55     org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
56     initializeClasses();
57     org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
58   } 
59
60   @AfterClass 
61   public static void clearEvoSuiteFramework(){ 
62     Sandbox.resetDefaultSecurityManager(); 
63     java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
64   } 
65
66   @Before 
67   public void initTestCase(){ 
68     threadStopper.storeCurrentThreads();
69     threadStopper.startRecordingTime();
70     org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
71     org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
72      
73     org.evosuite.runtime.GuiSupport.setHeadless(); 
74     org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
75     org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
76   } 
77
78   @After 
79   public void doneWithTestCase(){ 
80     threadStopper.killAndJoinClientThreads();
81     org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
82     org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
83     resetClasses(); 
84     org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
85     org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
86     org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
87   } 
88
89
90   private static void initializeClasses() {
91     org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HttpHeaderESTestscaffolding.class.getClassLoader() ,
92       "org.openecomp.mso.rest.HttpHeader"
93     );
94   } 
95
96   private static void resetClasses() {
97   }
98 }