GenomeDataServiceImpl implements GenomeDataService { @Override public List<TopologicalDomain> getTopologicallyAssociatedDomains() { return tadDao.getAllTads(); } 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 serviceReturnsTopologicalDomains() { List<TopologicalDomain> tads = ImmutableList.of(new TopologicalDomain(1, 1, 2, Collections.emptyMap())); Mockito.when(mockTadDao.getAllTads()).thenReturn(tads); List<TopologicalDomain> topologicalDomains = instance.getTopologicallyAssociatedDomains(); assertThat(topologicalDomains, equalTo(tads)); }