IComponent comp1 = newMock(IComponent.class);
IRequestCycle cycle = newMock(IRequestCycle.class);
IMarkupWriter writer = newMock(IMarkupWriter.class);
NestedMarkupWriter nested = newMock(NestedMarkupWriter.class);
Infrastructure infra = newMock(Infrastructure.class);
List parts = new ArrayList();
parts.add("id1");
DojoAjaxResponseBuilder builder = new DojoAjaxResponseBuilder(cycle, writer, parts);
render.render(NullWriter.getSharedInstance(), cycle);
expect(comp1.getClientId()).andReturn("id1").anyTimes();
expect(comp1.peekClientId()).andReturn("id1").anyTimes();
expect(cycle.getInfrastructure()).andReturn(infra);
expect(infra.getOutputEncoding()).andReturn("UTF-8");
writer.printRaw("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
writer.printRaw("<!DOCTYPE html "
+ "PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\" [" + NEWLINE