Subject subject = SubjectProvider
.getSubject("transport.KerberosClient");
String wrappedTest = sysConfig
.getStringConfigVal("jeri.transport.wrappedTest",null);
Class c = Class.forName(wrappedTest);
final Test test = (Test) c.newInstance();
test.setup(sysConfig);
Subject.doAs(subject,
new PrivilegedExceptionAction(){
public Object run() throws Exception {
test.run();
return null;
}
});
test.tearDown();
}