@Test
public void testShouldDownload() throws Exception {

    Configuration.Item item = new Configuration.Item();
    item.state = Configuration.Item.STATE_DENY;
    item.location = "example.com";
    item.title = "host-uri";
    RuleDatabaseItemUpdateRunnable itemUpdateRunnable = new RuleDatabaseItemUpdateRunnable(mockTask, mockContext, item);
    // File should not be downloaded
    assertFalse(itemUpdateRunnable.shouldDownload());
    // Content URI should
    item.location = "content://foo";
    assertTrue(itemUpdateRunnable.shouldDownload());
    // Do not download ignored URIs
    item.state = Configuration.Item.STATE_IGNORE;
    assertFalse(itemUpdateRunnable.shouldDownload());
    item.state = Configuration.Item.STATE_DENY;
    item.location = "https://foo";
    assertTrue(itemUpdateRunnable.shouldDownload());
    item.location = "http://foo";
    assertTrue(itemUpdateRunnable.shouldDownload());
}