BaseEditor { protected IsWidget getTitle() { refreshTitle(versionRecordManager.getCurrentPath()); return getTitleWidget(); } BaseEditor(VersionRecordManager versionRecordManager,
               BaseEditorView baseView,
               BasicFileMenuBuilder menuBuilder,
               Event<ChangeTitleWidgetEvent> changeTitleNotification); protected  BaseEditor(); protected  BaseEditor(final BaseEditorView baseView); Validator getRenameValidator(); Validator getCopyValidator(); void setOriginalHash(Integer originalHash); String getTitleText(); RemoteCallback<Path> getSaveSuccessCallback(final int newHash); void onRestore(@Observes RestoreEvent restore); void reload(); void disableMenuItem(final MenuItems menuItem); void enableMenuItem(final MenuItems menuItem); void getMenus(final Consumer<Menus> menusConsumer); Command getValidateCommand(); boolean mayClose(Integer currentHash); boolean isDirty(Integer currentHash); VersionRecordManager getVersionRecordManager(); void setMetadataOriginalHash(final Integer metadataOriginalHash);  }
@Test public void testGetTitle() { final ObservablePath path = mock(ObservablePath.class); final EditorTitle expectedTitle = mock(EditorTitle.class); doNothing().when(editor).refreshTitle(path); doReturn(expectedTitle).when(editor).getTitleWidget(); when(versionRecordManager.getCurrentPath()).thenReturn(path); final IsWidget actualWidget = editor.getTitle(); verify(editor).refreshTitle(path); assertEquals(expectedTitle, actualWidget); }