CalendarServiceImpl implements CalendarService, UserDataDeletable { public boolean removeEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry) { boolean removeSuccessful = calendarDao.removeEventFrom(cal, calendarEntry); informAboutCalendarChange(cal); return removeSuccessful; } private  CalendarServiceImpl();   CalendarServiceImpl(CalendarDao calendarDao, CoordinatorManager coordinatorManager); @Override CalendarConfig findCalendarConfigForIdentity(final OlatCalendar calendar, final Preferences userGuiPreferences); @Override void saveCalendarConfigForIdentity(final CalendarConfig config, final OlatCalendar calendar, final Preferences userGuiPreferences); @Override boolean addEntryTo(final OlatCalendar cal, final CalendarEntry calendarEntry); boolean updateEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry); boolean removeEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry); void informAboutCalendarChange(final OlatCalendar cal); @Override OlatCalendar getPersonalCalendar(final Identity identity); @Override OlatCalendar getImportedCalendar(final Identity identity, final String calendarName); @Override OlatCalendar getGroupCalendar(final BusinessGroup businessGroup); @Override OlatCalendar getCourseCalendar(final ICourse course); @Override void deletePersonalCalendar(final Identity identity); @Override void deleteGroupCalendar(final BusinessGroup businessGroup); @Override void deleteCourseCalendar(final ICourse course); @Override void deleteUserData(final Identity identity, final String newDeletedUserName); @Override boolean calendarExists(String calendarType, String calendarID); @Override Calendar readCalendar(String type, String calendarID); @Override File getCalendarFile(String type, String calendarID); @Override OlatCalendar getCalendar(String type, String calendarID); @Override boolean deleteCalendar(String calendarType, String calendarID); @Override OlatCalendar buildCalendarFrom(String calendarContent, String calType, String calId); @Override boolean persistCalendar(OlatCalendar calendar); @Override void writeCalendarToFile(String calendarId, String calendarContent);  }
@Test public void testRemoveEventFrom() { boolean result = calendarServiceImpl.removeEntryFrom(cal, calendarEntry); verify(calendarManagerMock).removeEventFrom(cal, calendarEntry); assertTrue("Modified-Event was not triggered, missing fireEventToListenersOf(...)", eventBusMock.firedEvent); }