private TransformingVisitor createVisitor() {
InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();
ProtocolBuilder builder = new ProtocolBuilder();
TestDOMProtocol protocol = (TestDOMProtocol) builder.build(
new TestProtocolRegistry.TestDOMProtocolFactory(),
internalDevice);
TestMarinerPageContext context = new TestMarinerPageContext();
context.setDevicePolicyValue(DevicePolicyConstants.FIX_FOR_OPEN_INLINE_STYLING_ELEMENTS,
DevicePolicyConstants.WHITESPACE_INSIDE);
context.setDevicePolicyValue(DevicePolicyConstants.FIX_FOR_CLOSING_INLINE_STYLING_ELEMENTS,
DevicePolicyConstants.WHITESPACE_INSIDE);
context.setDevicePolicyValue(DevicePolicyConstants.FIX_FOR_OPEN_ANCHOR_ELEMENT,
DevicePolicyConstants.WHITESPACE_INSIDE_AND_OUTSIDE);
context.setDevicePolicyValue(DevicePolicyConstants.FIX_FOR_CLOSING_ANCHOR_ELEMENT,
DevicePolicyConstants.NON_BREAKING_SPACE_OUTSIDE);
protocol.setMarinerPageContext(context);
Set inlineStyleElements = new HashSet();
inlineStyleElements.add("strong");
inlineStyleElements.add("i");
Set inlineLinkElements = new HashSet();
inlineLinkElements.add("a");