private static Predicate<Map.Entry<String, ValuePattern>> matchHeadersIn(final Request request) {
return new Predicate<Map.Entry<String, ValuePattern>>() {
public boolean apply(Map.Entry<String, ValuePattern> headerPattern) {
ValuePattern headerValuePattern = headerPattern.getValue();
String key = headerPattern.getKey();
HttpHeader header = request.header(key);
boolean match = header.hasValueMatching(headerValuePattern);
if (!match) {
notifier().info(String.format(
"URL %s is match, but header %s is not. For a match, value should %s",
request.getUrl(),