* @throws ProtocolException
*/
public void testImageValid() throws ProtocolException {
// Set up the protocol and dependent objects.
privateSetUp();
DOMOutputBuffer buffer = new DOMOutputBuffer();
buffer.initialise();
// Initialise our protocol attributes with an id attribute.
ImageAttributes attributes = new ImageAttributes();
attributes.setStyles(StylesBuilder.getInitialValueStyles());
attributes.setLocalSrc(true);
attributes.setSrc("myImage.jpg");
attributes.setAltText("Alternate Text");
protocol.doImage(buffer, attributes);
// valid src and alt generates <img src="url" alt="text" />
Element root = buffer.getCurrentElement();
Element element = (Element) root.getHead();
DOMAssertionUtilities.assertElement("img", element);
DOMAssertionUtilities.assertAttributeEquals("localsrc","myImage.jpg",element);
DOMAssertionUtilities.assertAttributeEquals("alt","Alternate Text",element);