### Question:
GmailTwitterHandler implements ApplicationHandler { private Map<String, Object> getSettings(SubscriptionData subscription, Map<String, Object> settings) { final Map<String, Object> oldSettings = ((subscription != null) && subscription.isValid()) ? subscription.getSettings() : Collections.<String, Object> emptyMap(); final Map<String, Object> theNewSettings = new HashMap<String, Object>(oldSettings); theNewSettings.putAll(settings); final String uncipheredPassword = theNewSettings.remove(GmailTwitterHandler.PASSWORD).toString(); theNewSettings.put(GmailTwitterHandler.PASSWORD, CipherTools.cipher(uncipheredPassword)); return theNewSettings; } protected  GmailTwitterHandler(ApplicationData application); 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 login, String password, Lang language, boolean isGmail); String getSubscriptionInformation(SubscriptionData subscription); static final int NB_NEWS_TO_READ; static final String LOGIN; static final String PASSWORD; static final String LANGUAGE; static final String ETAG; static final String LAST_MODIFIED; static final String LAST_ENTRY_ID; }### 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(GmailTwitterHandler.LANGUAGE, "fr"); params.put(GmailTwitterHandler.LOGIN, "vnabaztag"); params.put(GmailTwitterHandler.PASSWORD, "violet123"); 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(GmailTwitterHandler.LANGUAGE) && settings.containsKey(GmailTwitterHandler.LOGIN) && settings.containsKey(GmailTwitterHandler.PASSWORD)); Assert.assertEquals("fr", settings.get(GmailTwitterHandler.LANGUAGE)); Assert.assertEquals("vnabaztag", settings.get(GmailTwitterHandler.LOGIN)); Assert.assertEquals(CipherTools.cipher("violet123"), settings.get(GmailTwitterHandler.PASSWORD)); }