docs: public MessageBatch replace(Message existing_msg, Message new_msg) {
          if(existing_msg == null)
              return this;
          for(int i=0; i < index; i++) {
              if(messages[i] != null && messages[i] == existing_msg) {
                  messages[i]=new_msg;
                  break;
              }
          }
          return this;
      }