registerSingleton("myPortlet", MyPortlet.class);
registerSingleton("portletMultipartResolver", MockMultipartResolver.class);
registerSingleton("portletPostProcessor", SimplePortletPostProcessor.class);
registerSingleton("testListener", TestApplicationListener.class);
ConstructorArgumentValues cvs = new ConstructorArgumentValues();
cvs.addIndexedArgumentValue(0, new MockPortletContext());
cvs.addIndexedArgumentValue(1, "complex");
registerBeanDefinition("portletConfig", new RootBeanDefinition(MockPortletConfig.class, cvs, null));
UserRoleAuthorizationInterceptor userRoleInterceptor = new UserRoleAuthorizationInterceptor();
userRoleInterceptor.setAuthorizedRoles(new String[] {"role1", "role2"});