//package uk.ac.ebi.atlas.experimentimport.expressiondataserializer;
//
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//import org.springframework.test.context.web.WebAppConfiguration;
//
//import javax.inject.Inject;
//
///**
// * Created by Alfonso Muñoz-Pomer Fuentes <amunoz@ebi.ac.uk> on 05/05/15.
// */
//@RunWith(SpringJUnit4ClassRunner.class)
//public class ExpressionSerializerServiceIT {
//
//    private static final String E_MTAB_1733 = "E-MTAB-1733";
//
//    @Inject
//    private ExpressionSerializerService subject;
//
//    @Test
//    public void serializedDataMatchesTSVData() {
//        subject.kryoSerializeExpressionData(E_MTAB_1733);
//    }
//
//}

@@ -1,10 +1,8 @@
-//
 package 
@@ -60,21 +60,42 @@
 alizer;%0A
-//%0A//
+%0Aimport org.junit.Before;%0A
 import o
@@ -109,18 +109,16 @@
 t.Test;%0A
-//
 import o
@@ -142,18 +142,75 @@
 unWith;%0A
-//
+import org.springframework.beans.factory.annotation.Value;%0A
 import o
@@ -263,18 +263,16 @@
 ration;%0A
-//
 import o
@@ -335,18 +335,16 @@
 Runner;%0A
-//
 import o
@@ -404,269 +404,1004 @@
 on;%0A
-//%0A//import javax.inject.Inject;%0A//%0A///**%0A// * Created by Alfonso Mu%C3%B1oz-Pomer Fuentes %3Camunoz@ebi.ac.uk%3E on 05/05/15.%0A// */%0A//@RunWith(SpringJUnit4ClassRunner.class)%0A//public class ExpressionSerializerServiceIT %7B%0A//%0A//    private static final String E_MTAB_1733
+import uk.ac.ebi.atlas.trader.ExperimentTrader;%0Aimport uk.ac.ebi.atlas.trader.cache.BaselineExperimentsCache;%0Aimport uk.ac.ebi.atlas.utils.CsvReaderFactory;%0A%0Aimport javax.inject.Inject;%0Aimport javax.inject.Named;%0Aimport java.io.IOException;%0Aimport java.nio.file.FileSystems;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A@Named%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@WebAppConfiguration%0A@ContextConfiguration(locations = %7B%22classpath:applicationContext.xml%22, %22classpath:solrContextIT.xml%22, %22classpath:oracleContext.xml%22%7D)%0Apublic class ExpressionSerializerServiceIT %7B%0A%0A    @Inject%0A    public ExperimentTrader experimentTrader;%0A%0A    @Inject%0A    public BaselineExperimentsCache baselineExperimentsCache;%0A%0A    private String serializedExpressionsFileTemplate;%0A    private String serializedExpressionLevelsFileTemplate;%0A%0A    @Value(%22#%7Bconfiguration%5B'experiment.magetab.path.template'%5D%7D%22)%0A    public String tsvFileTemplate;%0A%0A%0A    String accesion
  = %22
@@ -1411,220 +1411,1579 @@
 TAB-
+5
 1
-73
 3%22;%0A
-//%0A//    @Inject%0A//    private ExpressionSerializerService subject;%0A//%0A//    @Test%0A//    public void serializedDataMatchesTSVData() %7B%0A//        subject.kryoSerializeExpressionData(E_MTAB_1733
+%0A    private ExpressionSerializerFactory expressionSerializerFactory;%0A    private ExpressionSerializerService subject;%0A%0A%0A    @Before%0A    public void setUp() throws IOException %7B%0A%0A        Path tmp = Files.createTempDirectory(%22serialized_expression%22);%0A        serializedExpressionsFileTemplate = tmp.toString() + %22/%7B0%7D.kryo%22;%0A        serializedExpressionLevelsFileTemplate = tmp.toString() + %22/%7B0%7D_levels.kryo%22;%0A%0A        expressionSerializerFactory = new ExpressionSerializerFactory(%0A                new RnaSeqBaselineExpressionKryoSerializer(serializedExpressionsFileTemplate,%0A                        serializedExpressionLevelsFileTemplate, tsvFileTemplate, new CsvReaderFactory()));%0A%0A        subject = new ExpressionSerializerService(experimentTrader, expressionSerializerFactory,%0A                baselineExperimentsCache);%0A    %7D%0A%0A    @Test%0A    public void weCanSerializeTheFile() %7B%0A        assertEquals(true, fileExists(tsvFileTemplate, accesion));%0A        assertEquals(false, fileExists(serializedExpressionsFileTemplate, accesion));%0A        assertEquals(false, fileExists(serializedExpressionLevelsFileTemplate, accesion));%0A%0A        subject.kryoSerializeExpressionData(accesion);%0A%0A        assertEquals(true, fileExists(serializedExpressionsFileTemplate, accesion));%0A        assertEquals(true, fileExists(serializedExpressionLevelsFileTemplate, accesion));%0A    %7D%0A%0A    private boolean fileExists(String template, String experimentAccession) %7B%0A        return Files.exists(FileSystems.getDefault().getPath(template.replaceAll(%22%5C%5C%7B0%5C%5C%7D%22, experimentAccession))
 );%0A
-//
     %7D%0A
-//%0A//
+%0A
 %7D%0A

Add integration test for kryo serializer