CalendarServiceImpl implements CalendarService, UserDataDeletable { @Override public OlatCalendar getCourseCalendar(final ICourse course) { return calendarDao.getCalendar(CalendarDao.TYPE_COURSE, getCalendarIdFor(course)); } 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 testGetCourseCalendar() { ICourse course = mock(ICourse.class); OlatCalendar olatCalendar = calendarServiceImpl.getCourseCalendar(course); verify(calendarManagerMock).getCalendar(eq(CalendarDao.TYPE_COURSE), anyString()); }