question: public void testContentHandler ( ) throws Exception { StringWriter out = new StringWriter ( ) ; OutputFormat format = OutputFormat . createPrettyPrint ( ) ; format . setEncoding ( "iso-8859-1" ) ; XMLWriter writer = new XMLWriter ( out , format ) ; generateXML ( writer ) ; writer . close ( ) ; String text = out . toString ( ) ; if ( VERBOSE ) { log ( "Created XML" ) ; log ( text ) ; } Document doc = DocumentHelper . parseText ( text ) ; String value = doc . valueOf ( "/processes[@name='arvojoo']" ) ; assertEquals ( "Document contains the correct text" , "jeejee" , value ) ; }
target:  This test harness was supplied by Lari Hotari