private ConfigurablePortletApplicationContext initApplicationContext(String scope) {
MockServletContext sc = new MockServletContext();
GenericWebApplicationContext rac = new GenericWebApplicationContext(sc);
rac.refresh();
PortletContext pc = new ServletWrappingPortletContext(sc);
StaticPortletApplicationContext ac = new StaticPortletApplicationContext();
ac.setParent(rac);
ac.setPortletContext(pc);
GenericBeanDefinition bd = new GenericBeanDefinition();
bd.setBeanClass(DerivedTestBean.class);