Reamer commented on a change in pull request #4134: URL: https://github.com/apache/zeppelin/pull/4134#discussion_r651845240
########## File path: zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java ########## @@ -263,6 +264,26 @@ public void testNoteOperations() throws IOException { assertEquals(2, notesInfo.size()); verify(callback).onSuccess(notesInfo, context); + // test moving corrupted note to trash + Note corruptedNote = notebookService.createNote("/folder_1/corruptedNote", "test", true, context, callback); + String corruptedNotePath = notebookDir.getAbsolutePath() + corruptedNote.getPath() + "_" + corruptedNote.getId() + ".zpln"; + // corrupt note + try { + FileWriter myWriter = new FileWriter(corruptedNotePath); + myWriter.write("{{{I'm corrupted;;;"); + myWriter.close(); + System.out.println("Successfully wrote to the file."); Review comment: Please remove `System.out.println` and work with asserts You should use [try-with-ressource](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html) for the FileWriter object. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org