### Question:
TraficHandler implements ApplicationHandler { private Map<String, Object> getSettings(Map<String, Object> settings) { final Map<String, Object> theSettings = new HashMap<String, Object>(settings); theSettings.put(TraficHandler.SOURCE, "trafic" + "." + theSettings.get(TraficHandler.START) + "." + theSettings.get(TraficHandler.END)); return theSettings; }  SubscriptionData create(VObjectData object, Map<String, Object> settings); void update(SubscriptionData subscription, Map<String, Object> settings); void checkSettings(VObjectData object, Map<String, Object> settings); void delete(SubscriptionData subscription); Map<String, Object> getUISettings(SubscriptionData subscription, APICaller inApiCaller); static SubscriptionData createOrUpdateSubscription(SubscriptionData inSubscription, VObjectData inObject, String start, String end, boolean ambiant, List<String> inTimesList, boolean allWeek); String getSubscriptionInformation(SubscriptionData subscription); static final String START; static final String END; static final String SOURCE; }### Answer:
@Test public void validSubscriptionTest() throws InvalidSettingException, MissingSettingException { final VObjectData object = VObjectData.getData(getKowalskyObject()); final Map<String, Object> params = new HashMap<String, Object>(); params.put(TraficHandler.END, "bercy"); params.put(TraficHandler.START, "auteuil"); final SubscriptionData theSubscription = ApplicationHandlerManager.createSubscription(getApplication(), object, params); Assert.assertTrue(theSubscription.isValid()); final Map<String, Object> settings = theSubscription.getSettings(); Assert.assertEquals(3, settings.size()); Assert.assertTrue(settings.containsKey(TraficHandler.SOURCE) && settings.containsKey(TraficHandler.END) && settings.containsKey(TraficHandler.START)); Assert.assertEquals("bercy", settings.get(TraficHandler.END)); Assert.assertEquals("auteuil", settings.get(TraficHandler.START)); Assert.assertEquals("trafic.auteuil.bercy", settings.get(TraficHandler.SOURCE)); }