public OMXMLParserWrapperTestBase(OMMetaFactory omMetaFactory) {
this.omMetaFactory = omMetaFactory;
}
public void testCloseWithInputStream() throws Exception {
CloseSensorInputStream in = new CloseSensorInputStream(getTestResource(TestConstants.TEST));
try {
OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(omMetaFactory.getOMFactory(), in);
builder.getDocument().build();
builder.close();
// OMXMLParserWrapper#close() does _not_ close the underlying input stream
assertFalse(in.isClosed());
} finally {
in.close();
}
}