class IntegratorOutputNode extends VolatileXMLFilterImpl implements IdQueryable {

    public StatefulXMLFilter addDescendent(String path, XMLReader source, boolean requireForWrite) {
        String[] pe = path.substring(1).split("/");
        LinkedList<String> pathElements = new LinkedList<String>(Arrays.asList(pe));
        return addDescendent(pathElements, source, requireForWrite);
    }

}

class IntegratorOutputNodeTest {

    private static final ClassLoader cl;

    @Test
    public void testIntegrate5() throws TransformerConfigurationException, TransformerException, ParserConfigurationException, SAXException, IOException {

        String testId = "testIntegrate5";
        System.out.println("running test: "+testId);
        IntegratorOutputNode root = new IntegratorOutputNode();
        root.addDescendent("/record/marc", new PreConfiguredXMLReader(new InputSource(cl.getResourceAsStream("input/marc.xml"))), false);
        root.addDescendent("/record/marcEmpty", new PreConfiguredXMLReader(new InputSource(cl.getResourceAsStream("input/marcEmpty.xml"))), true);
        verify(root, testId.concat(".xml"), true);
    }

}