VersionMenuDropDownButton implements VersionMenuDropDownButtonView.Presenter,
                   HasEnabled,
                   IsWidget { @Override public void resetVersions() { versions = null; version = null; } VersionMenuDropDownButton(); @Inject  VersionMenuDropDownButton(VersionMenuDropDownButtonView view); @Override Widget asWidget(); void setItems(List<VersionRecord> versions); @Override void onMenuOpening(); @Override void resetVersions(); void addSelectionCallback(Callback<VersionRecord> selectionCallback); void setShowMoreCommand(Command showMore); void setVersion(String version); @Override void onVersionRecordSelected(VersionRecord result); @Override boolean isEnabled(); @Override void setEnabled(boolean enabled);  }
@Test public void testResetVersions() { final ArrayList<VersionRecord> versions = new ArrayList<VersionRecord>(); versions.add(getVersionRecord("1111")); versions.add(getVersionRecord("2222")); button.setItems(versions); button.setVersion("1111"); button.onMenuOpening(); verify(view, times(2)).addLabel(any(VersionRecord.class), anyBoolean(), anyInt()); final ArrayList<VersionRecord> versions2 = new ArrayList<VersionRecord>(); versions2.add(getVersionRecord("1111")); reset(view); button.resetVersions(); button.setItems(versions2); button.setVersion("1111"); button.onMenuOpening(); verify(view, times(1)).addLabel(any(VersionRecord.class), anyBoolean(), anyInt()); }