DataSourceMessageSource extends AbstractMessageSource implements
        InitializingBean { protected void mapMessage(DBMessage message) { Locale locale = createLocale(message); Properties messages = getMessages(locale); messages.setProperty(message.getCode(), message.getMessage()); if (log.isDebugEnabled()) { log.debug("add Message[" + message.getMessage() + "] (code[" + message.getCode() + "], locale[" + locale + "])"); } }  void setDefaultLocale(Locale defaultLocale); synchronized void setDbMessageResourceDAO(
            DBMessageResourceDAO dbMessageResourceDAO); @Override void afterPropertiesSet(); synchronized void reloadDataSourceMessage();  }
@Test public void testMapMessage01() throws Exception { DataSourceMessageSource_DataSourceMessageSourceStub03 ds = new DataSourceMessageSource_DataSourceMessageSourceStub03(); DBMessage message = new DBMessage("a", "b", "c", "d", "e"); Locale locale = new Locale("ja", "JP"); ds.locale = locale; Properties props = new Properties(); ds.messages = props; ds.mapMessage(message); assertSame(message, ds.dbm); assertSame(locale, ds.locale2); assertSame(props, ds.messages); }