@Test public void testGetKeyListener_doesNotCreateNewInstance() { KeyListener mockKeyListener = mock(KeyListener.class); final KeyListener keyListener1 = mEmojiEditTextHelper.getKeyListener(mockKeyListener); final KeyListener keyListener2 = mEmojiEditTextHelper.getKeyListener(keyListener1); assertSame(keyListener1, keyListener2); }
@NonNull public KeyListener getKeyListener(@NonNull final KeyListener keyListener) { Preconditions.checkNotNull(keyListener, "keyListener cannot be null"); return mHelper.getKeyListener(keyListener); }
EmojiEditTextHelper { @NonNull public KeyListener getKeyListener(@NonNull final KeyListener keyListener) { Preconditions.checkNotNull(keyListener, "keyListener cannot be null"); return mHelper.getKeyListener(keyListener); } }
EmojiEditTextHelper { @NonNull public KeyListener getKeyListener(@NonNull final KeyListener keyListener) { Preconditions.checkNotNull(keyListener, "keyListener cannot be null"); return mHelper.getKeyListener(keyListener); } EmojiEditTextHelper(@NonNull final EditText editText); }
EmojiEditTextHelper { @NonNull public KeyListener getKeyListener(@NonNull final KeyListener keyListener) { Preconditions.checkNotNull(keyListener, "keyListener cannot be null"); return mHelper.getKeyListener(keyListener); } EmojiEditTextHelper(@NonNull final EditText editText); void setMaxEmojiCount(@IntRange(from = 0) int maxEmojiCount); int getMaxEmojiCount(); @NonNull KeyListener getKeyListener(@NonNull final KeyListener keyListener); @Nullable InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs); }
EmojiEditTextHelper { @NonNull public KeyListener getKeyListener(@NonNull final KeyListener keyListener) { Preconditions.checkNotNull(keyListener, "keyListener cannot be null"); return mHelper.getKeyListener(keyListener); } EmojiEditTextHelper(@NonNull final EditText editText); void setMaxEmojiCount(@IntRange(from = 0) int maxEmojiCount); int getMaxEmojiCount(); @NonNull KeyListener getKeyListener(@NonNull final KeyListener keyListener); @Nullable InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs);  }