public void test_one_writer_per_element() throws IOException, SAXException {
Smooks smooks = new Smooks(getClass().getResourceAsStream("OnWriterPerElementTest.xml"));
try {
smooks.filterSource(smooks.createExecutionContext(), new StringSource("<a/>"), null);
fail("Expected SAXWriterAccessException");
} catch(SmooksException e) {
assertEquals("Illegal access to the element writer for element 'a' by SAX visitor 'org.milyn.delivery.sax.SAXVisitorWriter02'. Writer already acquired by SAX visitor 'org.milyn.delivery.sax.SAXVisitorWriter01'. See SAXElement javadocs (http://milyn.codehaus.org/Smooks). Change Smooks visitor resource configuration.", e.getCause().getMessage());
}
}