/**
* Setup the unit test framework by creating some classes ensuring that each
* test case starts off with a clean slate to work from
*/
private void privateSetUp() {
TestMarinerPageContext context = new TestMarinerPageContext();
TestMarinerRequestContext requestContext =
new TestMarinerRequestContext();
ContextInternals.setMarinerPageContext(requestContext, context);
context.pushRequestContext(requestContext);
DeviceLayoutContext deviceContext = new TestDeviceLayoutContext();
canvasLayout = new CanvasLayout();
// Activate the device layout.
RuntimeDeviceLayout runtimeDeviceLayout1 =
RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
RuntimeDeviceLayout runtimeDeviceLayout =
runtimeDeviceLayout1;
deviceContext.setDeviceLayout(runtimeDeviceLayout);
resetElement();
attribute = new StyleAttributes();
attribute.setStyles(StylesBuilder.getDeprecatedStyles());
attribute.setTitle("My title");
context.pushDeviceLayoutContext(deviceContext);
protocol.setMarinerPageContext(context);
int idx[] = {1, 0};
NDimensionalIndex index = new NDimensionalIndex(idx);
PaneInstance paneInstance = new PaneInstance(index);
paneInstance.setStyleClass("fred");
context.setFormatInstance(paneInstance);
context.setDeviceName(NETSCAPE4_DEVICE_NAME);
PageHead head = new PageHead();
testable.setPageHead(head);
}