Bug 202030 Failures occur in Junit test of org.eclipse.birt.report.engine.tests in daily build 20070903
engine/org.eclipse.birt.report.engine.tests/test/org/eclipse/birt/report/engine/ir/EngineIRReaderTest.java
{
		
		ReportParser parser = new ReportParser( );
		Report report = parser.parse( ".", this.getClass( )
				.getResourceAsStream( DESIGN_STREAM ) );
		assertTrue( report != null );
		
		ByteArrayOutputStream out = new ByteArrayOutputStream( );
		new EngineIRWriter( ).write( out, report );
		out.close( );
		
		InputStream in = new ByteArrayInputStream( out.toByteArray( ) );
		EngineIRReader reader = new EngineIRReader( false );
		Report report2 = reader.read( in );
		ByteArrayOutputStream out2 = new ByteArrayOutputStream( );
		ReportDesignWriter writer = new ReportDesignWriter( );
		writer.write( out2, report2 );
		String value = new String( out2.toByteArray( ) );
		return value;
	}
	private String getGolden( String fileName ) throws Exception
	{
		InputStream in = this.getClass( ).getResourceAsStream( fileName );
		assertTrue( in != null );
		EngineIRReader reader = new EngineIRReader( false );
		Report report = reader.read( in );
		ByteArrayOutputStream outputStream = new ByteArrayOutputStream( );
		ReportDesignWriter writer = new ReportDesignWriter( );
		writer.write( outputStream, report );
		return new String( outputStream.toByteArray( ) );