public void setUp() {
config = EasyMock.createMock(ContainerConfig.class);
factory = EasyMock.createMock(ContentRewriterFeature.Factory.class);
featureConfig = EasyMock.createMock(ContentRewriterFeature.Config.class);
ProxyUriManager proxyUriManager = new DefaultProxyUriManager(config, null);
rewriter = new ImageResizeRewriter(proxyUriManager, factory);
domImpl = new ParseModule.DOMImplementationProvider();
parser = new CajaHtmlParser(domImpl.get());
EasyMock.expect(factory.get(EasyMock.isA(HttpRequest.class))).andReturn(featureConfig).anyTimes();
EasyMock.expect(factory.get(EasyMock.isA(GadgetSpec.class))).andReturn(featureConfig).anyTimes();