MongoUrlServiceImpl implements UrlService { public void removeSimpleUrl(String url) { urlRepo.remove("{url: #}", url); }  @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; }
@Test public void testRemoveSimpleUrl() throws Exception { List<String> urls = Arrays.asList("someURL1", "someURL2", "someURL3", "someURL4", "someURL5"); service.addSimpleUrls(urls, "new", "site.com", "origin.com"); service.removeSimpleUrl("someURL2"); assertEquals(4, urlRepo.count()); }