From 33d7664927c22687eda79c3a718fb942c67d395d Mon Sep 17 00:00:00 2001 From: nkumar2 Date: Fri, 6 Sep 2024 14:13:41 +0100 Subject: [PATCH] test fixes --- .../java/uk/ac/ebi/eva/server/ws/GeneWSServerV2Test.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eva-server/src/test/java/uk/ac/ebi/eva/server/ws/GeneWSServerV2Test.java b/eva-server/src/test/java/uk/ac/ebi/eva/server/ws/GeneWSServerV2Test.java index 3ae9e32d..c2553eef 100644 --- a/eva-server/src/test/java/uk/ac/ebi/eva/server/ws/GeneWSServerV2Test.java +++ b/eva-server/src/test/java/uk/ac/ebi/eva/server/ws/GeneWSServerV2Test.java @@ -120,6 +120,8 @@ public void setUp() throws Exception { .willReturn(Collections.singletonList(variantEntity)); given(contigAliasService.getVariantsWithTranslatedContig(Arrays.asList(variantEntity, variantEntity), null)) .willReturn(Arrays.asList(variantEntity, variantEntity)); + given(contigAliasService.translateContigFromInsdc(variantEntity.getChromosome(), null)) + .willReturn(variantEntity.getChromosome()); } @Test @@ -132,11 +134,8 @@ public void testGetVariantsByExistingGene() throws URISyntaxException { @Test public void testGetVariantsByExistingGeneWithTranslatedContig() throws URISyntaxException { - VariantWithSamplesAndAnnotation tranlatedVariant = new VariantWithSamplesAndAnnotation("chr20", 1000, 1005, - "A", "C", MAIN_ID); - given(contigAliasService.getVariantsWithTranslatedContig(Collections.singletonList(variantEntity), - ContigNamingConvention.ENA_SEQUENCE_NAME)) - .willReturn(Collections.singletonList(tranlatedVariant)); + given(contigAliasService.translateContigFromInsdc(variantEntity.getChromosome(), ContigNamingConvention.ENA_SEQUENCE_NAME)) + .willReturn("chr20"); Variant variant = testGetVariantsByGeneHelper("ENSG00000227232", 1, HttpStatus.OK, ContigNamingConvention.ENA_SEQUENCE_NAME).get(0);