### Question:
RegexHttpMatcher implements HttpMatcher, HttpReplacer { public void addHttpAllow(Predicate<String> allow) { if (allow == null) { throw new IllegalArgumentException("allow cannot be null"); } this.allow = this.allow.or(allow); } RegexHttpMatcher(Predicate<String> allow); void setPattern(Pattern pattern); void setHttpReplacer(Function<String, String> httpReplacer); List<HttpMatchResult> findHttp(String text); HttpReplaceResult replaceHttp(String text); void addHttpAllow(Predicate<String> allow); void addHttpWhitelist(Predicate<String> whitelist);  }### Answer:
@Test public void addHttpUrlAllowlistWhenNullThenIllegalArgumentException() { Predicate<String> allow = null; assertThatCode(() -> this.matcher.addHttpAllow(allow)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("allow cannot be null"); }