}
public void testTypeLevelParameterDispatchingController() throws Exception {
DispatcherPortlet portlet = new DispatcherPortlet() {
protected ApplicationContext createPortletApplicationContext(ApplicationContext parent) throws BeansException {
StaticPortletApplicationContext wac = new StaticPortletApplicationContext();
wac.setPortletContext(new MockPortletContext());
RootBeanDefinition bd = new RootBeanDefinition(MyTypeLevelParameterDispatchingController.class);
bd.setScope(WebApplicationContext.SCOPE_REQUEST);
wac.registerBeanDefinition("controller", bd);
RootBeanDefinition bd2 = new RootBeanDefinition(MySpecialParameterDispatchingController.class);
bd2.setScope(WebApplicationContext.SCOPE_REQUEST);
wac.registerBeanDefinition("controller2", bd2);
RootBeanDefinition bd3 = new RootBeanDefinition(MyOtherSpecialParameterDispatchingController.class);
bd3.setScope(WebApplicationContext.SCOPE_REQUEST);
wac.registerBeanDefinition("controller3", bd3);
RootBeanDefinition bd4 = new RootBeanDefinition(MyParameterDispatchingController.class);
bd4.setScope(WebApplicationContext.SCOPE_REQUEST);
wac.registerBeanDefinition("controller4", bd4);
AnnotationConfigUtils.registerAnnotationConfigProcessors(wac);
wac.refresh();
return wac;
}
};
portlet.init(new MockPortletConfig());