}
public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
T impl, Map<String,String> params, Module... modules) {
Injector injector = createMockInjector(api, impl, modules);
View view = injector.getInstance(page);
if(params != null) {
for(Map.Entry<String, String> entry: params.entrySet()) {
view.set(entry.getKey(), entry.getValue());
}
}
view.render();
flushOutput(injector);
return injector;
}