MaterialBanner extends FrameLayout { public void setText(String text) { TextView textView = findViewById(R.id.text); textView.setText(text); } MaterialBanner(@NonNull Context context);  MaterialBanner(@NonNull Context context, @Nullable AttributeSet attrs);  MaterialBanner(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr); void setText(String text); void setText(CharSequence text); void setActionText(String actionTitle); void setAction(OnActionListener listener);  }
@Test public void setText_displaysText() { banner.setText("I am text"); assertThat(innerText(banner.findViewById(R.id.text)), is("I am text")); }