@Test
public void testChangeTimeMode() {

    when(timeInstantView.getTimeModeSelectedIndex()).thenReturn(TimeInstant.TimeMode.BEGIN.getIndex());
    TimeInstantEditor timeInstantEditor = new TimeInstantEditor(timeInstantView, timeAmountEditor);
    timeInstantEditor.init(null, changeCommand);
    timeInstantEditor.changeTimeMode();
    TimeInstant timeInstant = timeInstantEditor.getTimeInstant();
    assertEquals(timeInstant.getTimeMode(), TimeInstant.TimeMode.BEGIN);
    verify(changeCommand).execute();
}