### Question:
DailyWithMediaHandler extends DailyHandler { @Override public Map<String, String> generateSettings(VObjectData object, Map<String, Object> settings, String callerKey) { final Map<String, String> theSettings = super.generateSettings(object, settings, callerKey); for (final Entry<String, Object> anEntry : settings.entrySet()) { if (anEntry.getValue() != null) { final SchedulingAtom atom = new SchedulingAtom((Map<String, Object>) anEntry.getValue()); final String mediaId = String.valueOf((callerKey == null) ? atom.getMedia() : MusicData.findByAPIId(atom.getMedia(), callerKey).getId()); theSettings.put(anEntry.getKey() + DailyWithMediaHandler.MEDIA_SUFFIXE, mediaId); } } return theSettings; }  @Override Map<String, String> generateSettings(VObjectData object, Map<String, Object> settings, String callerKey); static final String MEDIA_SUFFIXE; }### Answer:
@Test public void getSettingsTest() { final VObjectData theObject = VObjectData.getData(getKowalskyObject()); final MusicData theMedia = MusicData.getData(new MusicMock(0, new FilesMock("path", MIME_TYPES.A_MPEG), net.violet.common.StringShop.EMPTY_STRING, getKowalskyUser(), 0)); final Map<String, Object> settings = new HashMap<String, Object>(); final Map<String, Object> atom = new HashMap<String, Object>(); atom.put(SchedulingAtom.HOUR, 12); atom.put(SchedulingAtom.MINUTE, 4); atom.put(SchedulingAtom.MEDIA, String.valueOf(theMedia.getId())); final Map<String, Object> atom2 = new HashMap<String, Object>(); atom2.put(SchedulingAtom.HOUR, 14); atom2.put(SchedulingAtom.MINUTE, 45); atom2.put(SchedulingAtom.MEDIA, String.valueOf(theMedia.getId())); settings.put(DailyHandler.Weekday.MONDAY.getValue(), atom); settings.put(DailyHandler.Weekday.WEDNESDAY.getValue(), atom2); final Map<String, String> theSettings = new DailyWithMediaHandler().generateSettings(theObject, settings, null); Assert.assertEquals(4, theSettings.size()); Assert.assertEquals("12:04:00", theSettings.get(DailyHandler.Weekday.MONDAY.getValue())); Assert.assertEquals(String.valueOf(theMedia.getId()), theSettings.get(DailyHandler.Weekday.MONDAY.getValue() + ".media")); Assert.assertEquals("14:45:00", theSettings.get(DailyHandler.Weekday.WEDNESDAY.getValue())); Assert.assertEquals(String.valueOf(theMedia.getId()), theSettings.get(DailyHandler.Weekday.WEDNESDAY.getValue() + ".media")); }