ServletConfig config = newMock(ServletConfig.class);
checkOrder(config, false);
IApplicationSpecification as = new ApplicationSpecification();
ISpecificationParser parser = newMock(ISpecificationParser.class);
i.setParser(parser);
expect(config.getInitParameter(ApplicationSpecificationInitializer.APP_SPEC_PATH_PARAM)).andReturn(null);
expect(config.getServletContext()).andReturn(context);
expect(config.getServletName()).andReturn("Fred").anyTimes();
// begin testing finding spec
expect(log.isDebugEnabled()).andReturn(true);
Resource r = new ContextResource(context, "/WEB-INF/Fred/Fred.application");
log.debug("Checking for existence of " + r);
expect(context.getResource(r.getPath())).andReturn(null);
expect(log.isDebugEnabled()).andReturn(true);
r = new ContextResource(context, "/WEB-INF/Fred.application");
log.debug("Checking for existence of " + r);
expect(context.getResource(r.getPath())).andReturn(null);
expect(parser.parseApplicationSpecification(appSpecResource)).andReturn(as);
ApplicationGlobals ag = new ApplicationGlobalsImpl();
i.setGlobals(ag);