Code example for StringWriter

Methods: append

0
		stage.getStreamFromUrl("myInvalidUrl");
	} 
 
	@Test 
	public void testAddTextToDocument() { 
		StringWriter textData = new StringWriter();
		String text = "My text";
		textData.append(text);		
		 
		stage.addTextToDocument(doc, textData);
		 
		String field = (String)doc.getContentField(stage.getContentField());
		if (!text.equals(field)) {
			fail("Expected: " + text + " got: " + field);
		} 
	} 
	 
	@Test 
	public void testAddMetadataToDocument() { 
		Metadata meta = new Metadata();