assertEquals(StreamUtils.trimLines(new StringReader(input)).toString(), StreamUtils.trimLines(new StringReader(writer.toString())).toString());
}
public void test_reader_stream() throws SAXException, IOException {
Smooks smooks = new Smooks(getClass().getResourceAsStream("smooks-config-01.xml"));
ExecutionContext execContext = smooks.createExecutionContext();
String input = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-01.xml")));
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
smooks.filterSource(execContext, new StreamSource(new StringReader(input)), new StreamResult(outStream));
assertEquals(StreamUtils.trimLines(new StringReader(input)).toString(), StreamUtils.trimLines(new StringReader(outStream.toString())).toString());