@Test public void whenMessageDoesNotExist() { InternalizationService internalizationService = new InternalizationService(); assertEquals("a.b.c", internalizationService.getMessage(() -> Locale.ENGLISH, new Message("a.b.c"))); }
public String getMessage(Localizable localizable, Message message) { try { return String.format(this.getMessage(localizable.getLocale(), message.getKey()), message.getArguments()); } catch (IllegalFormatException formatException) { throw new InvalidMessageFormatException(formatException); } }
InternalizationService { public String getMessage(Localizable localizable, Message message) { try { return String.format(this.getMessage(localizable.getLocale(), message.getKey()), message.getArguments()); } catch (IllegalFormatException formatException) { throw new InvalidMessageFormatException(formatException); } } }
InternalizationService { public String getMessage(Localizable localizable, Message message) { try { return String.format(this.getMessage(localizable.getLocale(), message.getKey()), message.getArguments()); } catch (IllegalFormatException formatException) { throw new InvalidMessageFormatException(formatException); } }  }
InternalizationService { public String getMessage(Localizable localizable, Message message) { try { return String.format(this.getMessage(localizable.getLocale(), message.getKey()), message.getArguments()); } catch (IllegalFormatException formatException) { throw new InvalidMessageFormatException(formatException); } }  String getMessage(Localizable localizable, Message message); void add(Locale locale, Supplier<Map<String, String>> messagesSupplier); }
InternalizationService { public String getMessage(Localizable localizable, Message message) { try { return String.format(this.getMessage(localizable.getLocale(), message.getKey()), message.getArguments()); } catch (IllegalFormatException formatException) { throw new InvalidMessageFormatException(formatException); } }  String getMessage(Localizable localizable, Message message); void add(Locale locale, Supplier<Map<String, String>> messagesSupplier);  }