### Question:
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { protected void onTimerDurationChange() { TimerSettingsValue oldValue = value; value = copy(oldValue); value.setTimeDuration(view.getTimeDuration()); value.setTimeDate(null); value.setTimeCycle(null); value.setTimeCycleLanguage(null); notifyChange(oldValue, value); } @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 testOnTimerDurationChange() { TimerSettingsValue value = new TimerSettingsValue(); editor.setValue(value); when(view.getTimeDuration()).thenReturn(VALUE_1); editor.onTimerDurationChange(); verify(changeHandler, times(1)).onValueChange(oldValueCaptor.capture(), newValueCaptor.capture()); assertEquals(value, oldValueCaptor.getValue()); value.setTimeDuration(VALUE_1); assertEquals(value, newValueCaptor.getValue()); }