2 * Scaffolding file used to store all the setups needed to run
3 * tests automatically generated by EvoSuite
4 * Mon Nov 14 13:48:27 GMT 2016
7 package com.att.camunda.bpm.plugin.urnmap.resources;
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;
17 public class URNMapPluginRootResourceESTestscaffolding {
20 public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
22 private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
24 private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
27 public static void initEvoSuiteFramework() {
28 org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource";
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();
37 org.evosuite.runtime.Runtime.getInstance().resetRuntime();
41 public static void clearEvoSuiteFramework(){
42 Sandbox.resetDefaultSecurityManager();
43 java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
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();
53 org.evosuite.runtime.GuiSupport.setHeadless();
54 org.evosuite.runtime.Runtime.getInstance().resetRuntime();
55 org.evosuite.runtime.agent.InstrumentingAgent.activate();
59 public void doneWithTestCase(){
60 threadStopper.killAndJoinClientThreads();
61 org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
62 org.evosuite.runtime.classhandling.JDKClassResetter.reset();
64 org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
65 org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
66 org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
70 private static void initializeClasses() {
71 org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() ,
72 "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
73 "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
74 "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
75 "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
76 "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
77 "org.openecomp.mso.logger.MsoLogger$ErrorCode",
78 "org.camunda.bpm.cockpit.Cockpit",
79 "com.att.eelf.configuration.EELFLogger",
80 "org.camunda.bpm.engine.rest.exception.RestException",
81 "com.att.eelf.configuration.SLF4jWrapper",
82 "com.att.eelf.i18n.EELFResourceManager",
83 "com.att.camunda.bpm.plugin.urnmap.db.URNData",
84 "org.openecomp.mso.logger.MsoLogger",
85 "org.openecomp.mso.logger.MessageEnum",
86 "com.att.eelf.i18n.EELFResolvableErrorEnum",
87 "org.openecomp.mso.logger.MsoLogger$ResponseCode",
88 "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
89 "org.openecomp.mso.entity.MsoRequest",
90 "org.camunda.bpm.webapp.AppRuntimeDelegate",
91 "org.openecomp.mso.logger.MsoLogger$StatusCode",
92 "com.att.eelf.configuration.EELFManager",
93 "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource",
94 "com.att.eelf.i18n.EELFMsgs",
95 "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
96 "com.att.eelf.configuration.EELFLogger$Level",
97 "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
98 "org.openecomp.mso.logger.MsoLogger$Catalog"
102 private static void resetClasses() {
103 org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader());
105 org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
106 "org.camunda.bpm.cockpit.Cockpit",
107 "org.openecomp.mso.logger.MsoLogger$Catalog",
108 "org.openecomp.mso.logger.MsoLogger",
109 "com.att.eelf.i18n.EELFResourceManager",
110 "com.att.eelf.i18n.EELFMsgs",
111 "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
112 "com.att.eelf.configuration.EELFLogger$Level",
113 "com.att.eelf.configuration.EELFManager",
114 "org.openecomp.mso.logger.MessageEnum",
115 "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
116 "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource"