@@ -0,0 +1,2401 @@
+/*%0A *                      Nividic development code%0A *%0A * This code may be freely distributed and modified under the%0A * terms of the GNU Lesser General Public Licence.  This should%0A * be distributed with the code.  If you do not have a copy,%0A * see:%0A *%0A *      http://www.gnu.org/copyleft/lesser.html%0A *%0A * Copyright for this code is held jointly by the microarray platform%0A * of the cole Normale Suprieure and the individual authors.%0A * These should be listed in @author doc comments.%0A *%0A * For more information on the Nividic project and its aims,%0A * or to join the Nividic mailing list, visit the home page%0A * at:%0A *%0A *      http://www.transcriptome.ens.fr/nividic%0A *%0A */%0A%0Apackage fr.ens.transcriptome.nividic.om;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.ObjectInputStream;%0Aimport java.io.ObjectOutputStream;%0A%0Aimport fr.ens.transcriptome.nividic.om.io.GPRReader;%0Aimport fr.ens.transcriptome.nividic.om.io.NividicIOException;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class SerializationTest extends TestCase %7B%0A%0A  public void testBioAssay1() throws FileNotFoundException, IOException,%0A      ClassNotFoundException %7B%0A%0A    BioAssay b = BioAssayFactory.createBioAssay();%0A%0A    File f = new File(%22/tmp/bioassaySerialized%22);%0A%0A    ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(f));%0A    oos.writeObject(b);%0A    oos.close();%0A%0A    ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f));%0A    BioAssay copy = (BioAssay) ois.readObject();%0A    ois.close();%0A%0A    assertEquals(b.getBiologicalId(), copy.getBiologicalId());%0A%0A    f.delete();%0A  %7D%0A%0A  public void testBioAssay2() throws FileNotFoundException, IOException,%0A      ClassNotFoundException, NividicIOException %7B%0A%0A    InputStream is = this.getClass().getResourceAsStream(%22/files/testGPR3.gpr%22);%0A    GPRReader gprr = new GPRReader(is);%0A    BioAssay b = gprr.read();%0A%0A    File f = new File(%22/tmp/bioassaySerialized%22);%0A%0A    ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(f));%0A    oos.writeObject(b);%0A    oos.close();%0A%0A    ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f));%0A    BioAssay copy = (BioAssay) ois.readObject();%0A    ois.close();%0A%0A    assertEquals(b.getBiologicalId(), copy.getBiologicalId());%0A%0A    f.delete();%0A  %7D%0A%0A%7D%0A

Add a class to test serialization of objects