@Test
public void testFindDomains() throws Exception {

    service.addDomainUrl("d1", "url1", 1);
    service.addDomainUrl("d2", "url2", 2);
    List<DomainURL> domains = service.findDomains(new PageRequest(0, 100));
    assertEquals(2, domains.size());
    List<String> urlsFound = new ArrayList<>();
    for (DomainURL domain : domains) {
        urlsFound.add(domain.getAddress());
    }
    assertTrue(urlsFound.containsAll(Arrays.asList("url1", "url2")));
}