GenomeDataServiceImpl implements GenomeDataService { @Override public List<Gene> getKnownGenes() { return geneFactory.createKnownGenes(); } GenomeDataServiceImpl(GeneFactory geneFactory, RegulatoryFeatureDao regulatoryFeatureDao, TadDao tadDao); @Override List<Gene> getKnownGenes(); @Override Set<GeneIdentifier> getKnownGeneIdentifiers(); @Override List<RegulatoryFeature> getRegulatoryFeatures(); @Override List<TopologicalDomain> getTopologicallyAssociatedDomains();  }
@Test public void getKnownGenes() throws Exception { List<Gene> allGenes = TestGeneFactory.buildGenes(); Mockito.when(geneFactory.createKnownGenes()).thenReturn(allGenes); assertThat(instance.getKnownGenes(), equalTo(allGenes)); }