servletContext.setAttribute(eq(WebConstants.IMPALA_FACTORY_ATTRIBUTE), isA(ModuleManagementFacade.class));
servletContext.setAttribute(eq(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE), isA(SingleStringModuleDefinitionSource.class));
replay(servletContext);
WebXmlBasedContextLoader loader = new WebXmlBasedContextLoader(){
@Override
public String[] getBootstrapContextLocations(ServletContext servletContext) {
String[] locations = new String[] {
"META-INF/impala-bootstrap.xml",
"META-INF/impala-web-bootstrap.xml",
"META-INF/impala-web-listener-bootstrap.xml"};
return locations;
}
};
WebApplicationContext context = loader.createWebApplicationContext(servletContext, null);
assertNotNull(context);
assertTrue(context instanceof GenericWebApplicationContext);
verify(servletContext);
}