diff --git a/repository-services/isajson-biosamples/src/test/java/com/elixir/biohackaton/ISAToSRA/BiosampleReceiptToMarsTest.java b/repository-services/isajson-biosamples/src/test/java/com/elixir/biohackaton/ISAToSRA/BiosampleReceiptToMarsTest.java index bfb1378..20987bd 100644 --- a/repository-services/isajson-biosamples/src/test/java/com/elixir/biohackaton/ISAToSRA/BiosampleReceiptToMarsTest.java +++ b/repository-services/isajson-biosamples/src/test/java/com/elixir/biohackaton/ISAToSRA/BiosampleReceiptToMarsTest.java @@ -1,13 +1,6 @@ /** Elixir BioHackathon 2022 */ package com.elixir.biohackaton.ISAToSRA; -import com.elixir.biohackaton.ISAToSRA.biosamples.model.BiosampleAccessionsMap; -import com.elixir.biohackaton.ISAToSRA.biosamples.service.BioSamplesSubmitter; -import com.elixir.biohackaton.ISAToSRA.biosamples.service.MarsReceiptService; -import com.elixir.biohackaton.ISAToSRA.receipt.isamodel.*; -import com.elixir.biohackaton.ISAToSRA.receipt.marsmodel.*; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.ObjectMapper; import java.io.File; import java.nio.file.Files; import java.util.List; @@ -15,6 +8,14 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import com.elixir.biohackaton.ISAToSRA.biosamples.model.BiosampleAccessionsMap; +import com.elixir.biohackaton.ISAToSRA.biosamples.service.BioSamplesSubmitter; +import com.elixir.biohackaton.ISAToSRA.biosamples.service.MarsReceiptService; +import com.elixir.biohackaton.ISAToSRA.receipt.isamodel.IsaJson; +import com.elixir.biohackaton.ISAToSRA.receipt.isamodel.Study; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; + @SpringBootTest class BiosampleReceiptToMarsTest { @@ -43,11 +44,11 @@ void convertToMars() { // Converting Biosample receipt to MARS receipt MarsReceiptService marsReceiptService = new MarsReceiptService(); - MarsReceipt marsReceipt = marsReceiptService.convertReceiptToMars(accessionsMap, isaJson); + marsReceiptService.convertReceiptToMars(accessionsMap, isaJson); // Saving the result as a Json file String marsReceiptPath = "../../test-data/mars-biosample-receipt.json"; - Files.write(new File(marsReceiptPath).toPath(), jsonMapper.writeValueAsBytes(marsReceipt)); + Files.write(new File(marsReceiptPath).toPath(), jsonMapper.writeValueAsBytes(marsReceiptService.getMarsReceipt())); } catch (Exception ex) { System.console().printf("%s", ex); }