TimesheetDayEntryChangePresenterImplEx extends TimesheetDayEntryChangePresenterImpl implements TimesheetDayEntryChangePresenterEx,
		TimesheetDayEntryChangeViewEx.Observer { @Override public void onHoursChanged() { if (!presenting) { return; } saveToModel(); if (hoursChangeObserver != null) { if (getTimesheetDayEntry().getProject() != null) { hoursChangeObserver.hoursChanged(getTimesheetDayEntry().getProject()); } } } TimesheetDayEntryChangePresenterImplEx(Map<String, Object> context, TimesheetDayEntryChangeViewEx view, Presenter returnPresenter, TimesheetDayEntryService service);  TimesheetDayEntryChangePresenterImplEx(Map<String, Object> context, TimesheetDayEntryChangeView view, Presenter returnPresenter,
			SubviewCapablePresenter capablePresenter, TimesheetDayEntryService service); @Override TimesheetDayEntryChangeViewEx getView(); @Override void startPresenting(); @Override void loadFromModel(); @Override boolean validateFields(); @Override void saveToModel(); @Override void onProjectChanged(); @Override void onHoursChanged(); @Override void onSave(); @Override void onCancel(); @Override void onRemove(); @Override List<Project> getProjectList(); @Override void setProjectList(List<Project> projectList); @Override void setHoursChangeObserver(HoursChangeObserver observer);  }
@Test public void testOnHoursChanged() { presenterImpl.presenting = true; when(view.getProject()).thenReturn(project); when(view.getHours()).thenReturn("2:22"); presenterImpl.onHoursChanged(); assertEquals("2:22", dayEntry.getHours()); verify(view).getHours(); verify(observer).hoursChanged(project); }
@Test public void testOnHoursChangedNoProject() { presenterImpl.presenting = true; when(view.getProject()).thenReturn(null); when(view.getHours()).thenReturn("2:22"); presenterImpl.onHoursChanged(); assertEquals("2:22", dayEntry.getHours()); verify(view).getHours(); verify(observer, never()).hoursChanged(project); }
@Test public void testOnHoursChangedNotPresenting() { presenterImpl.presenting = false; presenterImpl.onHoursChanged(); verify(view, never()).getHours(); verify(observer, never()).hoursChanged(project); }