### Question:
EmojiTextViewHelper { public void updateTransformationMethod() { mHelper.updateTransformationMethod(); } EmojiTextViewHelper(@NonNull TextView textView); void updateTransformationMethod(); @NonNull InputFilter[] getFilters(@NonNull final InputFilter[] filters); @Nullable TransformationMethod wrapTransformationMethod(
            @Nullable TransformationMethod transformationMethod); void setAllCaps(boolean allCaps);  }### Answer:
@Test public void testUpdateTransformationMethod() { mTextView.setTransformationMethod(mock(TransformationMethod.class)); mTextViewHelper.updateTransformationMethod(); assertThat(mTextView.getTransformationMethod(), instanceOf(EmojiTransformationMethod.class)); }
@Test public void testUpdateTransformationMethod_doesNotUpdateForPasswordTransformation() { final PasswordTransformationMethod transformationMethod = new PasswordTransformationMethod(); mTextView.setTransformationMethod(transformationMethod); mTextViewHelper.updateTransformationMethod(); assertEquals(transformationMethod, mTextView.getTransformationMethod()); }
@Test public void testUpdateTransformationMethod_doesNotCreateNewInstance() { mTextView.setTransformationMethod(mock(TransformationMethod.class)); mTextViewHelper.updateTransformationMethod(); final TransformationMethod tm = mTextView.getTransformationMethod(); assertThat(tm, instanceOf(EmojiTransformationMethod.class)); mTextViewHelper.updateTransformationMethod(); assertSame(tm, mTextView.getTransformationMethod()); }