EmojiInterpolator { public static String interpolateAlias(String pattern, String text) { return interpolate(text, EmojiInterpolator.EMOJI_ALIAS, new EmojiAliasReplacer(pattern)); } private  EmojiInterpolator(); static UnicodeInterpolator createEmojiInterpolator(String pattern); static String interpolateAlias(String pattern, String text); static String interpolateUnicode(String pattern, String text);  }
@Test public void emojiAliasTest() { String text = "Lorem ipsum :sparkles: dolorem:star: and dolorem sit amet"; String replaced = EmojiInterpolator.interpolateAlias("<img src=\"imgs/{0}.png\" title=\"{1}\" />", text); Assert.assertEquals( replaced, "Lorem ipsum <img src=\"imgs/2728.png\" title=\"sparkles\" /> dolorem<img src=\"imgs/2b50.png\" title=\"star\" /> and dolorem sit amet"); }