From 08fcbc6728c9ed75b24ea9ad5896b2e622178372 Mon Sep 17 00:00:00 2001 From: nkumar2 Date: Wed, 14 Feb 2024 14:42:43 +0000 Subject: [PATCH] update test --- .../AssemblyAndChromosomeServiceIntegrationTest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test/java/uk/ac/ebi/eva/contigalias/service/AssemblyAndChromosomeServiceIntegrationTest.java b/src/test/java/uk/ac/ebi/eva/contigalias/service/AssemblyAndChromosomeServiceIntegrationTest.java index b9447aaf..f0be306b 100644 --- a/src/test/java/uk/ac/ebi/eva/contigalias/service/AssemblyAndChromosomeServiceIntegrationTest.java +++ b/src/test/java/uk/ac/ebi/eva/contigalias/service/AssemblyAndChromosomeServiceIntegrationTest.java @@ -205,8 +205,14 @@ void getChromosomesByNameAndAssemblySameNameSameTaxid() { assertNotNull(page); assertEquals(2, page.getTotalElements()); List entityList = page.get().collect(Collectors.toList()); - assertChromosomeEntityIdentical(chromosomeEntities[0], entityList.get(0)); - assertChromosomeEntityIdentical(chromosomeEntities[1], entityList.get(1)); + ChromosomeEntity first = entityList.stream() + .filter(c->c.getInsdcAccession()==chromosomeEntities[0].getInsdcAccession()) + .findFirst().get(); + ChromosomeEntity second = entityList.stream() + .filter(c->c.getInsdcAccession()==chromosomeEntities[1].getInsdcAccession()) + .findFirst().get(); + assertChromosomeEntityIdentical(chromosomeEntities[0], first); + assertChromosomeEntityIdentical(chromosomeEntities[1], second); } /**