TerminationTreeItemContentViewImpl implements TerminationTreeItemContentView { private void initDropDownList() { String itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentTimeSpent); dropDownNameMap.put(TerminationConfigOption.MILLISECONDS_SPENT_LIMIT, itemMessage); AnchorListItem listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.MILLISECONDS_SPENT_LIMIT.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentUnimprovedTimeSpent); dropDownNameMap.put(TerminationConfigOption.UNIMPROVED_MILLISECONDS_SPENT_LIMIT, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.UNIMPROVED_MILLISECONDS_SPENT_LIMIT.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentBestScoreLimit); dropDownNameMap.put(TerminationConfigOption.BEST_SCORE_LIMIT, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.BEST_SCORE_LIMIT.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentBestScoreFeasible); dropDownNameMap.put(TerminationConfigOption.BEST_SCORE_FEASIBLE, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.BEST_SCORE_FEASIBLE.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentStepCountLimit); dropDownNameMap.put(TerminationConfigOption.STEP_COUNT_LIMIT, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.STEP_COUNT_LIMIT.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentUnimprovedStepCountLimit); dropDownNameMap.put(TerminationConfigOption.UNIMPROVED_STEP_COUNT_LIMIT, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.UNIMPROVED_STEP_COUNT_LIMIT.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentScoreCalculationCountLimit); dropDownNameMap.put(TerminationConfigOption.SCORE_CALCULATION_COUNT_LIMIT, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.SCORE_CALCULATION_COUNT_LIMIT.name()); }); dropdownMenuList.add(listItem); itemMessage = translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentViewImplNestedTermination); dropDownNameMap.put(TerminationConfigOption.NESTED, itemMessage); listItem = new AnchorListItem(itemMessage); listItem.addClickHandler(h -> { presenter.onTerminationTypeSelected(TerminationConfigOption.NESTED.name()); }); dropdownMenuList.add(listItem); } @Inject  TerminationTreeItemContentViewImpl(final Button removeTerminationButton,
                                              final DropDownMenu dropdownMenuList,
                                              final TranslationService translationService); @EventHandler("daysSpentInput") void handleDaysSpentInputChange(ChangeEvent event); @EventHandler("hoursSpentInput") void handleHoursSpentInputChange(ChangeEvent event); @EventHandler("minutesSpentInput") void handleMinutesSpentInputChange(ChangeEvent event); @EventHandler("secondsSpentInput") void handleSecondsSpentInputChange(ChangeEvent event); @EventHandler("millisecondsSpentInput") void handleMilliSecondsSpentInputChange(ChangeEvent event); @EventHandler("unimprovedDaysSpentInput") void handleUnimprovedDaysSpentInputChange(ChangeEvent event); @EventHandler("unimprovedHoursSpentInput") void handleUnimprovedHoursSpentInputChange(ChangeEvent event); @EventHandler("unimprovedMinutesSpentInput") void handleUnimprovedMinutesSpentInputChange(ChangeEvent event); @EventHandler("unimprovedSecondsSpentInput") void handleUnimprovedSecondsSpentInputChange(ChangeEvent event); @EventHandler("unimprovedMillisecondsSpentInput") void handleUnimprovedMilliSecondsSpentInputChange(ChangeEvent event); @EventHandler("stepCountLimitInput") void onStepCountLimitInputChange(ChangeEvent event); @EventHandler("unimprovedStepCountLimitInput") void onUnimprovedStepCountLimitInputChange(ChangeEvent event); @EventHandler("scoreCalculationCountLimitInput") void onScoreCalculationLimitInputChange(ChangeEvent event); @EventHandler("bestScoreInput") void handleBestScoreInputChange(ChangeEvent event); @EventHandler("bestScoreFeasibleInput") void handleBestScoreFeasibleInputChange(ChangeEvent event); @EventHandler("terminationCompositionStyleSelect") void handleTerminationCompositionStyleSelectChange(ChangeEvent event); @Override void setPresenter(TerminationTreeItemContent presenter); @Override void setRoot(boolean root); @Override void addDropDownOption(TerminationConfigOption terminationConfigOption); @Override void removeDropDownOption(TerminationConfigOption option); @Override void setNestedTreeItem(boolean nested); @Override void hideTimeSpentInput(); @Override void hideUnimprovedTimeSpentInput(); @Override void hideStepCountLimitInput(); @Override void hideUnimprovedStepCountLimitInput(); @Override void hideScoreCalculationCountLimitInput(); @Override void hideBestScoreFeasibleInput(); @Override void hideBestScoreLimitInput(); @Override void setFormLabelText(String text); @Override void setFormLabelHelpContent(String content); @Override void setDropDownHelpContent(String content); @Override void setDaysSpent(Long value); @Override void setHoursSpent(Long value); @Override void setMinutesSpent(Long value); @Override void setSecondsSpent(Long value); @Override void setMillisecondsSpent(Long value); @Override void setUnimprovedDaysSpent(Long value); @Override void setUnimprovedHoursSpent(Long value); @Override void setUnimprovedMinutesSpent(Long value); @Override void setUnimprovedSecondsSpent(Long value); @Override void setUnimprovedMillisecondsSpent(Long value); @Override void setStepCountLimit(Integer value); @Override void setUnimprovedStepCountLimit(Integer value); @Override void setScoreCalculationCountLimit(Long value); @Override void setBestScoreFeasible(Boolean value); @Override void setBestScoreLimit(String value); @Override void setTerminationCompositionStyle(TerminationCompositionStyleModel value); @Override HTMLElement getElement();  }
@Test public void initDropDownList() { verify(dropDownMenu, atLeastOnce()).add(any()); }