@Test
public void testChangeTimeAmountType() {

    TimeFrame timeFrame = TimeFrame.parse("now -1year till now");
    timeFrameEditor.init(timeFrame, changeCommand);
    when(timeAmountView.getSelectedTypeIndex()).thenReturn(3);
    fromAmountEditor.changeIntervalType();
    DateIntervalType type = timeFrame.getFrom().getTimeAmount().getType();
    verify(changeCommand).execute();
    assertEquals(type, DateIntervalType.DAY);
}