@Test
public void test12StreamAsWriter() throws Exception {

	
	CloseObservableOutputStream target = new CloseObservableOutputStream();
	
	try (MessageOutputStream stream = new MessageOutputStream(null, target, (IForwardTarget)null)) {
	
		try (Writer writer = stream.asWriter()) {
			writer.write(testString);
		}
		
	}
	String actual = new String (target.toByteArray());
	assertEquals(testString, actual);
	assertTrue(target.isCloseCalled());
}