//
// Having the test loaded via a loader above the tccl emulates the situation
// where a web.xml file specifies ServletContextCleaner as a listener, and
// that class is deployed via a shared classloader.
PathableClassLoader parent = new PathableClassLoader(null);
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
parent.addLogicalLib("commons-logging");
parent.addLogicalLib("servlet-api");
PathableClassLoader child = new PathableClassLoader(parent);
child.setParentFirst(false);
child.addLogicalLib("commons-logging");
child.addLogicalLib("testclasses");
PathableClassLoader tccl = new PathableClassLoader(child);
tccl.setParentFirst(false);
tccl.addLogicalLib("commons-logging");
Class testClass = child.loadClass(BasicServletTestCase.class.getName());
return new PathableTestSuite(testClass, tccl);
}