public boolean isWhitelisted(String url) {
        if (disabled()) {
            return true;
        }
        return entries().stream()
                .anyMatch(e -> e.isWhitelisted(url));
    }
@Test
    public void isWhitelisted() {
        assertThat(UrlWhitelist.createEnabled(ImmutableList.of(LiteralWhitelistEntry.create("a", "title", "foo")))
                .isWhitelisted(".foo")).isFalse();
        assertThat(UrlWhitelist.createEnabled(ImmutableList.of(RegexWhitelistEntry.create("b", "title", "foo")))
                .isWhitelisted(".foo")).isTrue();
        assertThat(UrlWhitelist.createEnabled(ImmutableList.of(RegexWhitelistEntry.create("c", "title", "^foo$")))
                .isWhitelisted(".foo")).isFalse();
        assertThat(UrlWhitelist.createEnabled(ImmutableList.of(LiteralWhitelistEntry.create("d", "title", ".foo"
                )))
                .isWhitelisted(".foo")).isTrue();
    }