private void trainForConstructor(IPage page, IComponent component, ClassResolver resolver,
ClassFinder classFinder)
{
IRequestCycle cycle = newCycle();
Infrastructure infrastructure = (Infrastructure) newMock(Infrastructure.class);
INamespace namespace = (INamespace) newMock(INamespace.class);
trainGetPage(component, page);
page.getRequestCycle();
getControl(page).setReturnValue(cycle);
cycle.getInfrastructure();
getControl(cycle).setReturnValue(infrastructure);
infrastructure.getClassResolver();
getControl(infrastructure).setReturnValue(resolver);
component.getNamespace();
getControl(component).setReturnValue(namespace);
namespace.getPropertyValue("org.apache.tapestry.bean-class-packages");
getControl(namespace).setReturnValue("mypackage");
infrastructure.getClassFinder();
getControl(infrastructure).setReturnValue(classFinder);
}