@Test
public void testUrlExistsAndNeedsToBeUpdated() throws Exception {

    String url = "http://test.example.com/hello";
    Entry entry = createEntry(url, 2880); // two days
    when(robotsRepository.findByHost(anyString())).thenReturn(entry);
    when(redisUrlRepository.exists(anyString())).thenReturn(false);
    consumerService.receiveUrl(url);
    String baseHost = DomainUtils.base(new URI(url));
    String robotUrl = String.format("%s/robots.txt", baseHost);
    verify(downloaderService, times(1)).download(eq(baseHost), eq(robotUrl));
}