* Tests the {@link AbstractAddProcessRule#endElement} method
* @throws Exception if an error occurs
*/
public void testEndElement() throws Exception {
// retrieve the pipeline
XMLPipeline pipeline = dynamicProcess.getPipeline();
// create an expanded name
ExpandedName eName = new ImmutableExpandedName("testNamespace",
"testLocalName");
// ask the rule to create a process
XMLProcess process = rule.createProcess(dynamicProcess,
eName,
createStartElementAttributes());
// add a process to the head of the pipeline
pipeline.addHeadProcess(process);
// call end element on the rule
rule.endElement(dynamicProcess, eName, process);
// ensure that the process was removed from the pipeline
assertNotSame("endElement did not remove the process from " +
"the pipeline",
process,
pipeline.getHeadProcess());
}