@Test public void renameHighDepthFolderTest() { Note note = createNote(); note.setName("x/y/z"); Folder folder = folderView.getFolder("x"); folder.rename("d"); assertEquals("d/y/z", note.getName()); assertNull(folderView.getFolder("x")); assertNotNull(folderView.getFolder("d")); assertNotNull(folderView.getFolder("d/y")); }
public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); } }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }  }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }  Folder getFolder(String folderId); Folder renameFolder(String oldFolderId, String newFolderId); Folder getFolderOf(Note note); void putNote(Note note); void removeNote(Note note); void clear(); boolean hasFolder(String folderId); boolean hasNote(Note note); int countFolders(); int countNotes(); @Override void onNoteNameChanged(Note note, String oldName); @Override void onFolderRenamed(Folder folder, String oldFolderId); }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }  Folder getFolder(String folderId); Folder renameFolder(String oldFolderId, String newFolderId); Folder getFolderOf(Note note); void putNote(Note note); void removeNote(Note note); void clear(); boolean hasFolder(String folderId); boolean hasNote(Note note); int countFolders(); int countNotes(); @Override void onNoteNameChanged(Note note, String oldName); @Override void onFolderRenamed(Folder folder, String oldFolderId);  }