@Test public void testRemoveDomains() throws Exception { service.addDomainUrl("site1.com", "site1.com", 2); service.addSimpleUrls(Arrays.asList("someURL1a", "someURL1b"), "new", "site1.com", "origin1.com"); service.addDomainUrl("site2.com", "site2.com", 2); service.addSimpleUrls(Arrays.asList("someURL2a", "someURL2b"), "new", "site2.com", "origin2.com"); assertEquals(2, domainRepo.count()); assertEquals(4, urlRepo.count()); service.removeDomains(); assertEquals(0, domainRepo.count()); assertEquals(0, urlRepo.count()); }
@Override public void removeDomains() { urlRepo.drop(); domainRepo.drop(); }
MongoUrlServiceImpl implements UrlService { @Override public void removeDomains() { urlRepo.drop(); domainRepo.drop(); } }
MongoUrlServiceImpl implements UrlService { @Override public void removeDomains() { urlRepo.drop(); domainRepo.drop(); }  }
MongoUrlServiceImpl implements UrlService { @Override public void removeDomains() { urlRepo.drop(); domainRepo.drop(); }  @PostConstruct void init(); DomainURL addDomainUrl(String domainName, String domainUrl, long coolDownPeriod); @Override void addSimpleUrls(List<String> urls, String status, String domainURL, String sourceDomainName); @Override void addDomainLinks(List<DomainLink> domainLinks); @Override List<DomainURL> findDomains(Pageable pageable); @Override Collection<SimpleURL> findURLs(String address, String status, int pageNo, int pageSize); @Override Collection<SimpleURL> findExternalURLs(String address, String status, int pageNo, int pageSize); void removeSimpleUrl(String url); @Override void updateSimpleUrlsStatus(List<String> urls, String status); @Override void updateSimpleUrlErrorStatus(String url, int errorDelta); void removeDomainUrl(String domainURL); @Override void removeDomains(); @Override List<Entries> query(String query); @Override long countAllNodes(); @Override long countAllDomains(); @Override long countAllLinks(); @Override long countDomainLinks(String domainUrl); }
MongoUrlServiceImpl implements UrlService { @Override public void removeDomains() { urlRepo.drop(); domainRepo.drop(); }  @PostConstruct void init(); DomainURL addDomainUrl(String domainName, String domainUrl, long coolDownPeriod); @Override void addSimpleUrls(List<String> urls, String status, String domainURL, String sourceDomainName); @Override void addDomainLinks(List<DomainLink> domainLinks); @Override List<DomainURL> findDomains(Pageable pageable); @Override Collection<SimpleURL> findURLs(String address, String status, int pageNo, int pageSize); @Override Collection<SimpleURL> findExternalURLs(String address, String status, int pageNo, int pageSize); void removeSimpleUrl(String url); @Override void updateSimpleUrlsStatus(List<String> urls, String status); @Override void updateSimpleUrlErrorStatus(String url, int errorDelta); void removeDomainUrl(String domainURL); @Override void removeDomains(); @Override List<Entries> query(String query); @Override long countAllNodes(); @Override long countAllDomains(); @Override long countAllLinks(); @Override long countDomainLinks(String domainUrl); @Autowired
    public MetricsConfig metricsConfig; @Autowired
    public MongoConfig mongoConfig; public MongoCollection domainRepo; public MongoCollection urlRepo; }