getComponentManager().getInstance(XWikiStubContextProvider.class);
stubContextProvider.initialize(this.context);
ServletEnvironment environment = getComponentManager().getInstance(Environment.class);
Mock mockServletContext = mock(ServletContext.class);
environment.setServletContext((ServletContext) mockServletContext.proxy());
<BUG>mockServletContext.stubs().method("getResourceAsStream").with(eq("/WEB-INF/cache/infinispan/config.xml"))
.will(returnValue(null));
mockServletContext.stubs().method("getAttribute").with(eq("javax.servlet.context.tempdir"))</BUG>
.will(returnValue(new File(System.getProperty("java.io.tmpdir"))));
<BUG>mockServletContext.stubs().method("getResourceAsStream").with(eq("/WEB-INF/xwiki.cfg"))
.will(returnValue(null));</BUG>
Mock mockCoreConfiguration = registerMockComponent(CoreConfiguration.class);

getComponentManager().getInstance(XWikiStubContextProvider.class);
stubContextProvider.initialize(this.context);
ServletEnvironment environment = getComponentManager().getInstance(Environment.class);
Mock mockServletContext = mock(ServletContext.class);
environment.setServletContext((ServletContext) mockServletContext.proxy());
mockServletContext.stubs().method("getResourceAsStream").will(returnValue(null));
mockServletContext.stubs().method("getResource").will(returnValue(null));
mockServletContext.stubs().method("getAttribute").with(eq("javax.servlet.context.tempdir"))
.will(returnValue(new File(System.getProperty("java.io.tmpdir"))));
Mock mockCoreConfiguration = registerMockComponent(CoreConfiguration.class);
