Page page = new MockPageImpl(site);
Pagelet pagelet = null;
for (Module m : site.getModules()) {
if (m.getRenderers().length > 0) {
PageletRenderer r = m.getRenderers()[0];
PageletURI pageletURI = new PageletURIImpl(page.getURI(), PageTemplate.DEFAULT_STAGE, 0);
pagelet = new PageletImpl(pageletURI, m.getIdentifier(), r.getIdentifier());
}
}
// Collect all renderers from modules and ask for precompilation