public void test_Context_Spec_Resource()
{
IComponent comp = newMock(IComponent.class);
checkOrder(comp, false);
WebContext context = newMock(WebContext.class);
IRequestCycle cycle = newMock(IRequestCycle.class);
IComponentSpecification spec = new ComponentSpecification();
WebContextResource base = new WebContextResource(context, "/WEB-INF/MyComponent.jwc");
spec.setSpecificationLocation(base);
ComponentResourceResolverImpl resolver = new ComponentResourceResolverImpl();
expect(comp.getSpecification()).andReturn(spec).anyTimes();
expect(context.getResource("/WEB-INF/MyComponent.html")).andReturn(newURL());
replay();
Resource resolved = resolver.findComponentResource(comp, cycle, null, ".html", null);
assert resolved != null;