@Test
public void testCloneNote() throws IOException, CloneNotSupportedException,
    InterruptedException {

  Note note = notebook.createNote(null);
  note.getNoteReplLoader().setInterpreters(factory.getDefaultInterpreterSettingList());
  final Paragraph p = note.addParagraph();
  p.setText("hello world");
  note.runAll();
  while(p.isTerminated()==false || p.getResult()==null) Thread.yield();
  p.setStatus(Status.RUNNING);
  Note cloneNote = notebook.cloneNote(note.getId(), "clone note", null);
  Paragraph cp = cloneNote.paragraphs.get(0);
  assertEquals(cp.getStatus(), Status.READY);
  // Keep same ParagraphID
  assertEquals(cp.getId(), p.getId());
  assertEquals(cp.text, p.text);
  assertEquals(cp.getResult().message(), p.getResult().message());
}