public OutputBuffer getOutputBuffer(String name, boolean create) {
return buffer;
}
});
assertNull(protocol.initialFocusElement);
CanvasAttributes canvasAttributes = new CanvasAttributes();
canvasAttributes.setStyles(StylesBuilder.getInitialValueStyles());
protocol.openCard(buffer, canvasAttributes);
assertNotNull(protocol.initialFocusElement);
Element element = buffer.popElement();
assertEquals("card", element.getName());
assertNull(element.getAttributeValue("id"));
canvasAttributes.setId("idValue");
protocol.openCard(buffer, canvasAttributes);
element = buffer.popElement();
assertEquals("card", element.getName());
assertEquals("idValue", element.getAttributeValue("id"));
}