@Test void exceptionsThrownInParallelTasksAreWrapped() { doThrow(new UncheckedIOException(new IOException())).when(geneSearchDaoMock).fetchCellIds(anyString()); assertThatExceptionOfType(RuntimeException.class).isThrownBy( () -> subject.getCellIdsInExperiments(generateRandomExperimentAccession())) .withCauseInstanceOf(ExecutionException.class); }
public Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds) { return fetchInParallel( ImmutableSet.copyOf(geneIds), geneId -> geneSearchDao.fetchCellIds(geneId)); }
GeneSearchService { public Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds) { return fetchInParallel( ImmutableSet.copyOf(geneIds), geneId -> geneSearchDao.fetchCellIds(geneId)); } }
GeneSearchService { public Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds) { return fetchInParallel( ImmutableSet.copyOf(geneIds), geneId -> geneSearchDao.fetchCellIds(geneId)); } GeneSearchService(GeneSearchDao geneSearchDao, TsnePlotSettingsService tsnePlotSettingsService); }
GeneSearchService { public Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds) { return fetchInParallel( ImmutableSet.copyOf(geneIds), geneId -> geneSearchDao.fetchCellIds(geneId)); } GeneSearchService(GeneSearchDao geneSearchDao, TsnePlotSettingsService tsnePlotSettingsService); Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds); Map<String, Map<String, List<String>>> getFacets(List<String> cellIds); Map<String, Map<String, Map<Integer, List<Integer>>>> getMarkerGeneProfile(String... geneIds); }
GeneSearchService { public Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds) { return fetchInParallel( ImmutableSet.copyOf(geneIds), geneId -> geneSearchDao.fetchCellIds(geneId)); } GeneSearchService(GeneSearchDao geneSearchDao, TsnePlotSettingsService tsnePlotSettingsService); Map<String, Map<String, List<String>>> getCellIdsInExperiments(String... geneIds); Map<String, Map<String, List<String>>> getFacets(List<String> cellIds); Map<String, Map<String, Map<Integer, List<Integer>>>> getMarkerGeneProfile(String... geneIds);  }