@Test void testResolveCode() { doReturn("The Label").when(labeled).getLabel("en"); when(messageRepository.resolveCodeWithoutArguments("TEST_MESSAGE_EN", ENGLISH)) .thenReturn("label: ''{0, label}''"); assertEquals( "label: 'The Label'", messageSource.resolveCode("TEST_MESSAGE_EN", ENGLISH).format(new Object[] {labeled})); }
@Override public MessageFormat resolveCode(String code, Locale locale) { String resolved = resolveCodeWithoutArguments(code, locale); if (resolved == null) { return null; } return createMessageFormat(resolved, locale); }
LocalizationMessageSource extends AbstractMessageSource { @Override public MessageFormat resolveCode(String code, Locale locale) { String resolved = resolveCodeWithoutArguments(code, locale); if (resolved == null) { return null; } return createMessageFormat(resolved, locale); } }
LocalizationMessageSource extends AbstractMessageSource { @Override public MessageFormat resolveCode(String code, Locale locale) { String resolved = resolveCodeWithoutArguments(code, locale); if (resolved == null) { return null; } return createMessageFormat(resolved, locale); } LocalizationMessageSource(
      MessageFormatFactory messageFormatFactory,
      MessageResolution messageRepository,
      Supplier<Locale> fallbackLocaleSupplier); }
LocalizationMessageSource extends AbstractMessageSource { @Override public MessageFormat resolveCode(String code, Locale locale) { String resolved = resolveCodeWithoutArguments(code, locale); if (resolved == null) { return null; } return createMessageFormat(resolved, locale); } LocalizationMessageSource(
      MessageFormatFactory messageFormatFactory,
      MessageResolution messageRepository,
      Supplier<Locale> fallbackLocaleSupplier); @Override String getDefaultMessage(String code); @Override MessageFormat resolveCode(String code, Locale locale); }
LocalizationMessageSource extends AbstractMessageSource { @Override public MessageFormat resolveCode(String code, Locale locale) { String resolved = resolveCodeWithoutArguments(code, locale); if (resolved == null) { return null; } return createMessageFormat(resolved, locale); } LocalizationMessageSource(
      MessageFormatFactory messageFormatFactory,
      MessageResolution messageRepository,
      Supplier<Locale> fallbackLocaleSupplier); @Override String getDefaultMessage(String code); @Override MessageFormat resolveCode(String code, Locale locale);  }