ProtocolBuilder builder = new ProtocolBuilder();
TestDOMProtocol protocol = (TestDOMProtocol) builder.build(
new TestProtocolRegistry.TestDOMProtocolFactory(),
internalDevice);
final TransFactory factory = getFactory();
// default is true for nested table support.
assertTrue("There should not be mapper if nested tables are supported",
factory.getMapper(protocol) == null);
protocol.setSupportsNestedTables(true);
assertTrue("There should not be mapper if nested tables are supported",
factory.getMapper(protocol) == null);
protocol.setSupportsNestedTables(false);
assertTrue("There should be a mapper if nested tables are not supported",
factory.getMapper(protocol) != null);
}