@Test public void messageEmpty() throws ComponentLookupException { TranslationMessage translationMessage = getMockedComponent().parse(""); Assert.assertEquals("", translationMessage.getRawSource()); Assert.assertEquals(new CompositeBlock(), translationMessage.render(null, null)); }
@Override public TranslationMessage parse(String message) { TranslationMessage translationMessage; if (StringUtils.isEmpty(message)) { translationMessage = TranslationMessage.EMPTY; } else { translationMessage = new MessageFormatTranslationMessage(message, this.plainParser); } return translationMessage; }
MessageToolTranslationMessageParser implements TranslationMessageParser { @Override public TranslationMessage parse(String message) { TranslationMessage translationMessage; if (StringUtils.isEmpty(message)) { translationMessage = TranslationMessage.EMPTY; } else { translationMessage = new MessageFormatTranslationMessage(message, this.plainParser); } return translationMessage; } }
MessageToolTranslationMessageParser implements TranslationMessageParser { @Override public TranslationMessage parse(String message) { TranslationMessage translationMessage; if (StringUtils.isEmpty(message)) { translationMessage = TranslationMessage.EMPTY; } else { translationMessage = new MessageFormatTranslationMessage(message, this.plainParser); } return translationMessage; }  }
MessageToolTranslationMessageParser implements TranslationMessageParser { @Override public TranslationMessage parse(String message) { TranslationMessage translationMessage; if (StringUtils.isEmpty(message)) { translationMessage = TranslationMessage.EMPTY; } else { translationMessage = new MessageFormatTranslationMessage(message, this.plainParser); } return translationMessage; }  @Override TranslationMessage parse(String message); }
MessageToolTranslationMessageParser implements TranslationMessageParser { @Override public TranslationMessage parse(String message) { TranslationMessage translationMessage; if (StringUtils.isEmpty(message)) { translationMessage = TranslationMessage.EMPTY; } else { translationMessage = new MessageFormatTranslationMessage(message, this.plainParser); } return translationMessage; }  @Override TranslationMessage parse(String message); static final String HINT; }