code: public static Predicate<MailMessage> forHeader(final String headerName, final String headerValue) {
  		return new Predicate<MailMessage>() {
  			@Override
  			public boolean apply(final MailMessage input) {
  				List<String> headers = input.getHeaders().get(headerName);
  				for (String singleHeader : headers) {
  					if (StringUtils.equals(singleHeader, headerValue)) {
  						return true;
  					}
  				}
  				return false;
  			}
  
  			@Override
  			public String toString() {
  				return String.format("headers to include header '%s=%s'", headerName, headerValue);
  			}
  		};
  	}
docs: Creates a {@link Predicate} for matching a mail header. If multiple header values are present
  for the given header name this Predicate returns true if at least one header value matches
  the given header value.
  
  @param headerName
  the header name to match
  @param headerValue
  the header value to match
  @return the predicate