IMarkupWriter writer = newWriter();
List parts = new ArrayList();
parts.add("comp1");
ResponseBuilder builder = new DojoAjaxResponseBuilder(cycle, writer, parts);
expect(comp.getClientId()).andReturn("comp");
expect(cycle.renderStackIterator()).andReturn(Collections.EMPTY_LIST.iterator());
expect(comp.getClientId()).andReturn("comp1");
expect(comp.getClientId()).andReturn("comp");
expect(cycle.renderStackIterator()).andReturn(Collections.EMPTY_LIST.iterator());
replay();
assertFalse(builder.isBodyScriptAllowed(comp));
assertTrue(builder.isExternalScriptAllowed(comp));
assertFalse(builder.isInitializationScriptAllowed(comp));
verify();
}