public void reloadAllNotes(AuthenticationInfo subject) throws IOException {
    this.noteManager.reloadNotes();

    if (notebookRepo instanceof NotebookRepoSync) {
      NotebookRepoSync mainRepo = (NotebookRepoSync) notebookRepo;
      if (mainRepo.getRepoCount() > 1) {
        mainRepo.sync(subject);
      }
    }
  }
@Test
  void testReloadAllNotes() throws IOException {
    String note1Id = notebook.createNote("note1", AuthenticationInfo.ANONYMOUS);
    notebook.processNote(note1Id,
      note1 -> {
        Paragraph p1 = note1.insertNewParagraph(0, AuthenticationInfo.ANONYMOUS);
        p1.setText("%md hello world");
        return null;
      });

    String note2Id = notebook.cloneNote(note1Id, "copied note", AuthenticationInfo.ANONYMOUS);

    // load copied notebook on memory when reloadAllNotes() is called
    Note copiedNote = notebookRepo.get(note2Id, "/copied note", anonymous);
    notebook.reloadAllNotes(anonymous);
    List<NoteInfo> notesInfo = notebook.getNotesInfo();
    assertEquals(2 , notesInfo.size());
    NoteInfo found = null;
    for (NoteInfo noteInfo : notesInfo) {
      if (noteInfo.getId().equals(copiedNote.getId())) {
        found = noteInfo;
        break;
      }
    }

    assertNotNull(found);
    assertEquals(found.getId(), copiedNote.getId());
    assertEquals(notebook.processNote(found.getId(), Note::getName), copiedNote.getName());
    // format has make some changes due to
    // Notebook.convertFromSingleResultToMultipleResultsFormat
    notebook.processNote(found.getId(),
      note -> {
        assertEquals(note.getParagraphs().size(), copiedNote.getParagraphs().size());
        assertEquals(note.getParagraphs().get(0).getText(),
            copiedNote.getParagraphs().get(0).getText());
        assertEquals(note.getParagraphs().get(0).settings,
            copiedNote.getParagraphs().get(0).settings);
        assertEquals(note.getParagraphs().get(0).getTitle(),
            copiedNote.getParagraphs().get(0).getTitle());
        return null;
      });

    // delete notebook from notebook list when reloadAllNotes() is called
    notebook.reloadAllNotes(anonymous);
    notesInfo = notebook.getNotesInfo();
    assertEquals(2, notesInfo.size());
  }