GeneFactory { public List<Gene> createKnownGenes() { List<Gene> knownGenes = getGeneIdentifiers().stream() .map(Gene::new) .collect(toList()); logger.debug("Created {} known genes.", knownGenes.size()); return knownGenes; } GeneFactory(JannovarData jannovarData); List<Gene> createKnownGenes(); Set<GeneIdentifier> getGeneIdentifiers();  }
@Test public void testCreateKnownGenes() { Set<Gene> expected = Sets.newHashSet(TestGeneFactory.buildGenes()); Set<Gene> knownGenes = Sets.newHashSet(instance.createKnownGenes()); assertThat(knownGenes, equalTo(expected)); }