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);
InternalClassTransformation transformation = new InternalClassTransformationImpl(ctClass, cf, logger, null);
replay();
new ParameterWorker(source).transform(transformation, model);