### Question:
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { public void setValue(TimerSettingsValue value) { super.setValue(value); view.clear(); setDisplayMode(DISPLAY_MODE.DURATION_TIMER, true); if (value != null) { if (value.getTimeDate() != null) { setDisplayMode(DISPLAY_MODE.DATE_TIMER, true); view.setTimeDate(value.getTimeDate()); } else if (value.getTimeDuration() != null) { setDisplayMode(DISPLAY_MODE.DURATION_TIMER, true); view.setTimeDuration(value.getTimeDuration()); } else if (value.getTimeCycleLanguage() != null) { setDisplayMode(DISPLAY_MODE.MULTIPLE_TIMER, true); view.setTimeCycleLanguage(value.getTimeCycleLanguage()); view.setTimeCycle(value.getTimeCycle()); } } } @Inject  TimerSettingsFieldEditorPresenter(final View view); @PostConstruct void init(); View getView(); void setValue(TimerSettingsValue value); @Override void setReadOnly(final boolean readOnly); void onShowTimeDateTimePicker(); void onTimeDateTimePickerChange(); void onTimeDateTimePickerHidden();  }### Answer:
@Test public void testSetDurationTimerValue() { TimerSettingsValue value = new TimerSettingsValue(); value.setTimeDuration(VALUE_1); editor.setValue(value); verify(view, times(1)).clear(); verifyHideParams(3); verifyDurationTimerDisplayMode(3, true); verify(view, times(1)).setTimeDuration(VALUE_1); }
@Test public void testSetTimeDateTimerValue() { TimerSettingsValue value = new TimerSettingsValue(); value.setTimeDate(VALUE_1); editor.setValue(value); verifyHideParams(3); verify(view, times(1)).clear(); verifyDurationTimerDisplayMode(2, true); verifyTimeDateTimerDisplayMode(1, true); verify(view, times(1)).setTimeDate(VALUE_1); }
@Test public void testTimeCycleTimerValue() { TimerSettingsValue value = new TimerSettingsValue(); value.setTimeCycleLanguage(TIME_CYCLE_LANGUAGE.ISO.value()); value.setTimeCycle(VALUE_1); editor.setValue(value); verifyHideParams(3); verify(view, times(1)).clear(); verifyDurationTimerDisplayMode(2, true); verifyMultipleTimerDisplayMode(1, true); verify(view, times(1)).setTimeCycleLanguage(TIME_CYCLE_LANGUAGE.ISO.value()); verify(view, times(1)).setTimeCycle(VALUE_1); }