TextChangedBindingFunction implements BindingFunction { private static void addTextWatcher(TextView textView, @NonNull OnTextChangedListener listener) { TextWatcher watcher = TextWatcherAdapter.whenTextChanged(listener); textView.addTextChangedListener(watcher); textView.setTag(R.id.onTextChangedListener, watcher); } private  TextChangedBindingFunction(@Nullable OnTextChangedListener listener); static BindingFunction create(@Nullable OnTextChangedListener listener); @Override void bind(View view);  }
@Test public void addTextWatcher() throws Exception { BindingFunction function = TextChangedBindingFunction.create(listener); function.bind(view); verify(view).addTextChangedListener(isA(TextWatcher.class)); verify(view).setTag(eq(R.id.onTextChangedListener), isA(TextWatcher.class)); }