VersionRecordManager { public void setVersions(final List<VersionRecord> versions) { if (version == null) { version = versions.get(versions.size() - 1).id(); } setVersions(versions, version); } @Inject  VersionRecordManager(final VersionMenuDropDownButton versionMenuDropDownButton,
                                final SaveButton saveButton,
                                final RestorePopUpPresenter restorePopUpPresenter,
                                final RestoreUtil restoreUtil,
                                final Event<VersionSelectedEvent> versionSelectedEvent,
                                final Caller<VersionService> versionService,
                                @Customizable final CurrentBranch currentBranch); void init(final String version,
                     final ObservablePath path,
                     final Callback<VersionRecord> selectionCallback); MenuItem buildMenu(); void setVersions(final List<VersionRecord> versions); void setShowMoreCommand(final Command showMore); MenuItem newSaveMenuItem(final Command command); MenuItem newSaveMenuItem(final ParameterizedCommand<Boolean> command); boolean isLatest(final VersionRecord versionRecord); ObservablePath getPathToLatest(); void onVersionSelectedEvent(final @Observes VersionSelectedEvent event); String getVersion(); void setVersion(final String version); ObservablePath getCurrentPath(); boolean isCurrentLatest(); void restoreToCurrentVersion(boolean withComments); void reloadVersions(final Path path); void clear();  }
@Test(expected = IllegalArgumentException.class) public void testVersionsNull() throws Exception { manager.setVersions(null); }