// Test io reader/writer close...
// We need to +1 this because Xerces always closes input streams/readers and there's no
// way of turning that off
TestReader reader = new TestReader("<x/>", expectedCloseCallCount + 1);
TestWriter writer = new TestWriter(expectedCloseCallCount);
execContext = smooks.createExecutionContext(profile);
smooks.filterSource(execContext, new StreamSource(reader), new StreamResult(writer));
}
private class TestInputStream extends ByteArrayInputStream {
private int closeCallCount = 0;