@Test
public void testProcess() throws SAXException, IOException {

    LibraryProcessor processor = new LibraryProcessor();
    StringWriter statsWriter = new StringWriter();
    processor.run(getClass().getResourceAsStream("/books.xml"), getClass().getResourceAsStream("/sales.xml"),
            statsWriter);
    XMLAssert.assertXMLEqual(new InputSource(getClass().getResourceAsStream("/stats-ref.xml")),
            new InputSource(new StringReader(statsWriter.toString())));
}