### Question:
TimePickerView implements TimePicker.View { void refresh() { setHours(getDate().hours()); setMinutes(getDate().minutes()); setSeconds(getDate().seconds()); if (!Objects.isNull(onDateChanged)) { onDateChanged.accept(getDate()); } } @Inject  TimePickerView(final HTMLAnchorElement increaseHours,
                          final HTMLAnchorElement decreaseHours,
                          final HTMLAnchorElement increaseMinutes,
                          final HTMLAnchorElement decreaseMinutes,
                          final HTMLAnchorElement increaseSeconds,
                          final HTMLAnchorElement decreaseSeconds,
                          final @Named("span") HTMLElement hours,
                          final @Named("span") HTMLElement minutes,
                          final @Named("span") HTMLElement seconds); @Override void init(final TimePickerView presenter); @Override void setDate(final Moment moment); @EventHandler("increase-hours") void onIncreaseHoursClick(final ClickEvent event); @EventHandler("decrease-hours") void onDecreaseHoursClick(final ClickEvent event); @EventHandler("increase-minutes") void onIncreaseMinutesClick(final ClickEvent event); @EventHandler("decrease-minutes") void onDecreaseMinutesClick(final ClickEvent event); @EventHandler("increase-seconds") void onIncreaseSecondsClick(final ClickEvent event); @EventHandler("decrease-seconds") void onDecreaseSecondsClick(final ClickEvent event); void setOnDateChanged(final Consumer<Moment> onDateChanged); @Override Moment getDate(); @Override void setOnBlur(final Consumer<Event> onBlur);  }### Answer:
@Test public void testRefresh() { final int hours = 14; final int minutes = 25; final int seconds = 17; final Consumer<Moment> onDateChanged = mock(Consumer.class); view.setOnDateChanged(onDateChanged); when(date.hours()).thenReturn(hours); when(date.minutes()).thenReturn(minutes); when(date.seconds()).thenReturn(seconds); view.refresh(); verify(view).setHours(hours); verify(view).setMinutes(minutes); verify(view).setSeconds(seconds); verify(onDateChanged).accept(date); }