public static StatsSingleNote getNoteInfo(Note note) {
    StatsSingleNote infos = new StatsSingleNote();

    int words;
    int chars;
    if (note.isChecklist()) {
      infos.setChecklistCompletedItemsNumber(
          StringUtils.countMatches(note.getContent(), CHECKED_SYM));
      infos.setChecklistItemsNumber(infos.getChecklistCompletedItemsNumber() +
          StringUtils.countMatches(note.getContent(), UNCHECKED_SYM));
    }
    infos.setTags(TagsHelper.retrieveTags(note).size());
    words = getWords(note);
    chars = getChars(note);
    infos.setWords(words);
    infos.setChars(chars);

    int attachmentsAll = 0;
    int images = 0;
    int videos = 0;
    int audioRecordings = 0;
    int sketches = 0;
    int files = 0;

    for (Attachment attachment : note.getAttachmentsList()) {
      if (MIME_TYPE_IMAGE.equals(attachment.getMime_type())) {
        images++;
      } else if (MIME_TYPE_VIDEO.equals(attachment.getMime_type())) {
        videos++;
      } else if (MIME_TYPE_AUDIO.equals(attachment.getMime_type())) {
        audioRecordings++;
      } else if (MIME_TYPE_SKETCH.equals(attachment.getMime_type())) {
        sketches++;
      } else if (MIME_TYPE_FILES.equals(attachment.getMime_type())) {
        files++;
      }
      attachmentsAll++;
    }
    infos.setAttachments(attachmentsAll);
    infos.setImages(images);
    infos.setVideos(videos);
    infos.setAudioRecordings(audioRecordings);
    infos.setSketches(sketches);
    infos.setFiles(files);

    if (note.getCategory() != null) {
      infos.setCategoryName(note.getCategory().getName());
    }

    return infos;
  }
@Test
  public void getNoteInfo() {
    var contextMock = getContextMock();
    try (
        MockedStatic<OmniNotes> omniNotes = mockStatic(OmniNotes.class);
        MockedStatic<BuildHelper> buildVersionHelper = mockStatic(BuildHelper.class);
    ) {
      omniNotes.when(OmniNotes::getAppContext).thenReturn(contextMock);
      buildVersionHelper.when(() -> BuildHelper.isAboveOrEqual(VERSION_CODES.N)).thenReturn(true);

      var info = NotesHelper.getNoteInfo(new Note());

      assertEquals(0, info.getChars());
      assertEquals(0, info.getWords());
      assertEquals(0, info.getChecklistCompletedItemsNumber());
    }
  }