@Test
public void testReloadAllNotes() throws IOException {

  File srcDir = new File("src/test/resources/2A94M5J1Z");
  File destDir = new File(notebookDir.getAbsolutePath() + "/2A94M5J1Z");
  // copy the notebook
  try {
    FileUtils.copyDirectory(srcDir, destDir);
  } catch (IOException e) {
    logger.error(e.toString(), e);
  }
  // doesn't have copied notebook in memory before reloading
  List<Note> notes = notebook.getAllNotes();
  assertEquals(notes.size(), 0);
  // load copied notebook on memory when reloadAllNotes() is called
  Note copiedNote = notebookRepo.get("2A94M5J1Z", null);
  notebook.reloadAllNotes(null);
  notes = notebook.getAllNotes();
  assertEquals(notes.size(), 1);
  assertEquals(notes.get(0).id(), copiedNote.id());
  assertEquals(notes.get(0).getName(), copiedNote.getName());
  assertEquals(notes.get(0).getParagraphs(), copiedNote.getParagraphs());
  // delete the notebook
  FileUtils.deleteDirectory(destDir);
  // keep notebook in memory before reloading
  notes = notebook.getAllNotes();
  assertEquals(notes.size(), 1);
  // delete notebook from notebook list when reloadAllNotes() is called
  notebook.reloadAllNotes(null);
  notes = notebook.getAllNotes();
  assertEquals(notes.size(), 0);
}