@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());
}