code: public void removeMessage(String messageId) {
          Collection<ValidationMessage<Origin>> toRemove = new ArrayList<ValidationMessage<Origin>>();
  
          for (ValidationMessage<Origin> message : messages) {
              if (messageId.equals(message.getMessageKey())) {
                  toRemove.add(message);
              }
          }
          messages.removeAll(toRemove);
      }
docs: removes all messages with a specified message id
  @param messageId