private Component setupForIntegrationTest(InternalComponentResources resources, Logger logger,
String componentClassName, MutableComponentModel model,
BindingSource source, Runnable phaseTwoTraining) throws Exception
{
ClassFactoryClassPool pool = new ClassFactoryClassPool(contextClassLoader);
Loader loader = new TestPackageAwareLoader(contextClassLoader, pool);
pool.appendClassPath(new LoaderClassPath(loader));
ClassFactory cf = new ClassFactoryImpl(loader, pool, logger);
CtClass ctClass = pool.get(componentClassName);
replay();
InternalClassTransformation transformation = new InternalClassTransformationImpl(cf, ctClass, null, model,
null);