GenomeAnalysisServiceProvider { public boolean hasServiceFor(GenomeAssembly genomeAssembly) { return genomeAnalysisServices.containsKey(genomeAssembly); } GenomeAnalysisServiceProvider(GenomeAnalysisService... genomeAnalysisServices); Set<GenomeAssembly> getProvidedAssemblies(); GenomeAnalysisService get(GenomeAssembly genomeAssembly); GenomeAnalysisService getOrDefault(GenomeAssembly genomeAssembly, GenomeAnalysisService defaultAnalysisService); boolean hasServiceFor(GenomeAssembly genomeAssembly); @Override String toString();  }
@Test public void testHasServiceForSingleAssembly() { GenomeAnalysisService hg19Service = TestFactory.buildStubGenomeAnalysisService(GenomeAssembly.HG19); GenomeAnalysisServiceProvider instance = new GenomeAnalysisServiceProvider(hg19Service); assertThat(instance.hasServiceFor(GenomeAssembly.HG19), is(true)); assertThat(instance.hasServiceFor(GenomeAssembly.HG38), is(false)); }
@Test public void testHasServiceForMultipleAssemblies() { GenomeAnalysisServiceProvider instance = new GenomeAnalysisServiceProvider(HG19_SERVICE, HG38_SERVICE); assertThat(instance.hasServiceFor(GenomeAssembly.HG19), is(true)); assertThat(instance.hasServiceFor(GenomeAssembly.HG38), is(true)); }