### Question:
InteractionTriggerHandler implements SchedulingHandler { public Map<String, String> generateSettings(VObjectData object, Map<String, Object> settings, String callerKey) { final Map<String, String> theResult = new HashMap<String, String>(); theResult.put(InteractionTriggerHandler.EVENT, settings.get(InteractionTriggerHandler.EVENT).toString()); if (settings.containsKey(InteractionTriggerHandler.TARGET)) { final String targetId = settings.get(InteractionTriggerHandler.TARGET).toString(); final VObjectData theObject = (callerKey != null) ? VObjectData.findByAPIId(targetId, callerKey) : VObjectData.find(Long.parseLong(targetId)); theResult.put(InteractionTriggerHandler.TARGET, String.valueOf(theObject.getId())); } if (settings.containsKey(InteractionTriggerHandler.VALIDITY)) { final Map<String, Map<String, Map<String, Object>>> theValidities = (Map<String, Map<String, Map<String, Object>>>) settings.get(InteractionTriggerHandler.VALIDITY); for (final Entry<String, Map<String, Map<String, Object>>> validityEntry : theValidities.entrySet()) { final SchedulingAtom from = new SchedulingAtom(validityEntry.getValue().get(InteractionTriggerHandler.VALIDITY_FROM)); final SchedulingAtom to = new SchedulingAtom(validityEntry.getValue().get(InteractionTriggerHandler.VALIDITY_TO)); theResult.put(validityEntry.getKey(), from.getHour() + ":" + from.getMinute() + "-" + to.getHour() + ":" + to.getMinute()); } } return theResult; }  void deleteElements(SubscriptionSchedulingData scheduling); void executeWhenDone(SubscriptionSchedulingData scheduling); Map<String, String> generateSettings(VObjectData object, Map<String, Object> settings, String callerKey); void checkSettings(VObjectData object, Map<String, Object> settings, String callerKey); SchedulingInformationMap getSchedulingInformation(SubscriptionSchedulingData scheduling, APICaller caller); static final String EVENT; static final String TARGET; static final String VALIDITY; static final String VALIDITY_FROM; static final String VALIDITY_TO; }### Answer:
@Test public void fullSubscriptionTest() { final VObjectData theObject = VObjectData.getData(getKowalskyObject()); final Map<String, Object> settings = new HashMap<String, Object>(); settings.put(InteractionTriggerHandler.EVENT, "anEvent"); final VObjectData targetObject = VObjectData.createObject(ObjectType.NABAZTAG_V2, "serial", "label", theObject.getOwner(), "location"); settings.put(InteractionTriggerHandler.TARGET, targetObject.getId()); final Map<String, Object> theValidity = new HashMap<String, Object>(); theValidity.put(DailyHandler.Weekday.MONDAY.getValue(), InteractionTriggerHandlerTest.getFromToMap(8, 30, 15, 45)); theValidity.put(DailyHandler.Weekday.TUESDAY.getValue(), InteractionTriggerHandlerTest.getFromToMap(10, 30, 22, 45)); theValidity.put(DailyHandler.Weekday.SATURDAY.getValue(), InteractionTriggerHandlerTest.getFromToMap(12, 20, 18, 33)); settings.put(InteractionTriggerHandler.VALIDITY, theValidity); final Map<String, String> theSettings = new InteractionTriggerHandler().generateSettings(theObject, settings, null); Assert.assertEquals(5, theSettings.size()); Assert.assertEquals("anEvent", theSettings.get(InteractionTriggerHandler.EVENT)); Assert.assertEquals(String.valueOf(targetObject.getId()), theSettings.get(InteractionTriggerHandler.TARGET)); Assert.assertEquals("8:30-15:45", theSettings.get(DailyHandler.Weekday.MONDAY.getValue())); Assert.assertEquals("10:30-22:45", theSettings.get(DailyHandler.Weekday.TUESDAY.getValue())); Assert.assertEquals("12:20-18:33", theSettings.get(DailyHandler.Weekday.SATURDAY.getValue())); }