ExperimentalDesignWriter { public void write( Writer writer, ExpressionExperiment ee, boolean writeHeader ) throws IOException { Collection<BioAssay> bioAssays = ee.getBioAssays(); this.write( writer, ee, bioAssays, writeHeader, writeHeader ); }  void write( Writer writer, ExpressionExperiment ee, boolean writeHeader ); void write( Writer writer, ExpressionExperiment ee, Collection<BioAssay> bioAssays, boolean writeBaseHeader,
            boolean writeHeader );  }
@Test public void testWrite() throws Exception { if ( ee == null ) { log.error( "Could not find experiment " + shortName + ". Skipping test ..." ); return; } ExperimentalDesignWriter edWriter = new ExperimentalDesignWriter(); File f = File.createTempFile( "test_writer_" + shortName + ".", ".txt" ); try (PrintWriter writer = new PrintWriter( f )) { edWriter.write( writer, ee, true ); } log.info( f ); try (FileReader fr = new FileReader( f )) { char[] b = new char[( int ) f.length()]; fr.read( b ); String in = new String( b ); assertTrue( in.contains( "PoolTs1Cje_P0_hyb1" ) ); assertTrue( in.contains( "#$strain : Category=strain Type=Categorical" ) ); } }