VariantEmojiManager implements VariantEmoji { @Override @NonNull public Emoji getVariant(final Emoji desiredEmoji) { if (variantsList.isEmpty()) { initFromSharedPreferences(); } final Emoji baseEmoji = desiredEmoji.getBase(); for (int i = 0; i < variantsList.size(); i++) { final Emoji emoji = variantsList.get(i); if (baseEmoji.equals(emoji.getBase())) { return emoji; } } return desiredEmoji; } VariantEmojiManager(@NonNull final Context context); @Override @NonNull Emoji getVariant(final Emoji desiredEmoji); @Override void addVariant(@NonNull final Emoji newVariant); @Override void persist();  }
@Test public void getVariantDefault() { assertThat(variantEmojiManager.getVariant(emoji)).isEqualTo(emoji); }