protected void setup() {
   orgIntegrityChecker = getSession().getIntegrityChecker();
   getSession().setIntegrityChecker(new IntegrityChecker()); // moved into setup
   getSession().getIntegrityChecker().dontCatchExceptions(); // moved into setup
   orgSecurityManager = System.getSecurityManager(); // security java.policy must allow full access
   System.setSecurityManager(new TestSecurityManager());
   orgDefaultUseDoPrivilegedValue = getOrgDefaultUseDoPrivilegedValue();
   PrivilegedAccessHelper.setDefaultUseDoPrivilegedValue(true);
   descriptor = new RelationalDescriptor();
   descriptor.setJavaClass(getTestClass());
 }
 public void reset() {
   getSession()
       .setIntegrityChecker(orgIntegrityChecker); // security java.policy must allow full access
   System.setSecurityManager(orgSecurityManager);
   PrivilegedAccessHelper.setDefaultUseDoPrivilegedValue(orgDefaultUseDoPrivilegedValue);
 }