public void testDeletion() throws Exception {
InputStream input = DeletionTransformerTest.class.getResource(
"/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
DeletionTransformer deleter = new DeletionTransformer("anyelement", atts);
pipe.addComponent(deleter);