@Test public void testResourceBundleException() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "COMMON"); Message ms = MessageService.getMessage(null, context); assertEquals( "MessageService could not be created because of exception 'IllegalArgumentException with message " + "'Parameter locale MUST NOT be NULL.'.", ms.getText()); }
public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); }
MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } }
MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private  MessageService(final Locale locale); }
MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private  MessageService(final Locale locale); static MessageService getInstance(final Locale locale); static boolean isLocaleSupported(final Locale locale); static Locale getSupportedLocale(final List<Locale> locales); static Locale getSupportedLocale(final List<Locale> locales, final Locale defaultLocale); static MessageService getInstance(final List<Locale> locales); static Message getMessage(final Locale language, final MessageReference context); static Message getMessage(final Locale locale, final String key, final Object... replacements); Locale getLocale(); Enumeration<String> getKeys(); }
MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private  MessageService(final Locale locale); static MessageService getInstance(final Locale locale); static boolean isLocaleSupported(final Locale locale); static Locale getSupportedLocale(final List<Locale> locales); static Locale getSupportedLocale(final List<Locale> locales, final Locale defaultLocale); static MessageService getInstance(final List<Locale> locales); static Message getMessage(final Locale language, final MessageReference context); static Message getMessage(final Locale locale, final String key, final Object... replacements); Locale getLocale(); Enumeration<String> getKeys();  }