code: public static boolean matches(Matcher<?> matcher, Object item, Description mismatch, String message) {
          if (mismatch instanceof Description.NullDescription) {
              return matcher.matches(item);
          } else if (message == null || message.equals("$1")) {
              return matches(matcher, item, mismatch);
          }
          
          if (message.contains("$1")) {
              final Description subMismatch = new StringDescription();
              if (!matches(matcher, item, subMismatch)) {
                  mismatch.appendText(message.replace("$1", subMismatch.toString()));
                  return false;
              }
          } else {
              if (!matcher.matches(item)) {
                  mismatch.appendText(message);
                  return false;
              }
          }
          return true;
      }
docs: Similar to {@link #matches(org.hamcrest.Matcher, java.lang.Object, org.hamcrest.Description)},
  but allows to override the mismatch message.
  <p>
  If matching fails, {@code message} will be appended to {@code mismatch}.
  Any occurrence of {@code "$1"} in (@code message} will be replaced with
  the actual mismatch description of {@code matcher}.
  
  @param matcher
  @param item
  @param mismatch
  @param message
  @return match result