@Test
public void test31ContentHandlerAsStream() throws Exception {

	
	CloseObservableXmlWriter target = new CloseObservableXmlWriter();
	try (MessageOutputStream stream = new MessageOutputStream(null, target, (IForwardTarget)null, null, null)) {
		try (OutputStream outputstream = stream.asStream()) {
			outputstream.write(testString.getBytes());
		}
	
	}
	String actual = new String (target.toString());
	assertEquals(testString, actual);
	assertTrue(target.isCloseCalled());
}