BlueTapeDsl { public static BindingFunction text(String text) { return view -> ((TextView) view).setText(text); }  static BindingFunction composite(@NonNull BindingFunction... functions); static BindingFunction id(int id, @NonNull BindingFunction... functions); static BindingFunction text(String text); static BindingFunction textResource(@StringRes int stringId); static BindingFunction textColor(@ColorInt int color); static BindingFunction visible(boolean visible); static BindingFunction visibility(@Visibility int visibility); static BindingFunction enabled(boolean enabled); static BindingFunction checked(boolean checked); static BindingFunction imageDrawable(@Nullable Drawable drawable); static BindingFunction imageResource(@DrawableRes int drawableId); static BindingFunction imageBitmap(@Nullable Bitmap bitmap); @SuppressWarnings("deprecation") static BindingFunction backgroundDrawable(@Nullable Drawable drawable); static BindingFunction backgroundResource(@DrawableRes int drawableId); static BindingFunction onClick(@Nullable View.OnClickListener listener); static BindingFunction onClick(@Nullable ShortenedOnClickListener listener); static BindingFunction onLongClick(@Nullable View.OnLongClickListener listener); static BindingFunction onTouch(@Nullable View.OnTouchListener listener); static BindingFunction onToggle(@Nullable CompoundButton.OnCheckedChangeListener listener); static BindingFunction onTextChanged(@Nullable OnTextChangedListener listener); static BindingFunction pass();  }
@Test public void text() throws Exception { TextView textView = mock(TextView.class); String expectedText = "expected"; BlueTapeDsl .text(expectedText) .bind(textView); verify(textView).setText(expectedText); }