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();
setReturnValue(page, cycle);
cycle.getInfrastructure();
setReturnValue(cycle, infrastructure);
infrastructure.getClassResolver();
setReturnValue(infrastructure, resolver);
component.getNamespace();
setReturnValue(component, namespace);
namespace.getPropertyValue("org.apache.tapestry.bean-class-packages");
setReturnValue(namespace, "mypackage");
infrastructure.getClassFinder();
setReturnValue(infrastructure, classFinder);
}