EmojiUtils { public static boolean isOnlyEmojis(@Nullable final CharSequence text) { if (text != null && text.length() > 0) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(inputWithoutSpaces) .matches(); } return false; } private  EmojiUtils(); static boolean isOnlyEmojis(@Nullable final CharSequence text); @NonNull static List<EmojiRange> emojis(@Nullable final CharSequence text); static int emojisCount(@Nullable final CharSequence text); @NonNull static EmojiInformation emojiInformation(@Nullable final CharSequence text);  }
@Test public void isOnlyEmojisEmpty() { assertThat(EmojiUtils.isOnlyEmojis("")).isFalse(); }
@Test public void isOnlyEmojisNull() { assertThat(EmojiUtils.isOnlyEmojis(null)).isFalse(); }
@Test public void isOnlyEmojisText() { assertThat(EmojiUtils.isOnlyEmojis("hello world!")).isFalse(); }
@Test public void isOnlyEmojisSingleEmoji() { assertThat(EmojiUtils.isOnlyEmojis(EMOJI_1)).isTrue(); }
@Test public void isOnlyEmojisMultipleEmojis() { assertThat(EmojiUtils.isOnlyEmojis(EMOJI_1 + EMOJI_2)).isTrue(); }
@Test public void isOnlyEmojisMultipleEmojisWithSpaces() { assertThat(EmojiUtils.isOnlyEmojis(" \t" + EMOJI_1 + "\t " + EMOJI_2 + " \r\n")).isTrue(); }
@Test public void isOnlyEmojisSingleEmojiAndText() { assertThat(EmojiUtils.isOnlyEmojis(EMOJI_1 + "hello")).isFalse(); }
@Test public void isOnlyEmojisSingleTextAndEmoji() { assertThat(EmojiUtils.isOnlyEmojis("hello" + EMOJI_1)).isFalse(); }
@Test public void isOnlyEmojisMultipleEmojisAndText() { assertThat(EmojiUtils.isOnlyEmojis(EMOJI_1 + "hello" + EMOJI_2)).isFalse(); }
@Test public void isOnlyEmojisMultipleTextAndEmojis() { assertThat(EmojiUtils.isOnlyEmojis("hello" + EMOJI_1 + "world")).isFalse(); }