MockServletContext servletContext = new MockServletContext();
servletContext.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, "classpath:org/springmodules/web/tapestry/applicationContext.xml");
ContextLoader contextLoader = new ContextLoader();
contextLoader.initWebApplicationContext(servletContext);
MockServletConfig servletConfig = new MockServletConfig(servletContext, "servlet");
ApplicationServlet servlet = new ApplicationServlet();
servlet.init(servletConfig);
Registry hiveMindRegistry = (Registry) servletContext.getAttribute("org.apache.tapestry.Registry:servlet");
assertNotNull("HiveMind registry is not available in servlet context", hiveMindRegistry);