1   package com.atlassian.core.cron;
2   
3   import com.atlassian.core.i18n.I18nTextProvider;
4   
5   import java.text.MessageFormat;
6   import java.util.ResourceBundle;
7   
8   public class MockI18nBean implements I18nTextProvider
9   {
10      final ResourceBundle resourceBundle;
11  
12      public MockI18nBean()
13      {
14          resourceBundle = ResourceBundle.getBundle("com.atlassian.core.AtlassianCore");
15      }
16  
17      public String getText(final String key)
18      {
19          return resourceBundle.getString(key);
20      }
21  
22      public String getText(final String key, final Object[] args)
23      {
24          String message = getText(key);
25          final MessageFormat mf = new MessageFormat(message);
26          return mf.format(args);
27      }
28  }