BaseEditor { void initVersionRecordManager() { final String version = getPlace().getParameter("version", null); final Callback<VersionRecord> selectVersion = getSelectVersion(); versionRecordManager.init(version, versionRecordManager.getCurrentPath(), selectVersion); } 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 testInitVersionRecordManager() { final ObservablePath path = mock(ObservablePath.class); final PlaceRequest placeRequest = mock(PlaceRequest.class); final String version = "version"; final Callback<VersionRecord> selectionCallback = (v) -> { }; when(versionRecordManager.getCurrentPath()).thenReturn(path); when(placeRequest.getParameter(anyString(), any())).thenReturn(version); doReturn(selectionCallback).when(editor).getSelectVersion(); doReturn(placeRequest).when(editor).getPlace(); editor.initVersionRecordManager(); verify(versionRecordManager).init(version, path, selectionCallback); }