{
public void testOnClasspath() throws Exception
{
DefaultClassResolver cr = new DefaultClassResolver();
Resource appSpecResource = new ClasspathResource(cr, "/foo/OnClasspath.application");
ApplicationSpecificationInitializer i = new ApplicationSpecificationInitializer();
Log log = (Log) newMock(Log.class);
i.setLog(log);
ClasspathResourceFactoryImpl cf = new ClasspathResourceFactoryImpl();
cf.setClassResolver(cr);
i.setClasspathResourceFactory(cf);
HttpServlet servlet = new ServletFixture();
MockControl configControl = newControl(ServletConfig.class);
ServletConfig config = (ServletConfig) configControl.getMock();
trainForServletInit(configControl, config);
config.getInitParameter(ApplicationSpecificationInitializer.APP_SPEC_PATH_PARAM);
configControl.setReturnValue(appSpecResource.getPath());
IApplicationSpecification as = new ApplicationSpecification();
MockControl parserControl = newControl(ISpecificationParser.class);
ISpecificationParser parser = (ISpecificationParser) parserControl.getMock();