ExperimentCrud { public void updateExperimentDesign(String experimentAccession) { updateWithNewExperimentDesign( loadAndValidateFiles(experimentAccession).getRight().getExperimentDesign(), experimentDao.getExperimentAsAdmin(experimentAccession) ); } ExperimentCrud(ExperimentDao experimentDao,
                          ExperimentChecker experimentChecker,
                          CondensedSdrfParser condensedSdrfParser,
                          IdfParser idfParser,
                          ExperimentDesignFileWriterService experimentDesignFileWriterService,
                          ConfigurationTrader configurationTrader); UUID importExperiment(String experimentAccession, boolean isPrivate); UUID importSingleCellExperiment(String experimentAccession, boolean isPrivate); void deleteExperiment(String experimentAccession); ExperimentDTO findExperiment(String experimentAccession); List<ExperimentDTO> findAllExperiments(); void makeExperimentPrivate(String experimentAccession); void makeExperimentPublic(String experimentAccession); void updateExperimentDesign(String experimentAccession); void updateSingleCellExperimentDesign(String experimentAccession); void checkFiles(String experimentAccession);  }
@Test public void updateExperimentDesign() throws IOException { subject.importExperiment(EXPERIMENT_ACCESSION, false); subject.updateExperimentDesign(EXPERIMENT_ACCESSION); verify(experimentDesignFileWriterService, times(2)) .writeExperimentDesignFile( eq(EXPERIMENT_ACCESSION), eq(ExperimentType.RNASEQ_MRNA_BASELINE), any(ExperimentDesign.class)); }