@Override
  protected void addAttachment(ClassedModel classedModel) throws Exception {
    MBMessage message = (MBMessage) classedModel;

    List<FileEntry> fileEntries = message.getAttachmentsFileEntries();

    List<String> existingFiles = new ArrayList<>();

    for (FileEntry fileEntry : fileEntries) {
      existingFiles.add(fileEntry.getTitle());
    }

    ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(message.getGroupId());

    List<ObjectValuePair<String, InputStream>> inputStreamOVPs =
        MBTestUtil.getInputStreamOVPs("OSX_Test.docx", getClass(), getSearchKeywords());

    MBMessageLocalServiceUtil.updateMessage(
        TestPropsValues.getUserId(),
        message.getMessageId(),
        getSearchKeywords(),
        getSearchKeywords(),
        inputStreamOVPs,
        existingFiles,
        0,
        false,
        serviceContext);
  }
  protected MBMessage addMBMessageAttachment() throws Exception {
    List<ObjectValuePair<String, InputStream>> objectValuePairs =
        MBTestUtil.getInputStreamOVPs("OSX_Test.docx", getClass(), StringPool.BLANK);

    ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(_group.getGroupId());

    User user = TestPropsValues.getUser();

    return MBMessageLocalServiceUtil.addMessage(
        user.getUserId(),
        user.getFullName(),
        _group.getGroupId(),
        MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID,
        "Subject",
        "Body",
        MBMessageConstants.DEFAULT_FORMAT,
        objectValuePairs,
        false,
        0,
        false,
        serviceContext);
  }