public void removeCorruptedNote(String noteId, AuthenticationInfo subject) throws IOException {
    LOGGER.info("Remove corrupted note: {}", noteId);
    noteManager.removeNote(noteId, subject);
    authorizationService.removeNoteAuth(noteId);
  }
@Test
  void testRemoveCorruptedNote() throws IOException {
    LOGGER.info("--------------- Test testRemoveCorruptedNote ---------------");
    // create a note and a paragraph
    String corruptedNoteId = notebook.createNote("note1", anonymous);
    String corruptedNotePath = notebook.processNote(corruptedNoteId,
      corruptedNote -> {
        return notebookDir.getAbsolutePath() + corruptedNote.getPath() + "_" + corruptedNote.getId() + ".zpln";
      });

    // corrupt note
    FileWriter myWriter = new FileWriter(corruptedNotePath);
    myWriter.write("{{{I'm corrupted;;;");
    myWriter.close();
    LOGGER.info("--------------- Finish Test testRemoveCorruptedNote ---------------");
    int numberOfNotes = notebook.getNotesInfo().size();
    notebook.removeNote(corruptedNoteId, anonymous);
    assertEquals(numberOfNotes - 1, notebook.getNotesInfo().size());
    LOGGER.info("--------------- Finish Test testRemoveCorruptedNote ---------------");
  }