### Question:
MoodHandler implements ApplicationHandler { public void update(SubscriptionData subscription, Map<String, Object> settings) { subscription.setSettings(getSettings(settings)); }  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[] langsList, FrequencyHandler.Frequency inFrequency); String getSubscriptionInformation(SubscriptionData subscription); static final String LANGUAGES; }### Answer:
@Test public void updateTest() throws InvalidSettingException, MissingSettingException { final VObjectData object = VObjectData.getData(getKowalskyObject()); final Map<String, Object> params = new HashMap<String, Object>(); final List<String> langs = Arrays.asList("fr", "en"); params.put(MoodHandler.LANGUAGES, langs); final SubscriptionData theSubscription = ApplicationHandlerManager.createSubscription(getApplication(), object, params); Assert.assertTrue(theSubscription.isValid()); Map<String, Object> settings = theSubscription.getSettings(); Assert.assertEquals(1, settings.size()); Assert.assertTrue(settings.containsKey(MoodHandler.LANGUAGES)); Assert.assertEquals(langs, settings.get(MoodHandler.LANGUAGES)); params.clear(); params.put(MoodHandler.LANGUAGES, Arrays.asList("it", "de")); ApplicationHandlerManager.updateSubscription(theSubscription, params); settings = theSubscription.getSettings(); Assert.assertEquals(1, settings.size()); Assert.assertTrue(settings.containsKey(MoodHandler.LANGUAGES)); Assert.assertEquals(Arrays.asList("it", "de"), settings.get(MoodHandler.LANGUAGES)); }