@Test
public void testAddDomainUrl() throws Exception {

    service.addDomainUrl("test.com", "www.test.com", 1000);
    assertEquals(1, domainRepo.count());
    MongoDomainURL domainURL = domainRepo.findOne("{_id: #}", "www.test.com").as(MongoDomainURL.class);
    assertEquals("www.test.com", domainURL.getAddress());
    assertEquals("test.com", domainURL.getName());
    assertEquals(1000, domainURL.getCoolDownPeriod());
}