public void test_Write_Body_Script()
{
MarkupFilter filter = new UTFMarkupFilter();
PrintWriter writer = newPrintWriter();
IRequestCycle cycle = newMock(IRequestCycle.class);
Infrastructure inf = newMock(Infrastructure.class);
replay();
IMarkupWriter mw = new MarkupWriterImpl("text/html", writer, filter);
DojoAjaxResponseBuilder builder = new DojoAjaxResponseBuilder(cycle, mw, null);
String bscript = "var e=4;";
String imageInit = "image initializations";
String preload = "preloadedvarname";
verify();
expect(cycle.getInfrastructure()).andReturn(inf);
expect(inf.getOutputEncoding()).andReturn("UTF-8");
replay();
builder.beginResponse();
builder.beginBodyScript(mw, cycle);