Initial OpenECOMP MSO commit
[so.git] / bpmn / MSORESTClient / src / test / java / org / openecomp / mso / rest / RESTClientESTestscaffolding.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:49:09 GMT 2016
5  */
6
7 package org.openecomp.mso.rest;
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 RESTClientESTestscaffolding {
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.rest.RESTClient"; 
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(RESTClientESTestscaffolding.class.getClassLoader() ,
72       "org.apache.http.client.methods.HttpPatch",
73       "org.apache.http.io.HttpMessageParserFactory",
74       "org.apache.http.impl.conn.DefaultHttpResponseParserFactory",
75       "org.apache.http.impl.execchain.RequestAbortedException",
76       "org.apache.http.impl.execchain.ProtocolExec",
77       "org.apache.http.config.Registry",
78       "org.apache.http.cookie.MalformedCookieException",
79       "org.apache.http.impl.conn.SystemDefaultDnsResolver",
80       "org.apache.http.client.protocol.RequestClientConnControl",
81       "org.apache.http.conn.ConnectionRequest",
82       "org.apache.http.impl.client.DefaultUserTokenHandler",
83       "org.apache.http.impl.conn.DefaultManagedHttpClientConnection",
84       "org.apache.http.conn.HttpClientConnectionManager",
85       "org.apache.http.client.protocol.RequestAcceptEncoding",
86       "org.apache.http.HttpException",
87       "org.apache.http.cookie.CookieSpec",
88       "org.apache.http.impl.cookie.RFC2965SpecFactory",
89       "org.apache.http.pool.AbstractConnPool$1",
90       "org.apache.http.conn.ssl.AllowAllHostnameVerifier",
91       "org.apache.http.client.CredentialsProvider",
92       "org.apache.http.client.ClientProtocolException",
93       "org.apache.http.pool.RouteSpecificPool",
94       "org.apache.http.client.methods.Configurable",
95       "org.apache.http.config.RegistryBuilder",
96       "org.apache.http.params.AbstractHttpParams",
97       "org.apache.http.io.HttpTransportMetrics",
98       "org.apache.http.conn.ssl.AbstractVerifier",
99       "org.openecomp.mso.rest.RESTConfig",
100       "org.apache.http.auth.Credentials",
101       "org.apache.http.io.HttpMessageParser",
102       "org.apache.http.client.methods.AbstractExecutionAwareRequest",
103       "org.apache.http.impl.BHttpConnectionBase",
104       "org.apache.http.HttpConnectionMetrics",
105       "org.apache.http.io.HttpMessageWriter",
106       "org.apache.http.HttpClientConnection",
107       "org.apache.http.conn.ConnectionPoolTimeoutException",
108       "org.apache.http.conn.routing.HttpRouteDirector",
109       "org.apache.http.pool.ConnPool",
110       "org.apache.http.protocol.HttpProcessor",
111       "org.apache.http.auth.AuthProtocolState",
112       "org.apache.http.client.RedirectStrategy",
113       "org.apache.http.impl.client.BasicCookieStore",
114       "org.apache.http.conn.routing.BasicRouteDirector",
115       "org.apache.http.protocol.HttpContext",
116       "org.apache.http.params.HttpParams",
117       "org.apache.http.client.NonRepeatableRequestException",
118       "org.apache.http.HttpResponse",
119       "org.apache.http.impl.client.AuthenticationStrategyImpl",
120       "org.apache.http.impl.client.HttpClientBuilder",
121       "org.apache.http.message.HeaderGroup",
122       "org.apache.http.impl.io.DefaultHttpRequestWriterFactory",
123       "org.apache.http.client.protocol.RequestAuthCache",
124       "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory",
125       "org.apache.http.impl.conn.DefaultSchemePortResolver",
126       "org.apache.http.config.MessageConstraints",
127       "org.apache.http.Header",
128       "org.apache.http.conn.HttpHostConnectException",
129       "org.apache.http.util.EntityUtils",
130       "org.apache.http.impl.NoConnectionReuseStrategy",
131       "org.apache.http.impl.client.BasicCredentialsProvider",
132       "org.apache.http.conn.ConnectionKeepAliveStrategy",
133       "org.apache.http.cookie.CookieSpecFactory",
134       "org.apache.http.conn.ssl.X509HostnameVerifier",
135       "org.apache.http.protocol.ChainBuilder",
136       "org.apache.http.impl.client.DefaultHttpRequestRetryHandler",
137       "org.apache.http.impl.conn.PoolingHttpClientConnectionManager",
138       "org.apache.http.impl.conn.DefaultProxyRoutePlanner",
139       "org.apache.http.impl.auth.KerberosSchemeFactory",
140       "org.apache.http.util.ByteArrayBuffer",
141       "org.apache.http.cookie.CookieOrigin",
142       "org.apache.http.client.methods.HttpRequestBase",
143       "org.apache.http.HttpEntity",
144       "org.apache.http.pool.PoolEntryCallback",
145       "org.apache.http.entity.StringEntity",
146       "org.apache.http.impl.DefaultConnectionReuseStrategy",
147       "org.apache.http.pool.ConnFactory",
148       "org.apache.http.client.methods.HttpGet",
149       "org.apache.http.protocol.BasicHttpContext",
150       "org.apache.commons.logging.impl.Jdk14Logger",
151       "org.apache.http.impl.execchain.ClientExecChain",
152       "org.apache.http.HttpVersion",
153       "org.apache.http.conn.SchemePortResolver",
154       "org.apache.http.message.BasicStatusLine",
155       "org.apache.http.conn.DnsResolver",
156       "org.apache.http.impl.client.TargetAuthenticationStrategy",
157       "org.apache.http.params.CoreProtocolPNames",
158       "org.apache.http.auth.AuthScheme",
159       "org.apache.http.message.AbstractHttpMessage",
160       "org.apache.http.auth.MalformedChallengeException",
161       "org.apache.http.HttpEntityEnclosingRequest",
162       "org.apache.http.entity.AbstractHttpEntity",
163       "org.apache.http.ReasonPhraseCatalog",
164       "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel",
165       "org.apache.http.client.UserTokenHandler",
166       "org.apache.http.impl.auth.DigestSchemeFactory",
167       "org.apache.http.impl.conn.HttpClientConnectionOperator",
168       "org.apache.http.HttpResponseFactory",
169       "org.apache.http.client.methods.HttpPut",
170       "org.openecomp.mso.rest.RESTClient",
171       "org.apache.http.ConnectionReuseStrategy",
172       "org.apache.http.client.protocol.RequestDefaultHeaders",
173       "org.apache.http.message.BasicHeader",
174       "org.apache.http.impl.conn.ConnectionShutdownException",
175       "org.apache.http.conn.ManagedHttpClientConnection",
176       "org.apache.http.client.protocol.ResponseContentEncoding",
177       "org.apache.http.message.BasicLineParser",
178       "org.apache.http.client.methods.HttpPost",
179       "org.apache.http.auth.AuthSchemeProvider",
180       "org.apache.http.config.SocketConfig",
181       "org.apache.http.util.Asserts",
182       "org.apache.http.client.config.RequestConfig",
183       "org.apache.http.StatusLine",
184       "org.apache.http.impl.DefaultBHttpClientConnection",
185       "org.apache.http.impl.DefaultHttpResponseFactory",
186       "org.apache.http.io.SessionOutputBuffer",
187       "org.apache.http.RequestLine",
188       "org.apache.http.conn.HttpConnectionFactory",
189       "org.apache.http.protocol.RequestContent",
190       "org.apache.http.cookie.CookieIdentityComparator",
191       "org.apache.http.config.Lookup",
192       "org.apache.http.HttpMessage",
193       "org.apache.http.impl.cookie.NetscapeDraftSpecFactory",
194       "org.apache.http.HttpRequestInterceptor",
195       "org.apache.http.HeaderElementIterator",
196       "org.apache.http.client.AuthCache",
197       "org.apache.http.pool.AbstractConnPool",
198       "org.apache.http.HeaderIterator",
199       "org.apache.http.conn.ClientConnectionManager",
200       "org.apache.http.HttpInetConnection",
201       "org.apache.http.entity.ContentType",
202       "org.apache.http.message.LineFormatter",
203       "org.apache.http.cookie.CookieSpecProvider",
204       "org.apache.http.HttpRequest",
205       "org.apache.http.pool.ConnPoolControl",
206       "org.openecomp.mso.rest.APIResponse",
207       "org.apache.http.client.BackoffManager",
208       "org.openecomp.mso.rest.HostNameVerifier",
209       "org.apache.http.client.AuthenticationStrategy",
210       "org.apache.http.conn.socket.ConnectionSocketFactory",
211       "org.apache.http.protocol.RequestTargetHost",
212       "org.apache.http.pool.PoolEntry",
213       "org.apache.http.message.BasicLineFormatter",
214       "org.apache.http.client.methods.HttpUriRequest",
215       "org.apache.http.protocol.HttpRequestExecutor",
216       "org.apache.http.client.methods.HttpRequestWrapper",
217       "org.apache.http.io.SessionInputBuffer",
218       "org.apache.http.impl.cookie.IgnoreSpecFactory",
219       "org.apache.http.impl.auth.HttpAuthenticator",
220       "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory",
221       "org.apache.http.conn.ConnectTimeoutException",
222       "org.apache.http.client.methods.AbortableHttpRequest",
223       "org.apache.http.client.HttpClient",
224       "org.apache.http.auth.AuthSchemeFactory",
225       "org.apache.http.cookie.Cookie",
226       "org.apache.http.protocol.ImmutableHttpProcessor",
227       "org.apache.http.impl.auth.SPNegoSchemeFactory",
228       "org.apache.http.protocol.HTTP",
229       "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$ConfigData",
230       "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody",
231       "org.apache.http.TokenIterator",
232       "org.openecomp.mso.rest.HttpHeader",
233       "org.apache.http.client.methods.HttpRequestWrapper$HttpEntityEnclosingRequestWrapper",
234       "org.apache.http.protocol.HttpCoreContext",
235       "org.apache.http.impl.conn.CPool",
236       "org.apache.http.impl.auth.NTLMSchemeFactory",
237       "org.apache.http.client.utils.URIUtils",
238       "org.apache.http.ProtocolVersion",
239       "org.apache.http.client.protocol.RequestExpectContinue",
240       "org.apache.http.util.VersionInfo",
241       "org.apache.http.impl.cookie.RFC2109SpecFactory",
242       "org.apache.http.entity.InputStreamEntity",
243       "org.apache.http.HttpHost",
244       "org.apache.http.conn.UnsupportedSchemeException",
245       "org.apache.http.ProtocolException",
246       "org.apache.http.impl.cookie.BrowserCompatSpecFactory",
247       "org.apache.http.client.methods.HttpEntityEnclosingRequestBase",
248       "org.apache.http.params.BasicHttpParams",
249       "org.apache.http.client.protocol.HttpClientContext",
250       "org.apache.http.impl.client.ProxyAuthenticationStrategy",
251       "org.apache.http.conn.ssl.StrictHostnameVerifier",
252       "org.apache.http.io.HttpMessageWriterFactory",
253       "org.apache.http.concurrent.Cancellable",
254       "org.apache.http.impl.execchain.MainClientExec",
255       "org.apache.http.protocol.HttpProcessorBuilder",
256       "org.apache.http.entity.ContentLengthStrategy",
257       "org.apache.http.impl.execchain.TunnelRefusedException",
258       "org.apache.http.conn.routing.HttpRoutePlanner",
259       "org.apache.http.Consts",
260       "org.apache.http.conn.ssl.SSLConnectionSocketFactory",
261       "org.apache.http.message.LineParser",
262       "org.apache.http.impl.cookie.BestMatchSpecFactory",
263       "org.apache.http.params.HttpParamsNames",
264       "org.apache.http.conn.ssl.SSLInitializationException",
265       "org.openecomp.mso.rest.RESTException",
266       "org.apache.http.util.Args",
267       "org.apache.http.params.HttpProtocolParams",
268       "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy",
269       "org.apache.http.protocol.RequestUserAgent",
270       "org.apache.http.config.ConnectionConfig",
271       "org.apache.http.conn.socket.LayeredConnectionSocketFactory",
272       "org.apache.http.conn.ssl.BrowserCompatHostnameVerifier",
273       "org.apache.http.util.TextUtils",
274       "org.apache.http.HttpResponseInterceptor",
275       "org.apache.http.impl.EnglishReasonPhraseCatalog",
276       "org.apache.http.client.config.RequestConfig$Builder",
277       "org.apache.http.auth.AuthenticationException",
278       "org.apache.http.auth.AuthState",
279       "org.apache.http.client.protocol.RequestAddCookies",
280       "org.apache.http.impl.conn.DefaultRoutePlanner",
281       "org.apache.http.conn.routing.HttpRoute",
282       "org.apache.http.impl.conn.CPoolEntry",
283       "org.apache.http.client.CookieStore",
284       "org.apache.http.impl.auth.BasicSchemeFactory",
285       "org.apache.http.conn.socket.PlainConnectionSocketFactory",
286       "org.apache.http.client.HttpRequestRetryHandler",
287       "org.apache.http.ParseException",
288       "org.apache.http.impl.client.CloseableHttpClient",
289       "org.apache.http.client.protocol.ResponseProcessCookies",
290       "org.apache.http.message.BasicRequestLine",
291       "org.apache.http.client.ServiceUnavailableRetryStrategy",
292       "org.apache.http.client.methods.HttpExecutionAware",
293       "org.apache.http.impl.client.InternalHttpClient",
294       "org.apache.http.HeaderElement",
295       "org.apache.http.client.ConnectionBackoffStrategy",
296       "org.apache.http.util.CharArrayBuffer",
297       "org.apache.http.impl.execchain.RetryExec",
298       "org.apache.http.conn.routing.RouteInfo",
299       "org.apache.http.client.ResponseHandler",
300       "org.apache.http.HttpConnection",
301       "org.apache.http.message.ParserCursor"
302     );
303   } 
304
305   private static void resetClasses() {
306     org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTClientESTestscaffolding.class.getClassLoader());
307
308     org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
309       "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody",
310       "org.apache.http.conn.socket.PlainConnectionSocketFactory",
311       "org.apache.http.conn.ssl.AbstractVerifier",
312       "org.apache.commons.logging.impl.Jdk14Logger",
313       "org.apache.http.conn.ssl.SSLConnectionSocketFactory",
314       "org.apache.http.impl.conn.CPool",
315       "org.apache.http.message.BasicLineFormatter",
316       "org.apache.http.impl.io.DefaultHttpRequestWriterFactory",
317       "org.apache.http.ProtocolVersion",
318       "org.apache.http.HttpVersion",
319       "org.apache.http.message.BasicLineParser",
320       "org.apache.http.impl.EnglishReasonPhraseCatalog",
321       "org.apache.http.impl.DefaultHttpResponseFactory",
322       "org.apache.http.impl.conn.DefaultHttpResponseParserFactory",
323       "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory",
324       "org.apache.http.impl.conn.HttpClientConnectionOperator",
325       "org.apache.http.impl.conn.DefaultSchemePortResolver",
326       "org.apache.http.impl.conn.SystemDefaultDnsResolver",
327       "org.apache.http.util.VersionInfo",
328       "org.apache.http.impl.client.HttpClientBuilder",
329       "org.apache.http.protocol.HttpRequestExecutor",
330       "org.apache.http.impl.DefaultConnectionReuseStrategy",
331       "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy",
332       "org.apache.http.impl.client.AuthenticationStrategyImpl",
333       "org.apache.http.impl.client.TargetAuthenticationStrategy",
334       "org.apache.http.impl.client.ProxyAuthenticationStrategy",
335       "org.apache.http.impl.client.DefaultUserTokenHandler",
336       "org.apache.http.client.protocol.RequestClientConnControl",
337       "org.apache.http.client.protocol.ResponseContentEncoding",
338       "org.apache.http.impl.client.DefaultHttpRequestRetryHandler",
339       "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel",
340       "org.apache.http.impl.client.BasicCookieStore",
341       "org.apache.http.cookie.CookieIdentityComparator",
342       "org.apache.http.client.config.RequestConfig",
343       "org.apache.http.client.methods.HttpPut",
344       "org.apache.http.message.HeaderGroup",
345       "org.apache.http.message.BasicHeader",
346       "org.apache.http.entity.AbstractHttpEntity",
347       "org.apache.http.Consts",
348       "org.apache.http.entity.ContentType",
349       "org.apache.http.util.CharArrayBuffer",
350       "org.apache.http.params.BasicHttpParams",
351       "org.apache.http.message.BasicRequestLine",
352       "org.apache.http.protocol.HttpCoreContext",
353       "org.apache.http.client.protocol.HttpClientContext",
354       "org.apache.http.auth.AuthProtocolState",
355       "org.apache.http.client.methods.HttpPost",
356       "org.apache.http.HttpHost",
357       "org.apache.http.client.methods.HttpGet",
358       "org.apache.http.client.methods.HttpPatch",
359       "org.openecomp.mso.rest.RESTException",
360       "org.apache.http.client.ClientProtocolException",
361       "org.apache.http.protocol.HTTP",
362       "org.apache.http.message.BasicStatusLine",
363       "org.apache.http.util.ByteArrayBuffer"
364     );
365   }
366 }